Creating a c3 chart involves defining various properties, including a tooltip. Here is an example:
generateData = () => {
const x = randomNR(0, 100);
const y = randomNR(0, 100);
const together = x + y;
return {
data: {
columns: [
['data1', x],
['data2', y],
],
type: 'donut',
},
tooltip: {
format: {
value: function() {
return `${x} + ${y} = ${together}`
}
}
},
donut: {
title: `Tooltip not getting updated`
}
}
};
After generating the chart, only the new data property can be loaded. Is it possible to update the tooltip as well? For example: https://plnkr.co/edit/8PrbjVqhS9BBYpSbZmkM?p=preview
In the provided case, updating the data results in incorrect values being displayed in the tooltip.