# Need Help Controlling Legend Behavior in Perspective XY Chart

**URL:** <https://forum.inductiveautomation.com/t/need-help-controlling-legend-behavior-in-perspective-xy-chart/102760>\
**Category:** General Discussion\
**Tags:** ignition81, perspective\
**Created:** [February 23, 2025, 9:44pm UTC](https://forum.inductiveautomation.com/t/need-help-controlling-legend-behavior-in-perspective-xy-chart/102760 "2025-02-23T21:44:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![GOKULAKANNAN\_P](https://avatars.discourse-cdn.com/v4/letter/g/0ea827/32.png) [@GOKULAKANNAN\_P](https://forum.inductiveautomation.com/u/GOKULAKANNAN_P)\
**Post date:** [February 23, 2025, 9:44pm UTC](https://forum.inductiveautomation.com/t/need-help-controlling-legend-behavior-in-perspective-xy-chart/102760/1 "2025-02-23T21:44:05Z")

</div>

Hello all,

I’m facing an issue with controlling the legend in the XY Chart component in Ignition Perspective. The default legend allows me to show/hide bars properly. However, when I try to control the visibility using the `visible` property, it only hides the series but leaves an empty space instead of disabling it like the default legend does.

Additionally, when I click on the **default legend** to hide a series, the change is not reflected in the `visible` property. I need a way to programmatically control this behavior while ensuring the legend and series visibility stay in sync.

Has anyone found a solution for this?

Thanks in advance 🙂!
