# Show productivity in chart

**URL:** <https://discourse.nodered.org/t/show-productivity-in-chart/89623>\
**Category:** Dashboard\
**Tags:** dashboard-2\
**Created:** [19 July 2024 09:08 UTC](https://discourse.nodered.org/t/show-productivity-in-chart/89623 "2024-07-19T09:08:04Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikahaller](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@mikahaller](https://discourse.nodered.org/u/mikahaller)\
**Post date:** [19 July 2024 09:08 UTC](https://discourse.nodered.org/t/show-productivity-in-chart/89623/1 "2024-07-19T09:08:04Z")

</div>

What's the best possibility to show productivity of an input (1/0 or True/False) in a chart in DB2. For DB1 there was a [ui-state-trail](https://flows.nodered.org/node/node-red-contrib-ui-state-trail) which would be perfect.  
Any ideas/workarounds?  
Im quite new to node red and have no exp with java script, so happy for detailed solutions.  
@joepavitt here is your marking!

---

<div class="post-metadata">

**Author:** ![joepavitt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/joepavitt/32/59722_2.png) [@joepavitt](https://discourse.nodered.org/u/joepavitt)\
**Post date:** [19 July 2024 09:55 UTC](https://discourse.nodered.org/t/show-productivity-in-chart/89623/2 "2024-07-19T09:55:50Z")

</div>

Thanks @mikahaller - just to be sure, they kind of data you have here would be something like an array of objects like:

```auto
[{
    date: "<date-here>",
    state: 1/0
}, ...]

```

---

<div class="post-metadata">

**Author:** ![joepavitt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/joepavitt/32/59722_2.png) [@joepavitt](https://discourse.nodered.org/u/joepavitt)\
**Post date:** [19 July 2024 09:56 UTC](https://discourse.nodered.org/t/show-productivity-in-chart/89623/3 "2024-07-19T09:56:54Z")

</div>

or, are they just entries without a timestamp, i.e. `[0, 1, 1, 1, 0]`?

---

<div class="post-metadata">

**Author:** ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)\
**Post date:** [19 July 2024 10:16 UTC](https://discourse.nodered.org/t/show-productivity-in-chart/89623/4 "2024-07-19T10:16:33Z")

</div>

I am eagerly waiting for @hotNipi to consider making this for DB2. one of my whole project depends on this. I am stalling moving from DB1 to DB2 just for this reason.

---

<div class="post-metadata">

**Author:** ![mikahaller](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@mikahaller](https://discourse.nodered.org/u/mikahaller)\
**Post date:** [19 July 2024 10:32 UTC](https://discourse.nodered.org/t/show-productivity-in-chart/89623/5 "2024-07-19T10:32:13Z")

</div>

They are just entries as integers (Int16). Time is "given" by software at "arriving". I'm no specialist so i don't know the vocabulary but i think you get it 😃

---

<div class="post-metadata">

**Author:** ![joepavitt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/joepavitt/32/59722_2.png) [@joepavitt](https://discourse.nodered.org/u/joepavitt)\
**Post date:** [19 July 2024 10:47 UTC](https://discourse.nodered.org/t/show-productivity-in-chart/89623/6 "2024-07-19T10:47:44Z")

</div>

Yep, I got it, so, between two points - does that time _matter_? i.e. does it need to be visualised at all? Or could we just visualise the state, and ignore the timestamps?

---

<div class="post-metadata">

**Author:** ![mikahaller](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@mikahaller](https://discourse.nodered.org/u/mikahaller)\
**Post date:** [19 July 2024 11:11 UTC](https://discourse.nodered.org/t/show-productivity-in-chart/89623/7 "2024-07-19T11:11:03Z")

</div>

yeah, it matters! But i don't need to see how much time a status held on, but it needs to be visualised.  
but it wouldnt need to check regularly, it can "just" be that it reacts to changes. If theres a "1" or "True" it is green, and it is green until there is a "0" or "False". Then it becomes red, until input is "1" or "True" again. And so on. See picture for example how it would be perfect.  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/2/e27c8c98128e3a01cbc6d0489693e347c57385b2.png)  
hope i could explain it?

---

<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:** [18 August 2024 11:11 UTC](https://discourse.nodered.org/t/show-productivity-in-chart/89623/8 "2024-08-18T11:11:09Z")

</div>

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