Home Forums Chart Support stripLines live access

stripLines live access

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

    I’m trying to set stripLines to my chart. What is the setter for that? I tried like so:
    var stripLines = {
    startValue: new Date(“2017-10-21 00:00:11”),
    endValue: new Date(“2018-10-22 00:00:22″) ,
    color:”#000”,
    };
    chart.axisX[0].stripLines.push(stripLines);
    chart.render();

    What is wrong with that?

    #19306

    @Wojciech,

    Changing chart.axisX[0].stripLines.push(stripLines); to chart.options.axisX[0].stripLines.push(stripLines); should work fine in your case. Also, you can use addTo method to add stripLines dynamically.

    ___
    Suyash Singh
    Team CanvasJS

    #19315

    Thank you Suyash,
    Works well with only one little change:
    hart.options.axisX.stripLines.push(stripLines); //no index ine axisX
    BR,
    Wojciech

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

You must be logged in to reply to this topic.