Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chart: Append/Replace Data Option #358

Closed
joepavitt opened this issue Nov 21, 2023 · 6 comments · Fixed by #474
Closed

Chart: Append/Replace Data Option #358

joepavitt opened this issue Nov 21, 2023 · 6 comments · Fixed by #474
Assignees
Labels
feature-request New feature or request that needs to be turned into Epic/Story details size:S - 2 Sizing estimation point

Comments

@joepavitt
Copy link
Collaborator

Description

By default, we assume that any newly received data into ui-chart should be appended to the existing data on the chart, however, in the case of showing API data for example, we may actually just want to replace the entire dataset with the newly received data.

Whilst this can be achieved by sending a [] msg to the chart to clear data, a lower-code approach would be to provide a configuration option on the chart itself which provided the option to "Append" or "Replace", maybe even being able to define this as a TypedInput, so that we can control it on a msg by msg basis.

Have you provided an initial effort estimate for this issue?

I have provided an initial effort estimate

@joepavitt joepavitt added needs-triage Needs looking at to decide what to do feature-request New feature or request that needs to be turned into Epic/Story details size:S - 2 Sizing estimation point and removed needs-triage Needs looking at to decide what to do labels Nov 21, 2023
@joepavitt
Copy link
Collaborator Author

@colinl
Copy link

colinl commented Nov 21, 2023

I think it may be more important that it is available as a msg property than as a config item. It is common to preload the chart with historical data and then add further data in real time.

@joepavitt
Copy link
Collaborator Author

Great point Colin. Node-RED's TypedInputs would allow for this. Example below of how we do this for defining the topic:

Screenshot 2023-11-21 at 09 52 26

@joepavitt
Copy link
Collaborator Author

This has now been requested by multiple people, bumping up the priority

@colin-grierson
Copy link

My thoughts as a very new Node-red dashboard user
We should have consistency

  • The chart and table nodes are inconsistent. Given a set of data, chart updates/appends while table replaces existing data
  • I think updating/appending is natural when each message contains one value, and replacing existing data is natural when a set of values are sent
    Having an explicit control in the configuration object is a great idea - it makes everything obvious
    Allowing control via message properties is also a great idea
    Ideally all controls should be able to be overridden via message properties
    Having controls that are only in the message properties is not so good as they are not obvious and it can be hard to find the option exists
    Why is the editor help so much different to the documentation at https://dashboard.flowfuse.com/nodes/XXXXXXXXX.html?
  • If it adds too much work to make this happen, how about a link in the editor help to go to the much more complete documentation at flowfuse.com?

I really appreciate what you guys are doing
Regards, Colin

@joepavitt
Copy link
Collaborator Author

The chart and table nodes are inconsistent. Given a set of data, chart updates/appends while table replaces existing data

Very good point - we could/should also have this feature added to table for consistency.

Why is the editor help so much different to the documentation at

Two reasons:

  1. The template for that help docs is a little more limited in terms of the content we can render (e.g. images, and general screen real estate) so we have to have mostly text-driven docs in-Editor.
  2. Laziness/Slack on my part where I often forget to update the in-Editor docs. I generally focus on the hosted docs as I can be considerably more verbose and descriptive with examples, etc. there.

If it adds too much work to make this happen, how about a link in the editor help to go to the much more complete documentation at flowfuse.com?

It's not too much, but definitely a laziness on my part. Linking to the online docs is a great idea though, but I do need to get the Editor help text updated, as Node-RED is regularly used in constrained environments where access to the general Internet isn't guaranteed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request that needs to be turned into Epic/Story details size:S - 2 Sizing estimation point
Projects
Status: Done
3 participants