# Chart Customizer Property

**URL:** <https://forum.inductiveautomation.com/t/chart-customizer-property/74943>\
**Category:** Ignition\
**Tags:** scripting, vision, ignition81\
**Created:** [June 13, 2023, 8:40am UTC](https://forum.inductiveautomation.com/t/chart-customizer-property/74943 "2023-06-13T08:40:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dan\_Kevin\_Dagapioso](https://avatars.discourse-cdn.com/v4/letter/d/eb9ed0/32.png) [@Dan\_Kevin\_Dagapioso](https://forum.inductiveautomation.com/u/Dan_Kevin_Dagapioso)\
**Post date:** [June 13, 2023, 8:40am UTC](https://forum.inductiveautomation.com/t/chart-customizer-property/74943/1 "2023-06-13T08:40:27Z")

</div>

How can I get this chart customizer property for scripting? I need toggle this property to execute my idea. Can someone help me?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/d/0db217f6d89dee7d849dc4de5841521c8b8cefee.png)

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [June 13, 2023, 10:17am UTC](https://forum.inductiveautomation.com/t/chart-customizer-property/74943/2 "2023-06-13T10:17:26Z")

</div>

> [@Classic chart X axis Visible property](https://forum.inductiveautomation.com/t/classic-chart-x-axis-visible-property/49288/2):
>
> I’m not sure this code would hide both axes, as getDomainAxis() returns the Axis with an index of 0. You can use getDomainAxis() with an index parameter to get a specific axis. event.source.parent.parent.getComponent('CTN\_Charts').getComponent('Chart).getChart().getXYPlot().getDomainAxis(1).setVisibile(0)

---

<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:** [June 13, 2023, 10:32am UTC](https://forum.inductiveautomation.com/t/chart-customizer-property/74943/3 "2023-06-13T10:32:17Z")

</div>

For the default axis, this should work:

```auto
#chartComponent = event.source.parent.getComponent('Chart') #Relative path to chart
chartComponent.chart.plot.domainAxis.visible = False
#or
chartComponent.chart.plot.domainAxis.visible = True

```

---

<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:** [June 13, 2023, 10:44am UTC](https://forum.inductiveautomation.com/t/chart-customizer-property/74943/4 "2023-06-13T10:44:45Z")

</div>

If you need a specific axis, this approach works:

```auto
chartComponent = event.source.parent.getComponent('Chart')
plot = chartComponent.chart.plot
for axisIndex in range(plot.domainAxisCount):
	axis = plot.getDomainAxis(axisIndex)
	if plot.getDomainAxis(axisIndex).label == 'Date':#or whichever one you are after
		axis.visible = False
		#or	
		#axis.visible = True

```

---

<div class="post-metadata">

**Author:** ![Dan\_Kevin\_Dagapioso](https://avatars.discourse-cdn.com/v4/letter/d/eb9ed0/32.png) [@Dan\_Kevin\_Dagapioso](https://forum.inductiveautomation.com/u/Dan_Kevin_Dagapioso)\
**Post date:** [July 11, 2023, 7:21am UTC](https://forum.inductiveautomation.com/t/chart-customizer-property/74943/5 "2023-07-11T07:21:48Z")

</div>

> [@justinedwards.jle](#):
>
> `domainAxis.visible`

How can I call the y axis instead?

---

<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:** [July 11, 2023, 10:16am UTC](https://forum.inductiveautomation.com/t/chart-customizer-property/74943/6 "2023-07-11T10:16:55Z")

</div>

Simple

> [@Dan\_Kevin\_Dagapioso](#):
>
> How can I call the y

The code word for y is range, so it will be rangeAxis instead of domainAxis
