mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-06 04:09:08 +02:00
Alternative scale templating. Passing function as template.
Allows to choose template mechanism - processing function or original micro templating.
This commit is contained in:
parent
55fc0cfd49
commit
c37c58ad39
@ -402,6 +402,10 @@
|
||||
//Templating methods
|
||||
//Javascript micro templating by John Resig - source at http://ejohn.org/blog/javascript-micro-templating/
|
||||
template = helpers.template = function(templateString, valuesObject){
|
||||
// If templateString is function rather than string-template - call the function for valuesObject
|
||||
if(templateString instanceof Function)
|
||||
return templateString(valuesObject);
|
||||
|
||||
var cache = {};
|
||||
function tmpl(str, data){
|
||||
// Figure out if we're getting a template, or if we need to
|
||||
@ -1886,4 +1890,4 @@
|
||||
return Chart;
|
||||
};
|
||||
|
||||
}).call(this);
|
||||
}).call(this);
|
||||
|
Loading…
Reference in New Issue
Block a user