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.
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
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.
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
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.