Change donut title (Interior text) dynamically with chart loads
Is there a way to make the title inside the donut chart change to the sum of all the data values, updating automatically with every data load into the chart?
You can use this to change the title dynamically.
d3.select('#div_id .c3-chart-arcs-title').node().innerHTML = "new title";
where div_id is the id of the div to which your chart is bounded.
you may have to write the logic to calculate sum on your own
and how can we change font and color dynamically?
I was able to do it following vishal-kony's advice.
However it will be better if c3 library provides an API for this. Something like
chart.updateTitle('donut','new title');
Any update?