I am wondering how I can disable any click+drag action on an Easy Chart, as well as disabling the menu that pops up when you right click on it. I don’t want the chart to modified in those ways. Preferably, nothing would happen.
Should work; place in
configureChart. You may have issues in the designer, because toggling into preview mode doesn’t fire
configureChart, but does fire a locale event that recreates the popup menu; but in the actual client that should work fine.
Nothing happens in the client, and this is what shows up in the client console:
10:10:26.889 [AWT-EventQueue-0] ERROR Vision.EasyChart - Error invoking extension method.
org.python.core.PyException: Traceback (most recent call last):
File “”, line 11, in configureChart
AttributeError: ‘com.inductiveautomation.factorypmi.application.com’ object has no attribute ‘setPopupMenu’
Huh, that’s pretty weird. What version of Ignition are you using? I copied those directly out of my designer where they were working…
print type(self) before the
v8.0.11 and I just tried v8.0.12
I was able to get this to work for the right-click popup
Any other ideas for disabling the zoom? I tried ‘setTransferHandler’ on every component in the EasyChart. I also tried
self.getComponent(0).getComponent(0).setMouseZoomable(False) self.getComponent(0).getComponent(0).setRangeZoomable(False) self.getComponent(0).getComponent(0).setDomainZoomable(False)
but nothing seemed to work.