Disable tap-to-hide behavior in legend? (Perspective XY Chart)

In the Perspective XY chart, tapping/clicking on an icon in the legend hides the corresponding series. Is it possible to disable this behavior?

It doesn’t look like the state of the legend click-to-hide can be seen and therefore can’t be set.

You could disable the built-in legends using
props.series.0.hiddenInLegend: true
and create the legend manually using labels.

Idk if it might disable some other click events on the chart though. Let me know if it does, and which setting caused it! (also might not work on old devices)

You can try adding this to your custome theme.css styles…
div[data-component="ia.chart.xy"] g[aria-describedby$="description"] > g > g[role="switch"]{pointer-events:none;}

or maybe easier css injection, paste this in a styleclass background image:
}div[data-component="ia.chart.xy"] g[aria-describedby$="description"] > g > g[role="switch"]{pointer-events:none;}{

2 Likes

I used the second method you described some time ago - thank you for posting it.
Today I've noticed that it doesn't work anymore. Recently I've upgraded the gateway to from 8.1.14 to 8.1.23, and I think that's why. Now I need to find some other workaround for this.

no idea what changed, maybe they updated the chart and its named different