# Disable click+drag & right click on Easy Chart

**URL:** <https://forum.inductiveautomation.com/t/disable-click-drag-right-click-on-easy-chart/34147>\
**Category:** Ignition\
**Created:** [April 23, 2020, 6:56am UTC](https://forum.inductiveautomation.com/t/disable-click-drag-right-click-on-easy-chart/34147 "2020-04-23T06:56:33Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![cshoopman](https://avatars.discourse-cdn.com/v4/letter/c/0ea827/32.png) [@cshoopman](https://forum.inductiveautomation.com/u/cshoopman)\
**Post date:** [April 23, 2020, 6:56am UTC](https://forum.inductiveautomation.com/t/disable-click-drag-right-click-on-easy-chart/34147/1 "2020-04-23T06:56:33Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [April 23, 2020, 3:32pm UTC](https://forum.inductiveautomation.com/t/disable-click-drag-right-click-on-easy-chart/34147/2 "2020-04-23T15:32:50Z")

</div>

```python
self.setPopupMenu(None)
self.setTransferHandler(None)

```

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.

---

<div class="post-metadata">

**Author:** ![cshoopman](https://avatars.discourse-cdn.com/v4/letter/c/0ea827/32.png) [@cshoopman](https://forum.inductiveautomation.com/u/cshoopman)\
**Post date:** [April 23, 2020, 5:12pm UTC](https://forum.inductiveautomation.com/t/disable-click-drag-right-click-on-easy-chart/34147/3 "2020-04-23T17:12:11Z")

</div>

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](http://com.inductiveautomation.factorypmi.application.com)' object has no attribute 'setPopupMenu'

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [April 23, 2020, 5:47pm UTC](https://forum.inductiveautomation.com/t/disable-click-drag-right-click-on-easy-chart/34147/4 "2020-04-23T17:47:11Z")

</div>

Huh, that’s pretty weird. What version of Ignition are you using? I copied those directly out of my designer where they were working…

Can you `print type(self)` before the `self.setPopupMenu()` call?

---

<div class="post-metadata">

**Author:** ![cshoopman](https://avatars.discourse-cdn.com/v4/letter/c/0ea827/32.png) [@cshoopman](https://forum.inductiveautomation.com/u/cshoopman)\
**Post date:** [April 23, 2020, 6:05pm UTC](https://forum.inductiveautomation.com/t/disable-click-drag-right-click-on-easy-chart/34147/5 "2020-04-23T18:05:35Z")

</div>

> [@paul-griffith](#):
>
> print type(self)

v8.0.11 and I just tried v8.0.12  
\<type 'com.inductiveautomation.factorypmi.application.components.PMIEasyChart'\>

I was able to get this to work for the right-click popup

> self.getComponent(0).getComponent(0).setPopupMenu(None)

---

<div class="post-metadata">

**Author:** ![cshoopman](https://avatars.discourse-cdn.com/v4/letter/c/0ea827/32.png) [@cshoopman](https://forum.inductiveautomation.com/u/cshoopman)\
**Post date:** [May 20, 2020, 4:58pm UTC](https://forum.inductiveautomation.com/t/disable-click-drag-right-click-on-easy-chart/34147/7 "2020-05-20T16:58:46Z")

</div>

Any other ideas for disabling the zoom? I tried ‘setTransferHandler’ on every component in the EasyChart. I also tried

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

---

<div class="post-metadata">

**Author:** ![Rajesh.s](https://avatars.discourse-cdn.com/v4/letter/r/ac91a4/32.png) [@Rajesh.s](https://forum.inductiveautomation.com/u/Rajesh.s)\
**Post date:** [December 2, 2021, 9:42am UTC](https://forum.inductiveautomation.com/t/disable-click-drag-right-click-on-easy-chart/34147/8 "2021-12-02T09:42:45Z")

</div>

to disable pop up you can use  
self.setShowPopup(0) on configureChart, please refer [PMIEasyChart (ignition 7.8.4-rc1 API)](https://files.inductiveautomation.com/sdk/javadoc/ignition784rc1/com/inductiveautomation/factorypmi/application/components/PMIEasyChart.html) for more

---

<div class="post-metadata">

**Author:** ![jennifer.chang](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jennifer.chang](https://forum.inductiveautomation.com/u/jennifer.chang)\
**Post date:** [December 10, 2025, 11:42pm UTC](https://forum.inductiveautomation.com/t/disable-click-drag-right-click-on-easy-chart/34147/9 "2025-12-10T23:42:11Z")

</div>

Has any gotten this to work? I am also hoping to disable the click and drag zoom feature on Easy Charts.

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [December 11, 2025, 4:52am UTC](https://forum.inductiveautomation.com/t/disable-click-drag-right-click-on-easy-chart/34147/10 "2025-12-11T04:52:03Z")

</div>

> [@jennifer.chang](#):
>
> Has any gotten this to work?

If you want the chart to be view only, you could simply remove the mouse listener:

```python
#def configureChart(self, chart):
	chartHolder = self.getComponent(0).getComponent(0)
	for listener in chartHolder.mouseListeners:
		if listener. __class__. __name__ == 'PMIEasyChart$EasyChart':
			chartHolder.removeMouseListener(listener)

```

**Edit:**  
You could also overlay the chart with something transparent like a label and simply put `pass` in the transparent component's mouseDragged event handler. This would consume the mouse event and prevent it from reaching the chart.

---

<div class="post-metadata">

**Author:** ![jennifer.chang](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jennifer.chang](https://forum.inductiveautomation.com/u/jennifer.chang)\
**Post date:** [December 11, 2025, 3:45pm UTC](https://forum.inductiveautomation.com/t/disable-click-drag-right-click-on-easy-chart/34147/11 "2025-12-11T15:45:54Z")

</div>

Thank you so much! Disabling the mouse listener worked! I didn’t try the label overlay trick but that’s a good option that I didn’t think of!

---

<div class="post-metadata">

**Author:** ![jennifer.chang](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jennifer.chang](https://forum.inductiveautomation.com/u/jennifer.chang)\
**Post date:** [December 11, 2025, 10:37pm UTC](https://forum.inductiveautomation.com/t/disable-click-drag-right-click-on-easy-chart/34147/12 "2025-12-11T22:37:52Z")

</div>

As an update for others, I wasn’t able to get similar script working to disable the zoom on a Classic Chart (I used ‘PMIChart’ instead of ‘PMIEasyChart$EasyChart’ and I also tried removing one of the .getComponent(0) instances in case that was the issue but neither worked) so I tried the label overlay option suggested by Justin above and that worked perfectly as well!

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [December 12, 2025, 4:21am UTC](https://forum.inductiveautomation.com/t/disable-click-drag-right-click-on-easy-chart/34147/13 "2025-12-12T04:21:31Z")

</div>

> [@jennifer.chang](#):
>
> I wasn’t able to get similar script working [...] on a Classic Chart

On a classic chart, the script would look like this:

```python
#def configureChart(self, chart):
	for listener in self.mouseListeners:
		if listener. __class__. __name__ == 'PMIChart':
			self.removeMouseListener(listener)

```
