# Classic chart X axis Visible property

**URL:** <https://forum.inductiveautomation.com/t/classic-chart-x-axis-visible-property/49288>\
**Category:** Ignition\
**Created:** [July 28, 2021, 8:58am UTC](https://forum.inductiveautomation.com/t/classic-chart-x-axis-visible-property/49288 "2021-07-28T08:58:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![prasath.t](https://avatars.discourse-cdn.com/v4/letter/p/898d66/32.png) [@prasath.t](https://forum.inductiveautomation.com/u/prasath.t)\
**Post date:** [July 28, 2021, 8:58am UTC](https://forum.inductiveautomation.com/t/classic-chart-x-axis-visible-property/49288/1 "2021-07-28T08:58:24Z")

</div>

Hi,  
I have 2 x axis . i want to hide each axis manually when i click button

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

`event.source.parent.parent.getComponent('CTN_Charts').getComponent('Chart').getChart().getXYPlot().getDomainAxis().setVisible(0)`

i tired this script but its hiding the all 2 axis in single click.

but i want each axis to be hide manually by using separate button for each axis.

can any one please help me out?

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [July 28, 2021, 12:25pm UTC](https://forum.inductiveautomation.com/t/classic-chart-x-axis-visible-property/49288/2 "2021-07-28T12:25:48Z")

</div>

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.

```auto
event.source.parent.parent.getComponent('CTN_Charts').getComponent('Chart).getChart().getXYPlot().getDomainAxis(1).setVisibile(0)

```
