-
Notifications
You must be signed in to change notification settings - Fork 76
Improve historical chart data management #1986
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
Improve historical chart data management #1986
Conversation
Steve-Mcl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved - with one comment suggestion
|
Hmmm, didn't spot the conflicts before. Can you please resolve them Colin so I can merge? |
|
Oh, that's not right, something is messed up. I will sort it. |
|
clearOldCategoricalPoints() in UIChart.vue could be removed completely, or do you prefer to keep an empty function in for clarity? |
|
After some discussion with Colin, this PR will become a general "Improve historical chart data management" aimed at the inefficiencies and slow downs witnessed in charts. 1 quick win - short circuit the logic in For this reason, I will retract approval until the above are implemented. |
|
I have run some tests and it still seems to work ok. |
|
Happy to merge - will follow up with the maxPoint pruning improvements in a new PR |

Description
Currently, for charts of xAxis type category, old data points are never deleted server side, so this eventually clogs everything up. See #1977.
This corrects that issue, only keeping one data point for each category in each series, for charts of xAxis type category, except for histogram charts, where all points must be kept.
In addition there are some efficiency improvements related to pruning of old data from the chart.
However, client side, the chart itself discards all except the latest values for category charts, so there appears to be nothing to do client side.
However, looking at the equivalent code for time based xAxis I see that it ends with
I don't fully understand what this is for, so don't know if anything similar is necessary in the categorical case. The PR has an empty function for the client side. If nothing is required then this, and the call, can be removed.
Related Issue(s)
Closes #1977
Checklist
flowforge.yml?FlowFuse/helmto update ConfigMap TemplateFlowFuse/CloudProjectto update values for Staging/ProductionLabels
area:migrationlabel