A custom formatter function that returns the content (text/html) to be displayed inside the toolTip.
Notevar chart = new CanvasJS.Chart("container", { . . toolTip:{ contentFormatter: function ( e ) { return "Custom ToolTip" + e.entries[0].dataPoint.y; } }, . . }); chart.render();
e: { // parameter sent to function chart, toolTip, entries: [ //entries array {dataPoint, dataSeries}, //first dataSeries {dataPoint, dataSeries}, // second dataSeries . . ] }
var str = ""; contentFormatter: function(e){ for (var i = 0; i < e.entries.length; i++){ var temp = (e.entries[i].dataSeries.name); str = str.concat(temp); }; return (str); },
Server Side Technologies |
Front End Technologies |
Contact |
|
---|---|---|---|
ASP.NET MVC Charts | JavaScript Charts | FAQs | |
PHP Charts | jQuery Charts | Sales Enquiries | |
Spring MVC Charts | React Charts | Support Forum | |
JSP Charts | Angular Charts | Careers | |
JavaScript StockCharts | |||
Privacy Policy © fenopix