# DB2: chart.js chart cleared on changing tabs

**URL:** <https://discourse.nodered.org/t/db2-chart-js-chart-cleared-on-changing-tabs/98610>\
**Category:** Dashboard\
**Tags:** dashboard-2\
**Created:** [11 August 2025 21:02 UTC](https://discourse.nodered.org/t/db2-chart-js-chart-cleared-on-changing-tabs/98610 "2025-08-11T21:02:19Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [13 August 2025 12:07 UTC](https://discourse.nodered.org/t/db2-chart-js-chart-cleared-on-changing-tabs/98610/13 "2025-08-13T12:07:06Z")

</div>

Then you could try this instead:

```auto
mounted(){
   this.onInput(this.msg.payload)
   this.$nextTick(() => {
      this.updateChart() 
    });
}

```

Then again, there is a mess of vuetify here as well. The setTimeout (not setInterval as that will keep spawning) within the nextTick callback could then work. It is messy.

---

_[View the full topic](https://discourse.nodered.org/t/db2-chart-js-chart-cleared-on-changing-tabs/98610)._
