# Time Series Chart Set Date Interval?

**URL:** <https://forum.inductiveautomation.com/t/time-series-chart-set-date-interval/21764>\
**Category:** Ignition\
**Created:** [January 9, 2019, 2:36pm UTC](https://forum.inductiveautomation.com/t/time-series-chart-set-date-interval/21764 "2019-01-09T14:36:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![uTewell](https://avatars.discourse-cdn.com/v4/letter/u/e274bd/32.png) [@uTewell](https://forum.inductiveautomation.com/u/uTewell)\
**Post date:** [January 9, 2019, 2:36pm UTC](https://forum.inductiveautomation.com/t/time-series-chart-set-date-interval/21764/1 "2019-01-09T14:36:17Z")

</div>

I am using a time series chart in a report I am designing. I am having an issuing trying to figure out how to use the jfreechart scripting.

If the user inputs a small enough date range then the time axis will display 12/10, 12/11, 12/11, 12/12, 12/12, …

I would like to set it so that there is only one day listed at a time.

If possible I would like to set it up so every tick actually correlates to the plotted point, but I will settle for getting the auto range to only display one day at a time.

Does anyone have any advice or help on this?

---

<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:** [January 9, 2019, 5:55pm UTC](https://forum.inductiveautomation.com/t/time-series-chart-set-date-interval/21764/2 "2019-01-09T17:55:08Z")

</div>

In your configureChart script, include the following:

```auto
	from org.jfree.chart import axis
		
	plot = chart.getPlot()
	plot_axis = plot.getDomainAxis()

	plot_axis.setTickUnit(axis.DateTickUnit(axis.DateTickUnit.DAY, 1))

```

For a small dataset of just 3 points this yielded the following chart:

![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/0/0add35fc3a267d0a8c6bb7202ac0d2c752999ef2.png)

It’s not perfect but it is closer!

---

<div class="post-metadata">

**Author:** ![uTewell](https://avatars.discourse-cdn.com/v4/letter/u/e274bd/32.png) [@uTewell](https://forum.inductiveautomation.com/u/uTewell)\
**Post date:** [January 9, 2019, 7:17pm UTC](https://forum.inductiveautomation.com/t/time-series-chart-set-date-interval/21764/3 "2019-01-09T19:17:28Z")

</div>

Thank you, That is exactly what I was trying to do.
