# Basic Chart X Axis Date range

**URL:** <https://forum.inductiveautomation.com/t/basic-chart-x-axis-date-range/14802>\
**Category:** Ignition\
**Created:** [July 16, 2017, 5:37pm UTC](https://forum.inductiveautomation.com/t/basic-chart-x-axis-date-range/14802 "2017-07-16T17:37:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bellm](https://avatars.discourse-cdn.com/v4/letter/b/b5e925/32.png) [@bellm](https://forum.inductiveautomation.com/u/bellm)\
**Post date:** [July 16, 2017, 5:37pm UTC](https://forum.inductiveautomation.com/t/basic-chart-x-axis-date-range/14802/1 "2017-07-16T17:37:59Z")

</div>

I have looked all over the forums and haven’t quite found what I need. I am need to using charts and have been beating my head against the wall on how to dynamically change the date range of the X-Axis. I can do it for the Y-Axis just not the X. Any suggestions?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [July 16, 2017, 8:21pm UTC](https://forum.inductiveautomation.com/t/basic-chart-x-axis-date-range/14802/2 "2017-07-16T20:21:18Z")

</div>

Basic chart expect the first column of each dataset to have timestamps in either java.util.Date format or raw milliseconds. The X-axis will automatically span the smallest and largest timestamp present in any of these datasets. I don’t believe you can override that.  
You probably should pull the data you need into a custom dataset property of a parent or sibling component and then construct the final datasets with the time frame you wish. The [view()](https://www.automation-pros.com/simaids/doc/index.html) expression function in the [Simulation Aids](https://inductiveautomation.com/moduleshowcase/module/automation-professionals-llc-simulation-aids) module can help you do this.  
If you need more sophisticated caching of large time series, consider the [Time Series Database Cache](https://inductiveautomation.com/moduleshowcase/module/automation-professionals-llc-time-series-database-cache) module.

---

<div class="post-metadata">

**Author:** ![R.Alamsha](https://avatars.discourse-cdn.com/v4/letter/r/e5b9ba/32.png) [@R.Alamsha](https://forum.inductiveautomation.com/u/R.Alamsha)\
**Post date:** [July 17, 2017, 5:32am UTC](https://forum.inductiveautomation.com/t/basic-chart-x-axis-date-range/14802/3 "2017-07-17T05:32:39Z")

</div>

Check out this plnkr app. Hope it helps.

> **[Dynamic - Angularjs Smart Table + Chart JS + JSON Integration. - Plunker](https://embed.plnkr.co/t4zrqz5irrhqwn0DFN1f/)**
>
> Created on Plnkr: Helping developers build the web.
