Home Forums Chart Support Remove all striplines by click

Remove all striplines by click

Viewing 4 posts - 1 through 4 (of 4 total)
  • #28029

    Hi,

    is it possible to remove all striplines by click like in the example on https://canvasjs.com/docs/charts/methods/stripline/remove/ ?

    chart.axisX[0].stripLines.remove(); gives an error .stripLines.remove is not a function

    And how to enable them again by click? Like toogle data series.

    Thanks

    #28030

    Only that work for me:

     var countstriplines = chart.axisX[0].stripLines.length;
            for(var i = 0; i < countstriplines; i++) {
                chart.axisX[0].stripLines[0].remove();   
                }
           });
    #28082

    @mwick,

    Please take a look at this JSFiddle.


    Vishwas R
    Team CanvasJS

    #28085

    Great, thank you!

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

You must be logged in to reply to this topic.