====Creating Templates====
Templates are defined in Javascript, through the **templates** dictionary. This can be defined in it's own JSON file along-side your other display files.
The dictionary key is the unique code for the template (such as 'vbarchart' for a vertical bar-chart), followed by a string that contains the SVG text that will replace the parent object.
Text between percentage symbols (%) are replaced by parameter values. For example, the text "%x%" will be replaced with the value of 'x' in the originating SVG object.
You can also enclose Javascript math / functions inside the symbols to transform or translate the number.
For instance, if you wanted to create a template of a large black box that contains a smaller green one, your template would look like this...
Template replacements happen //before// the rest of the file is processed, so items that are animated will work.
Below is the template for a simple status control.
===Example File===
var templates = {
"vbarchart": '',
"hbarchart": '',
"haxis": '%min%%max%%title%',
"raxis": '%max%%min%%title%',
"laxis": '%max%%min%%title%',
"title": '%title% / %subtitle%',
"status": '',
"gauge": ''
};