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

Second Y axis should be visible but the datasets related to Y2 to be invisible

Viewing 4 posts - 1 through 4 (of 4 total)
  • #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

    #22150

    @reply2manojvadde,

    Please take a look at this jsfiddle.

    __
    Priyanka M S
    Team CanvasJS

    #22151

    @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.

    Regards,
    Manoj

    #22153

    Manoj,

    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.