Closed xchuan closed 11 years ago
If you want to change the CSS style associated with it, you can supply a CSS class name to the format as per the docs:
tooltipFormat: $.spformat('{{value}}', 'tooltip-class')
Mis-read the question.. No, there's no way to use anything other than "{{...}}" currently.
You could do it in javascript though with a bit of hackery (i'm sure you can think of a neater solution for this)...
tooltipFormat: '[[value]]'.replace('[[', '\{\{').replace(']]', '\}\}')
Or if you're feeling adventurous
String.prototype.sparkCode = function() { return this.replace(/[\[\]]/g, function(m) { return String.fromCharCode(m.charCodeAt(0)+32); }) }
tooltipFormat: '[[value]]'.sparkCode()
You get the point ;-)
tooltipFormat: '{{value:levels}} - {{value}}',is there any another way to change the style of this format tooltip.