ZoomCharts is using Canvas to render the chart. To change the label content, you can use styleFunction like this: http://jsfiddle.net/7np69cLo/
however, note that you need to access the chart instance to change the behaviour.
to do that from external script for a chart that is already instantiated, you can do it like this:
let e = document.getElementById("demo"); // set to dom element that contains the chart
let chart = e._DVSL_ChartInstance; // get the chart instance
chart.updateSettings({
slice: {
styleFunction: function(slice){
slice.label = "foo";
slice.innerLabel = "bar";
}
}
}); // set your own style function as in the above jsfiddle example
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.