Home forums Chart Support Second Y axis should be visible but the datasets related to Y2 to be invisible

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

    Dear Team,

    I have a feature where the Y2 axis will be present with labels but the datasets to be hidden/invisible.
    If I try hiding the Y2 Graph , the Y2 axis is also hidden along with datasets where as I need to display the Y2 axis labels as it is.

    Please help me on this



    Please take a look at this jsfiddle.

    Priyanka M S
    Team CanvasJS


    @Priyanka M S

    It’s very relevant but i need to hide the clutches in the legend also .
    Can you share me the options for changing it.




    You can hide legends as you hide the dataSeries, but once the legend is hidden on click, you wouldn’t be able to regain that legend.
    Along with setting dataSeries visibility to false in toggleDataSeries method, set showInLegend property of that dataSeries to false.

      if (typeof (e.dataSeries.visible) === "undefined" || e.dataSeries.visible) {
        e.dataSeries.visible = false;
        e.dataSeries.showInLegend = false;
      } else {
        e.dataSeries.visible = true;

    Priyanka M S
    Team CanvasJS

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

You must be logged in to reply to this topic.