# Get rid of Date in X axis in Status chart

**URL:** <https://forum.inductiveautomation.com/t/get-rid-of-date-in-x-axis-in-status-chart/17450>\
**Category:** Ignition\
**Created:** [March 21, 2018, 4:02pm UTC](https://forum.inductiveautomation.com/t/get-rid-of-date-in-x-axis-in-status-chart/17450 "2018-03-21T16:02:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![vanko25](https://avatars.discourse-cdn.com/v4/letter/v/a87d85/32.png) [@vanko25](https://forum.inductiveautomation.com/u/vanko25)\
**Post date:** [March 21, 2018, 4:02pm UTC](https://forum.inductiveautomation.com/t/get-rid-of-date-in-x-axis-in-status-chart/17450/1 "2018-03-21T16:02:39Z")

</div>

Hi all,

I am trying to remove the date axis in a status chart but I have got only halfway there. I managed to get the date hidden but can’t guess what is the right propertyName to use to trigger the code in the propertyChange script. I am using the following code and it works but only if you hover over the chart with the mouse. Any suggestions? Thanks!

![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/5/509d1ae24d45da8ad65a3498c7688678c5007251.png)

---

<div class="post-metadata">

**Author:** ![bfuson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bfuson/32/4597_2.png) [@bfuson](https://forum.inductiveautomation.com/u/bfuson)\
**Post date:** [March 21, 2018, 6:49pm UTC](https://forum.inductiveautomation.com/t/get-rid-of-date-in-x-axis-in-status-chart/17450/2 "2018-03-21T18:49:24Z")

</div>

Have you tried just setting the showRangeAxis property of the status chart to false in the Property Editor? No script required

---

<div class="post-metadata">

**Author:** ![vanko25](https://avatars.discourse-cdn.com/v4/letter/v/a87d85/32.png) [@vanko25](https://forum.inductiveautomation.com/u/vanko25)\
**Post date:** [March 22, 2018, 9:35am UTC](https://forum.inductiveautomation.com/t/get-rid-of-date-in-x-axis-in-status-chart/17450/3 "2018-03-22T09:35:42Z")

</div>

Bfuson,

Sorry for not being clear I want to keep the X axis but get rid of the bit that shows the date.  
Like that:  
 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/0/0ad0c1899f829dd2a973a1406c8f4a477a61a694.png)  
Not like that:  
 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/b/b81734bfa68abfbb20b06bbc323c052920f6dd33.png)

I can get the code to work but it does trigger only if I hover over on the item.

---

<div class="post-metadata">

**Author:** ![mrogers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mrogers/32/4110_2.png) [@mrogers](https://forum.inductiveautomation.com/u/mrogers)\
**Post date:** [March 22, 2018, 4:55pm UTC](https://forum.inductiveautomation.com/t/get-rid-of-date-in-x-axis-in-status-chart/17450/4 "2018-03-22T16:55:25Z")

</div>

Are you trying to hide it and have the chart resize itself based on the new space? If not, and you just need to hide the text, try putting a rectangle with the same fill color as the background. Make sure the layout modes match and you should be good to go.

---

<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:** [November 12, 2018, 2:14pm UTC](https://forum.inductiveautomation.com/t/get-rid-of-date-in-x-axis-in-status-chart/17450/5 "2018-11-12T14:14:15Z")

</div>

I have been attempting to figure out the same thing, and your post has helped me get pretty close.

First if the data for the status chart is not updating then the data property will not change, so your code will not be executed.

In my particular case the status chart has a tag history binding with the polling mode set to relative and a polling rate set to 15 sec.

The first thing that I did was to add the needed script to the internalFrameActivated event on the window, again my particular case has multiple charts so my code is slightly different for that reason.

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/7/748e5a1110d350749c07dc2b8e6915075928cf0e.png)

The next thing I did was to add a similar script to the property change event of the status chart, but I filtered for data and propertiesLoading.

```auto
if event.propertyName in ['data','propertiesLoading']:
	axis = event.source.getChart().getPlot().getRangeAxis()
	axis.setDisplayDayInTitle(0)

```

This all seems a bit hacky to me, so I was wondering if you or anyone else had ever come up with a final (better) solution, as mine seems to work with the exception of the occasional flash of the date during a redraw event.

Thanks,

---

<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:** [November 14, 2018, 10:27pm UTC](https://forum.inductiveautomation.com/t/get-rid-of-date-in-x-axis-in-status-chart/17450/6 "2018-11-14T22:27:43Z")

</div>

Is there maybe some way to use jFreeChart to accomplish this? overriding the setDiplayDayInTitle property works but there is still something that is forcing a redraw which I can’t seem to catch.
