# Control who can add/edit/delete annotations in Power Chart

**URL:** <https://forum.inductiveautomation.com/t/control-who-can-add-edit-delete-annotations-in-power-chart/77038>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [July 27, 2023, 7:49pm UTC](https://forum.inductiveautomation.com/t/control-who-can-add-edit-delete-annotations-in-power-chart/77038 "2023-07-27T19:49:52Z")\
**Posts on this page:** 7\
**Page:** 1

<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:** [July 27, 2023, 7:49pm UTC](https://forum.inductiveautomation.com/t/control-who-can-add-edit-delete-annotations-in-power-chart/77038/1 "2023-07-27T19:49:52Z")

</div>

Is there any way to only allow authorized users to add/edit/delete annotations when using the Power Chart?

I can't find any setting on the gateway that can do that, so my only idea is to bind the visibility on the annotation button and annotation visibility props to an `isAuthorized()` expression. However this would hide it for unauthorized users... Ideally unauthorized users would be able to see annotations, but only authorized users would be able to add/edit/delete them.

Am I missing something?

---

<div class="post-metadata">

**Author:** ![Hayden\_Watson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/hayden_watson/32/48792_2.png) [@Hayden\_Watson](https://forum.inductiveautomation.com/u/Hayden_Watson)\
**Post date:** [July 28, 2023, 6:36am UTC](https://forum.inductiveautomation.com/t/control-who-can-add-edit-delete-annotations-in-power-chart/77038/2 "2023-07-28T06:36:12Z")

</div>

I couldn't find any way of doing it myself using the normal configuration, the Power Chart has a few little buttons that I would like to be hidden, like on the Pen control display where you can't just hide the edit and delete buttons.

To get past this I've been using CSS Injection, using styles.

To hide these annotation icons, you'll want to make a new style, for example hidePowerChartInfoEdit, and in the style under background image put the CSS code

```auto
}.psc-hidePowerChartInfoEdit .ia_powerChartComponent __label__ icon.icon { display: none !important; }{

```

Keep in mind if you put this style in a different folder, you'll need to edit the CSS so it can find the name.

This injects into the browser CSS for it to not display those icons. You can then bind the class of the powerchart to use these styles when whatever user role is logged in.

To make you own just use the browsers HTML inspector to get the name of the part you want to hide.

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [July 28, 2023, 7:36am UTC](https://forum.inductiveautomation.com/t/control-who-can-add-edit-delete-annotations-in-power-chart/77038/3 "2023-07-28T07:36:59Z")

</div>

note that hidding things alone isnt 100% secure, it still gets rendered in the browser and someone can unhidde them there by removing the css localy with the browser inspector tools

---

<div class="post-metadata">

**Author:** ![Hayden\_Watson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/hayden_watson/32/48792_2.png) [@Hayden\_Watson](https://forum.inductiveautomation.com/u/Hayden_Watson)\
**Post date:** [July 28, 2023, 7:53am UTC](https://forum.inductiveautomation.com/t/control-who-can-add-edit-delete-annotations-in-power-chart/77038/4 "2023-07-28T07:53:30Z")

</div>

That would be the same with the enable option on a button in the component props though, only can be really secure by locking off the view with security zoning or using the perspective workstation to prevent using the inspector.

---

<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:** [July 28, 2023, 12:31pm UTC](https://forum.inductiveautomation.com/t/control-who-can-add-edit-delete-annotations-in-power-chart/77038/5 "2023-07-28T12:31:22Z")

</div>

Thanks for the replies.

Looks like I'll have to end up doing the CSS injection thing. I just wish there was a built in (non hacky) way to to this...

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [July 28, 2023, 12:43pm UTC](https://forum.inductiveautomation.com/t/control-who-can-add-edit-delete-annotations-in-power-chart/77038/6 "2023-07-28T12:43:20Z")

</div>

there is a stylescheet.css where you can dont need injection (8.1.22+), you still need to know about css though

[https://docs.inductiveautomation.com/display/DOC81/Style+Classes#StyleClasses-EnablingtheAdvancedStylesheet](https://docs.inductiveautomation.com/display/DOC81/Style+Classes#StyleClasses-EnablingtheAdvancedStylesheet)

---

<div class="post-metadata">

**Author:** ![Hayden\_Watson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/hayden_watson/32/48792_2.png) [@Hayden\_Watson](https://forum.inductiveautomation.com/u/Hayden_Watson)\
**Post date:** [July 31, 2023, 6:13am UTC](https://forum.inductiveautomation.com/t/control-who-can-add-edit-delete-annotations-in-power-chart/77038/7 "2023-07-31T06:13:50Z")

</div>

Oh I didn't know this had recently become a supported feature, I'll need to start migrating my CSS injectors.

Thanks!
