# Clearing a chart?:

**URL:** <https://discourse.nodered.org/t/clearing-a-chart/29801>\
**Category:** General\
**Created:** [9 July 2020 17:42 UTC](https://discourse.nodered.org/t/clearing-a-chart/29801 "2020-07-09T17:42:01Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nodi.Rubrum](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nodi.rubrum/32/107482_2.png) [@Nodi.Rubrum](https://discourse.nodered.org/u/Nodi.Rubrum)\
**Post date:** [9 July 2020 17:42 UTC](https://discourse.nodered.org/t/clearing-a-chart/29801/1 "2020-07-09T17:42:02Z")

</div>

Did 1.1.1 release change how to empty a chart node? I sent a empty JSON array, only pushes a null point to chart. I sent empty string payload pushes a null point to the chart? Something change?

---

<div class="post-metadata">

**Author:** ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)\
**Post date:** [9 July 2020 17:56 UTC](https://discourse.nodered.org/t/clearing-a-chart/29801/2 "2020-07-09T17:56:47Z")

</div>

Empty array should clear the chart.

---

<div class="post-metadata">

**Author:** ![Nodi.Rubrum](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nodi.rubrum/32/107482_2.png) [@Nodi.Rubrum](https://discourse.nodered.org/u/Nodi.Rubrum)\
**Post date:** [9 July 2020 18:15 UTC](https://discourse.nodered.org/t/clearing-a-chart/29801/3 "2020-07-09T18:15:05Z")

</div>

Set payload type to JSON and then '[]' right? An empty JSON array? I recreated the change node, tried again, that works now. Thanks.

---

<div class="post-metadata">

**Author:** ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)\
**Post date:** [9 July 2020 18:30 UTC](https://discourse.nodered.org/t/clearing-a-chart/29801/4 "2020-07-09T18:30:14Z")

</div>

It is already written in the node info. Now it is written again...in a new thread

---

<div class="post-metadata">

**Author:** ![Nodi.Rubrum](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nodi.rubrum/32/107482_2.png) [@Nodi.Rubrum](https://discourse.nodered.org/u/Nodi.Rubrum)\
**Post date:** [9 July 2020 18:32 UTC](https://discourse.nodered.org/t/clearing-a-chart/29801/5 "2020-07-09T18:32:21Z")

</div>

I was asking if something had changed. Because the first two or three times I ran my flow, it cleared just a point, not the entire chart. I redid the change node, and issue resolved.

---

<div class="post-metadata">

**Author:** ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)\
**Post date:** [9 July 2020 18:36 UTC](https://discourse.nodered.org/t/clearing-a-chart/29801/6 "2020-07-09T18:36:23Z")

</div>

Always, always, always, first suspect your own code if things are not working. My own experience 😉

---

<div class="post-metadata">

**Author:** ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)\
**Post date:** [9 July 2020 18:42 UTC](https://discourse.nodered.org/t/clearing-a-chart/29801/7 "2020-07-09T18:42:27Z")

</div>

It may depend your flow. If you have multiple branches going into the chart, the outcome may freely become strange. But not wrong. By knowing anything about your flow can't say more.

---

<div class="post-metadata">

**Author:** ![Nodi.Rubrum](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nodi.rubrum/32/107482_2.png) [@Nodi.Rubrum](https://discourse.nodered.org/u/Nodi.Rubrum)\
**Post date:** [9 July 2020 23:08 UTC](https://discourse.nodered.org/t/clearing-a-chart/29801/8 "2020-07-09T23:08:21Z")

</div>

Likely you are right, I two flows that end at updating the same table, if flow 1 is consistent, it clears the table before flow 2 updates the table. The table is cleared to avoid operator seeing old data that might be misleading, until flow 2 updates the table. I redesigned the flows such that I now get consistent sequence (timing). Been testing for a while, so far so good.

---

<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:** [23 July 2020 23:08 UTC](https://discourse.nodered.org/t/clearing-a-chart/29801/9 "2020-07-23T23:08:28Z")

</div>

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