# Disable Right Click Menu on Pie Chart

**URL:** <https://forum.inductiveautomation.com/t/disable-right-click-menu-on-pie-chart/22574>\
**Category:** Ignition\
**Created:** [February 14, 2019, 4:14pm UTC](https://forum.inductiveautomation.com/t/disable-right-click-menu-on-pie-chart/22574 "2019-02-14T16:14:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![grietveld](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/grietveld/32/6984_2.png) [@grietveld](https://forum.inductiveautomation.com/u/grietveld)\
**Post date:** [February 14, 2019, 4:14pm UTC](https://forum.inductiveautomation.com/t/disable-right-click-menu-on-pie-chart/22574/1 "2019-02-14T16:14:44Z")

</div>

On the Pie Chart component, is there a way to disable the menu that appears when you right click on it? Most of the options it provides seem to be disabled anyway, plus it isn’t very useful for the display that I am building.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/e/e52e54263c4809700603b42338cfda31fec238fb.png)

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [February 14, 2019, 4:29pm UTC](https://forum.inductiveautomation.com/t/disable-right-click-menu-on-pie-chart/22574/2 "2019-02-14T16:29:41Z")

</div>

This might be of some help...

> [@Disabling right click option on the Report Viewer](http://forum.inductiveautomation.com/t/disabling-right-click-option-on-the-report-viewer/21104):
>
> Hi Team, I want to know how to disable export to Excel(or csv or pdf) option on the Report Viewer when we right click on it? Is there a option in the versions from 7.9.6?

---

<div class="post-metadata">

**Author:** ![grietveld](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/grietveld/32/6984_2.png) [@grietveld](https://forum.inductiveautomation.com/u/grietveld)\
**Post date:** [February 14, 2019, 5:18pm UTC](https://forum.inductiveautomation.com/t/disable-right-click-menu-on-pie-chart/22574/3 "2019-02-14T17:18:31Z")

</div>

The value for that field is already set to none, but the menu still is enabled. So I’m not sure if that is the right route. I’m going to poke around a bit though and see if I can find any similar properties.

---

<div class="post-metadata">

**Author:** ![grietveld](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/grietveld/32/6984_2.png) [@grietveld](https://forum.inductiveautomation.com/u/grietveld)\
**Post date:** [February 14, 2019, 6:06pm UTC](https://forum.inductiveautomation.com/t/disable-right-click-menu-on-pie-chart/22574/4 "2019-02-14T18:06:44Z")

</div>

Took a bit more digging, but the field that is used on the popup is ‘popup’ not ‘popupMenu’, even though both are valid fields.

So the following code resolves the issue.

```auto
from org.apache.commons.lang3.reflect import FieldUtils
chart = event.source.parent.getComponent('Pie Chart')
FieldUtils.writeField(chart, "popup", None, True)

```
