# How to align the time in different charts in one dashboard?

**URL:** <https://discourse.nodered.org/t/how-to-align-the-time-in-different-charts-in-one-dashboard/28860>\
**Category:** General\
**Created:** [24 June 2020 05:54 UTC](https://discourse.nodered.org/t/how-to-align-the-time-in-different-charts-in-one-dashboard/28860 "2020-06-24T05:54:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![AK51](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ak51/32/8438_2.png) [@AK51](https://discourse.nodered.org/u/AK51)\
**Post date:** [24 June 2020 05:54 UTC](https://discourse.nodered.org/t/how-to-align-the-time-in-different-charts-in-one-dashboard/28860/1 "2020-06-24T05:54:33Z")

</div>

Hi,  
I have data in several MYSQL tables. when I get the data out and plot to the charts, because the Timestamp in each table are not the same, the starting time and range are not the same.  
e.g.  
newMsg.topic = "SELECT \* from table1 where Time \> '" + newTime + "' LIMIT 2000;";  
newMsg.topic = "SELECT \* from table2 where Time \> '" + newTime + "' LIMIT 2000;";  
Is there any way I can align the time of all chart? Thx ![chart](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/0/e0758c39b1fabb8face3978ef354fa3b1dfd8f5b.jpeg)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [24 June 2020 07:45 UTC](https://discourse.nodered.org/t/how-to-align-the-time-in-different-charts-in-one-dashboard/28860/2 "2020-06-24T07:45:46Z")

</div>

I haven't tried it, but if you add an extra sample to the end of the one that is behind, with a timestamp the same as the last one from the other chart then that will align the right hand sides. If you use a value of null then it won't actually draw the line to the end. Similarly you can do the same for left hand end by adding a null sample on the front.  
As I said I haven't tried it but worth a go.

---

<div class="post-metadata">

**Author:** ![AK51](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ak51/32/8438_2.png) [@AK51](https://discourse.nodered.org/u/AK51)\
**Post date:** [26 June 2020 06:13 UTC](https://discourse.nodered.org/t/how-to-align-the-time-in-different-charts-in-one-dashboard/28860/3 "2020-06-26T06:13:19Z")

</div>

Thx but... Making fake data seems not right... 'Coz a line would be drawn to/from the fake points too.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [26 June 2020 06:33 UTC](https://discourse.nodered.org/t/how-to-align-the-time-in-different-charts-in-one-dashboard/28860/4 "2020-06-26T06:33:07Z")

</div>

Not if the fake data is null

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [25 August 2020 06:33 UTC](https://discourse.nodered.org/t/how-to-align-the-time-in-different-charts-in-one-dashboard/28860/5 "2020-08-25T06:33:12Z")

</div>

Closed on 25 August 2020 06:33 UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
