Home forums Feature Requests & Feedback Dynamically Setting the YAxis Range

Tagged: 

This topic contains 1 reply, has 2 voices, and was last updated by  Bivek Singh 6 days, 12 hours ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #13525

    oneworld
    Member

    I am trying to dynamically set the range of the YAxis when the user click on the chart legend as follows, and it is not working. Although the code is successfully being executed and the axisY.minimum and axisY.maximum values are properly being set, the graph itself does not display the new dynamically set axisY range. Any ideas?

    legend: {
    cursor: “pointer”,
    itemclick: function (e) {
    if ((typeof (e.dataSeries.name) === “undefined”) || (e.dataSeries.name === “DataSeries A”))
    {
    chart.axisY.minimum = 1000;
    chart.axisY.maximum = 3000;
    }
    else if (e.dataSeries.name === “DataSeries B”) {
    chart.axisY.minimum = -200;
    chart.axisY.maximum = 200;
    }
    chart.render();
    }
    }

    #13533

    Bivek Singh
    Moderator

    oneworld

    Can you please create a jsFiddle so that we can understand the issue in better way?

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

You must be logged in to reply to this topic.