# Classic Chart X-Axis always show date not time

**URL:** <https://forum.inductiveautomation.com/t/classic-chart-x-axis-always-show-date-not-time/72874>\
**Category:** Ignition\
**Tags:** vision, ignition81\
**Created:** [April 25, 2023, 1:48pm UTC](https://forum.inductiveautomation.com/t/classic-chart-x-axis-always-show-date-not-time/72874 "2023-04-25T13:48:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bwhite](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bwhite/32/7112_2.png) [@bwhite](https://forum.inductiveautomation.com/u/bwhite)\
**Post date:** [April 25, 2023, 1:48pm UTC](https://forum.inductiveautomation.com/t/classic-chart-x-axis-always-show-date-not-time/72874/1 "2023-04-25T13:48:59Z")

</div>

I have a classic chart that gets its data from a named query. The query consolidates the data by day. Therefore, I always want to show the date on the X-axis on the chart. However, I still want auto scaling because the user can change the dates. Is there a way to make the classic chart always show days in the X-Axis and not show time?

---

<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:** [April 26, 2023, 4:09am UTC](https://forum.inductiveautomation.com/t/classic-chart-x-axis-always-show-date-not-time/72874/2 "2023-04-26T04:09:59Z")

</div>

You could achieve this by adding the following override to your configure chart extension function:

```auto
#def configureChart(self, chart):
	from java.text import SimpleDateFormat
	domainAxis = chart.plot.domainAxis
	dateFormat = SimpleDateFormat("MM/dd/yyyy") #modify as needed
	domainAxis.setDateFormatOverride(dateFormat)

```

---

<div class="post-metadata">

**Author:** ![bwhite](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bwhite/32/7112_2.png) [@bwhite](https://forum.inductiveautomation.com/u/bwhite)\
**Post date:** [April 26, 2023, 12:19pm UTC](https://forum.inductiveautomation.com/t/classic-chart-x-axis-always-show-date-not-time/72874/3 "2023-04-26T12:19:37Z")

</div>

That was perfect! Thank you. I was looking at the org.jfree.chart details all day yesterday and couldn't quite get it figured out!
