Show/Hide line chart data series with button or switch - Dashboard 2.0

I know that it is possible to show/hide line chart data series by click on "legend".

But I want to ask you if Is there a way to hide/show line chart data series with a button or switch? I mean use a button to modify the property show/hide in line chart?

Thank you.

May I suggest to use plotly: Line charts in JavaScript

I havent tested it on dashboard 2, but it works fine on dashboard

Examples:

Where is the data coming from for the chart?
If it's from a database, then try using buttons to inject different db queries into the chart node.

weather

2 Likes