# Ui\_template doesn't show old data

**URL:** <https://discourse.nodered.org/t/ui-template-doesnt-show-old-data/30932>\
**Category:** Dashboard\
**Created:** [30 July 2020 14:58 UTC](https://discourse.nodered.org/t/ui-template-doesnt-show-old-data/30932 "2020-07-30T14:58:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [30 July 2020 14:58 UTC](https://discourse.nodered.org/t/ui-template-doesnt-show-old-data/30932/1 "2020-07-30T14:58:36Z")

</div>

I've been playing with Plotly once more, and now managed to draw a chart using a ui\_template node which accepts injected random numbers being fed into it, and ensures that older datapoints are removed (I can set the number of datapoints in plot), pretty much like the ui\_chart (chart.js) node does.  
But, whenever the browser initially connects, or the browser is refreshed, the chart clears & starts printing datapoints from that point onwards, and all of the preceding data is not shown.  
I can understand why that should happen within a ui\_template node, but is there a way around it?

 ![chart](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/7/171cf8bd4f8a8d63de96772e60b11ee585bb6720.gif)

---

<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:** [31 July 2020 08:34 UTC](https://discourse.nodered.org/t/ui-template-doesnt-show-old-data/30932/2 "2020-07-31T08:34:32Z")

</div>

the template can optionally save the last date sent to it... but for a chart that is tricky as that means you would have to either send all the data a one blob - so that it has all the data to re-plot - or you have to cache the data points yourself and resend them on a reconnection.

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [30 August 2020 08:34 UTC](https://discourse.nodered.org/t/ui-template-doesnt-show-old-data/30932/3 "2020-08-30T08:34:36Z")

</div>

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