-
Notifications
You must be signed in to change notification settings - Fork 35
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
Bar chart incorrect history load #753
Comments
I'm suffering on the same issue. |
If You want, I have a "hacky" solution. But! note that this way, it refreshes the whole chart every time it gets a new value, so if You are using phone data and have a big chart with a fast refresh rate, it will chew your data out in no time. In the chart set series to key: bar and y to key: value. You can change those names obviously.
It is pretty self-explanatory, but in any case, the code stores all the chart data in context, and when a message arrives with a bar value, it finds its column, updates the value, saves it in context, and sends it to the chart. Btw. when setting the series to JSON, something similar happens - it always expects all the data and redraws the whole chart. |
@Martin12350 Yes: this is a kind of workaround But it happens also with line diagrams! |
I have also a cool proposition, but that should be probably in another thread. |
Current Behavior
When the page is refreshed and a bar chart loaded from history, it ignores the order of the bars.
On the start, I clear the chart and fill series with labels and values with zeros. When the appropriate series arrives, it correctly shows the value for the correct bar. However, when the page is refreshed, the bars are weirdly reordered.
NR.bar.chart.mp4
Expected Behavior
The order of bars should persist across refreshes.
Steps To Reproduce
Flow to reproduce
Test flow.json
Environment
Have you provided an initial effort estimate for this issue?
I am not a FlowFuse team member
The text was updated successfully, but these errors were encountered: