# Clearing chart problem

**URL:** <https://discourse.nodered.org/t/clearing-chart-problem/89734>\
**Category:** Dashboard\
**Created:** [24 July 2024 18:37 UTC](https://discourse.nodered.org/t/clearing-chart-problem/89734 "2024-07-24T18:37:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![xfear1](https://avatars.discourse-cdn.com/v4/letter/x/4da419/32.png) [@xfear1](https://discourse.nodered.org/u/xfear1)\
**Post date:** [24 July 2024 18:37 UTC](https://discourse.nodered.org/t/clearing-chart-problem/89734/1 "2024-07-24T18:37:12Z")

</div>

Hello!  
I want to clear my chart at midnight, how can I do that?  
I saw there is a command in the chart help saying this:

Inputting a `msg.payload` containing a blank array `[]` will clear the chart.

But I am kind of new with node-red and don't know how to do it. Can anyone help me?

---

<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:** [24 July 2024 18:40 UTC](https://discourse.nodered.org/t/clearing-chart-problem/89734/2 "2024-07-24T18:40:20Z")

</div>

An inject node can be set to inject at a specific time. To inject an empty array use the JSON inject format with `[]` in the field.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/d/0de65350cb03cb5ea2c535a3c792ac5405ff7c70.png)

---

<div class="post-metadata">

**Author:** ![xfear1](https://avatars.discourse-cdn.com/v4/letter/x/4da419/32.png) [@xfear1](https://discourse.nodered.org/u/xfear1)\
**Post date:** [24 July 2024 19:10 UTC](https://discourse.nodered.org/t/clearing-chart-problem/89734/3 "2024-07-24T19:10:21Z")

</div>

It did work, thank you!

---

<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:** [7 August 2024 19:10 UTC](https://discourse.nodered.org/t/clearing-chart-problem/89734/4 "2024-08-07T19:10:50Z")

</div>

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