# Stop Chart at certain time

**URL:** <https://discourse.nodered.org/t/stop-chart-at-certain-time/77069>\
**Category:** General\
**Created:** [29 March 2023 21:22 UTC](https://discourse.nodered.org/t/stop-chart-at-certain-time/77069 "2023-03-29T21:22:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andre7tyone](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andre7tyone/32/77055_2.png) [@Andre7tyone](https://discourse.nodered.org/u/Andre7tyone)\
**Post date:** [29 March 2023 21:22 UTC](https://discourse.nodered.org/t/stop-chart-at-certain-time/77069/1 "2023-03-29T21:22:05Z")

</div>

I want to stop the chart node to go on, because at a certain time of the day there are no more data to display. I already searched for a solution, but withou success.

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [29 March 2023 22:46 UTC](https://discourse.nodered.org/t/stop-chart-at-certain-time/77069/2 "2023-03-29T22:46:45Z")

</div>

If you stop sending live data to the chart, it should remain static. Unfortunately, if you refresh the page, the x axis catches up with the missed time.  
 ![Untitled 1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/f/cfb5d3fb18a66c075a9a48cfdfee3b8edde89f02.jpeg)  
 ![Untitled 2](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/b/bbf70b05021085dfac51fe8b3c7cb10284d674ba.jpeg)

To avoid that I would accumulate the data as x,y points (x = timestamp, y = sensor data) in a flow context variable and draw the chart from that. It might be best to redraw the graph less frequently than the sensor data, depending how often it arrives.

---

<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:** [28 May 2023 22:47 UTC](https://discourse.nodered.org/t/stop-chart-at-certain-time/77069/3 "2023-05-28T22:47:39Z")

</div>

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