You must be logged in to post your query.
Home › Forums › Chart Support › reset chart
Tagged: pie, reset
hello can I restore the cake slices to the old state, that is, resetting..documents also did not find it, I did the rendering but it did not work, I tried the example here
but I see this error
`chart.axisX[0].set(“vaultTotalChartContainer”, null, false); chart.axisX[0].set(“vaultTotalChartContainer”, null);’
‘chart.axisX[0].set(“vaultTotalChartContainer”, null, false); chart.axisX[0].set(“vaultTotalChartContainer”, null);’
because axisX comes with null value,I tried the data feature, no error, but no reset ‘chart.data[0].set(“vaultTotalChartContainer”, null, false); chart.data[0].set(“vaultTotalChartContainer”, null);’ thanks
@codetonight,
You can restore the slices in doughnut chart to the old state by dynamically setting the exploded property of dataPoints to false as shown in the code snippet below.
for(var i = 0; i < chart.data[0].dataPoints.length; i++) chart.options.data[0].dataPoints[i].exploded = false; chart.render();
Kindly have a look at this JSFiddle for the working example on the same.
__ Sachin Bisht Team CanvasJS
thank you
You must be logged in to reply to this topic. Login/Register