# \[Announce\] node-red-contrib-ui-state-trail 0.2.0

**URL:** <https://discourse.nodered.org/t/announce-node-red-contrib-ui-state-trail-0-2-0/21418>\
**Category:** Share Your Nodes\
**Created:** [8 February 2020 12:14 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-ui-state-trail-0-2-0/21418 "2020-02-08T12:14:56Z")\
**Posts on this page:** 5\
**Page:** 1

<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:** [8 February 2020 12:14 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-ui-state-trail-0-2-0/21418/1 "2020-02-08T12:14:56Z")

</div>

A little step forward with [node-red-contrib-ui-state-trail](https://flows.nodered.org/node/node-red-contrib-ui-state-trail)  
Version **0.2.0**

Now the node has the output and you can click on the graph to get information about the clicked state. Output message also contains coordinates of the click so you can use [node-red-contrib-ui-contextmenu](https://flows.nodered.org/node/node-red-contrib-ui-contextmenu) to build advanced interactive flows with dashboard.

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

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [8 February 2020 21:24 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-ui-state-trail-0-2-0/21418/2 "2020-02-08T21:24:22Z")

</div>

Hi @hotNipi,

Thank you for implementing my entire wishlist in your free time!  
This is already one of my favorite nodes ...

Some remarks:

- The output message doesn't contain the click coordinates. Is that functionality not available yet on NPM?

- The output message contains starttime and duration. Perhaps also calculate and send the endtime? Although that is redundant information, it might in some cases help in reducing the number of other nodes that are required. E.g. in the mp4 list (see example below), I could very easily get the clicked mp4 file when I have both start and end timestamps...

- Currently the value always needs to be send in the msg.payload. Doesn't it make sense that this information could be delivered as msg.topic?

- Could you please explain how the 'Ticks' field can be used?

- Currently an empty array can be send to remove all data. But it would be nice if we could also send a non-empty array. For example for my camera's, I assume I need to display a calendar. As soon as I select a day, then I need to search for all recordings from that day on my disc:

- Suppose my widget displays an interval of 6 hours. Then I add two buttons to show the previous/next hour of video recordings:

- Can the '_period_' become dynamically adjustable via the input message somehow. E.g. when I select a full day of recordings in my calendar or only a single hour. Then I assume I have to adjust dynamically the period of your widget? Or not?

Thanks again!!  
Bart

---

<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 February 2020 11:31 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-ui-state-trail-0-2-0/21418/3 "2020-02-09T11:31:21Z")

</div>

> [@BartButenaers](#):
>
> The output message doesn't contain the click coordinates.

The coordinates are not part of `msg.payload`. Debug complete `msg` object  
If there is nothing then it is a bug.  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/8/78175e01cc0345714a8b08ac9244d09eea70c8f5.png)

> [@BartButenaers](#):
>
> Perhaps also calculate and send the endtime?

Can be done.

> [@BartButenaers](#):
>
> Currently the value always needs to be send in the msg.payload. Doesn't it make sense that this information could be delivered as msg.topic?

Can't see currently any practical use of topic.

> [@BartButenaers](#):
>
> Could you please explain how the 'Ticks' field can be used?

You can configure how many ticks the widget shows. Ticks are distributed evenly along the timeline. The value of each tick is time of that point in timeline.  
The timeline is always with same width but time scales. It scales until the oldest data is near to limit. Left most tick does not show the limit value but start time of the oldest record.

I think it may be possible to add option for fixed time.

> [@BartButenaers](#):
>
> Currently an empty array can be send to remove all data. But it would be nice if we could also send a non-empty array.

Can be done.  
I think the following logic - If data is sent in array, the current set of data will be removed. If data is single value or object then it will be added to current data.

> [@BartButenaers](#):
>
> Can the ' _period_ ' become dynamically adjustable via the input message somehow.

Can be done. Probably via `msg.control.period = value`

---

<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:** [10 February 2020 15:59 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-ui-state-trail-0-2-0/21418/4 "2020-02-10T15:59:25Z")

</div>

Version **0.2.1**

Includes:

- dynamically adjustable **period**
- historical data can be feed in array
- output payload contains the **end** property ( **time** property renamed to **timestamp** )

---

<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:** [8 April 2020 12:15 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-ui-state-trail-0-2-0/21418/5 "2020-04-08T12:15:12Z")

</div>

This topic was automatically closed after 60 days. New replies are no longer allowed.
