Home Forums Chart Support reset chart

reset chart

Viewing 3 posts - 1 through 3 (of 3 total)
  • #44617

    image

    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

    • This topic was modified 10 months, 2 weeks ago by codetonight.
    #44631

    @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

    #44635

    thank you

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.