XY Chart legend and axis clicks

In Perspective 8.1.10

Using an XY Chart with a legend to display multiple series with multiple y-axis.

The XY Chart has a built-in function to hide a series by clicking on the series name in the legend.

When all the series associated with a particular y-axis are hidden, I would like the y-axis to be hidden as well.

There doesn’t seem to be any notification or property change when a series is hidden this way for me to catch to hide the associated y-axis my self

My only thought is to create my own legend manually and catch the clicks that way, and change the relative series and axis “visible” properties to hide or show them – but this seems tedious, and I worry about the re-render speed.

Any ideas?
Thanks.

Did you get anywhere with this?
I also note that clicking the series name in the legend doesn’t seem to actually change the series properties at all. I would have thought it would toggle the property “visible”. Unless this is just behaviour in the designer?

I ended up creating a custom legend view. I hide the legend in the xy chart and display my custom legend below the chart. I then catch the clicks on the legend and adjust the axis properties (visible, tooltip, grid opacity, inside, etc.) to hide the associated axis.

Tricky part was keeping colors, etc. in sync.

HTH.
-Shane

1 Like