# Dasboard-ui chart x-axis shows only last few samples

**URL:** <https://discourse.nodered.org/t/dasboard-ui-chart-x-axis-shows-only-last-few-samples/60238>\
**Category:** Dashboard\
**Created:** [23 March 2022 12:30 UTC](https://discourse.nodered.org/t/dasboard-ui-chart-x-axis-shows-only-last-few-samples/60238 "2022-03-23T12:30:53Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![gdanov](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gdanov/32/58951_2.png) [@gdanov](https://discourse.nodered.org/u/gdanov)\
**Post date:** [23 March 2022 12:30 UTC](https://discourse.nodered.org/t/dasboard-ui-chart-x-axis-shows-only-last-few-samples/60238/1 "2022-03-23T12:30:53Z")

</div>

I have basic line chart connected directly to mqtt topic. The chart is configured to show last 3 minutes or 900 points (the topic gets 5 messages per second).

Sometimes the chart works as expected, sometimes it shows only last 5-10 samples and I can't figure out the pattern. Clearing local browser storage does not help.

---

<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:** [23 March 2022 12:39 UTC](https://discourse.nodered.org/t/dasboard-ui-chart-x-axis-shows-only-last-few-samples/60238/2 "2022-03-23T12:39:06Z")

</div>

Hi @gdanov

What version of Node-red and Dashboard do you have?  
It's probably a good idea for you to show us a snapshot of your screen, a sample of the data and an export of the flow.

---

<div class="post-metadata">

**Author:** ![gdanov](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gdanov/32/58951_2.png) [@gdanov](https://discourse.nodered.org/u/gdanov)\
**Post date:** [23 March 2022 13:04 UTC](https://discourse.nodered.org/t/dasboard-ui-chart-x-axis-shows-only-last-few-samples/60238/3 "2022-03-23T13:04:21Z")

</div>

here are the versions

> Mar 23 13:56:35 pizerow Node-RED[5197]: 23 Mar 13:56:35 - [info] Node-RED version: v2.2.2  
> Mar 23 13:56:35 pizerow Node-RED[5197]: 23 Mar 13:56:35 - [info] Node.js version: v12.22.5  
> Mar 23 13:56:35 pizerow Node-RED[5197]: 23 Mar 13:56:35 - [info] Linux 5.10.92-v8+ arm64 LE  
> Mar 23 13:56:38 pizerow Node-RED[5197]: 23 Mar 13:56:38 - [info] Loading palette nodes  
> Mar 23 13:56:44 pizerow Node-RED[5197]: 23 Mar 13:56:44 - [info] Dashboard version 3.1.6 started at /ui

The UI looks like this, note the second chart x axis

[[Album] imgur.com ![](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/4/24d1a1d11e510063ce8e099c9584ab3375d4758c.jpeg "imgur.com") ](https://imgur.com/a/PyMl7NL)

data is stream of numbers, don't thin it has anything to do with the problem.

---

<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:** [23 March 2022 14:03 UTC](https://discourse.nodered.org/t/dasboard-ui-chart-x-axis-shows-only-last-few-samples/60238/4 "2022-03-23T14:03:12Z")

</div>

Hmm. Well it certainly only shows 10 discrete values over 2 minutes, which should be 600 data points.  
Were there 600 data points in that period?

I wonder if it would make a difference if you experimentally add a small random number to each value, maybe between 0 and 0.1 just to make the data a bit more spikey.

---

<div class="post-metadata">

**Author:** ![gdanov](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gdanov/32/58951_2.png) [@gdanov](https://discourse.nodered.org/u/gdanov)\
**Post date:** [23 March 2022 15:02 UTC](https://discourse.nodered.org/t/dasboard-ui-chart-x-axis-shows-only-last-few-samples/60238/5 "2022-03-23T15:02:08Z")

</div>

I'm looking at the dashboard from several devices simultaneously. some work some not. This is ipad for example. I'd really appreciate if people who have no idea what could be the problem skip questioning basic things.

BTW the image preview shows a working chart. You need to click on the image to see the broken one at the bottom. Values are all zero, yes, but come in at 5Hz, guaranteed, checked and verified.

---

<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:** [23 March 2022 15:34 UTC](https://discourse.nodered.org/t/dasboard-ui-chart-x-axis-shows-only-last-few-samples/60238/6 "2022-03-23T15:34:59Z")

</div>

> I'd really appreciate if people who have no idea what could be the problem skip questioning basic things

I'm really sorry for trying to help you. I shan't do it again.

---

<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:** [23 March 2022 15:39 UTC](https://discourse.nodered.org/t/dasboard-ui-chart-x-axis-shows-only-last-few-samples/60238/7 "2022-03-23T15:39:12Z")

</div>

> [@gdanov](#):
>
> I'd really appreciate if people who have no idea what could be the problem skip questioning basic things.

You won't get very far if you respond to one of the key helpers on this forum in that manner.

> [@gdanov](#):
>
> I'm looking at the dashboard from several devices simultaneously. some work some not.

It would have helped if you had told us that in the first place as it immediately says it is not a fundamental problem with the flows.

> [@gdanov](#):
>
> Sometimes the chart works as expected

That suggests that it changes over time, rather than across devices or browsers. Which is it? To paraphrase your comment, I'd really appreciate if people who are asking questions would make sure they provide all the basic facts in a non-ambiguous way.

What do you see in the browser developer console when it is failing?

---

<div class="post-metadata">

**Author:** ![gdanov](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gdanov/32/58951_2.png) [@gdanov](https://discourse.nodered.org/u/gdanov)\
**Post date:** [23 March 2022 19:46 UTC](https://discourse.nodered.org/t/dasboard-ui-chart-x-axis-shows-only-last-few-samples/60238/8 "2022-03-23T19:46:16Z")

</div>

I expected people that have understanding how the chart works to give pointers where to look for the problem. Instead I get people stabbing in the dark and moralizing me. I could just as well read the code and not waste time here.

---

<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:** [23 March 2022 20:50 UTC](https://discourse.nodered.org/t/dasboard-ui-chart-x-axis-shows-only-last-few-samples/60238/9 "2022-03-23T20:50:06Z")

</div>

It is difficult to point to where the problem might be if you won't clarify exactly what the symptom is and don't respond to requests for further information.  
Once you have worked out what the cause is please do feed back what you find so it can be improved.

---

<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:** [22 April 2022 20:50 UTC](https://discourse.nodered.org/t/dasboard-ui-chart-x-axis-shows-only-last-few-samples/60238/10 "2022-04-22T20:50:36Z")

</div>

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