# Perspective Power Chart: pen selected event

**URL:** <https://forum.inductiveautomation.com/t/perspective-power-chart-pen-selected-event/67126>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [December 1, 2022, 10:29am UTC](https://forum.inductiveautomation.com/t/perspective-power-chart-pen-selected-event/67126 "2022-12-01T10:29:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pgmo](https://avatars.discourse-cdn.com/v4/letter/p/d07c76/32.png) [@pgmo](https://forum.inductiveautomation.com/u/pgmo)\
**Post date:** [December 1, 2022, 10:29am UTC](https://forum.inductiveautomation.com/t/perspective-power-chart-pen-selected-event/67126/1 "2022-12-01T10:29:27Z")

</div>

Hi all,  
I cannot find a way to catch the event, when a pen in a _Power Chart_ has been selected by the operator. I'd like to react to that event to show/hide the axes grids as needed - I have many different pens on my Power Chart with up to 10 different axes: if I show all grids at the same time, the operator understands nothing more.

Thanks in advance, regards

---

<div class="post-metadata">

**Author:** ![djs](https://avatars.discourse-cdn.com/v4/letter/d/e47774/32.png) [@djs](https://forum.inductiveautomation.com/u/djs)\
**Post date:** [December 2, 2022, 3:39pm UTC](https://forum.inductiveautomation.com/t/perspective-power-chart-pen-selected-event/67126/2 "2022-12-02T15:39:44Z")

</div>

If by selected, you mean this:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/c/6cf7154af55cb5283baab08b9526288ac5177b9a.png)

Then you could add a [property change script](https://docs.inductiveautomation.com/display/DOC81/Perspective+Property+Change+Scripts) to the _pens_ prop. This will fire anytime any change has been made to the pens (including one being selected). You could write a script that checks if the _visible_ property has been changed on a pen and adjust the axes accordingly. Alternatively (if the operator is not allowed to add/remove pens), you could add a property change script to each _visible_ property separately.

If by selected, you mean clicking the plot itself to "highlight" the pen… I'm not sure if there's any way to know that it happened.

---

<div class="post-metadata">

**Author:** ![pgmo](https://avatars.discourse-cdn.com/v4/letter/p/d07c76/32.png) [@pgmo](https://forum.inductiveautomation.com/u/pgmo)\
**Post date:** [December 2, 2022, 4:07pm UTC](https://forum.inductiveautomation.com/t/perspective-power-chart-pen-selected-event/67126/3 "2022-12-02T16:07:45Z")

</div>

> [@djs](#):
>
> If by selected, you mean clicking the plot itself to "highlight" the pen… I'm not sure if there's any way to know that it happened.

Thanks Mr Snyder What I would like to do is just what you wrote last.  
Regards
