FlowFuse / FlowFuse/node-red-dashboard
chart-UI graphing error if X-Axis data point limit > 50% of available data points
- Dominant language
- HTML
- Stars
- 355
- Forks
- 82
- Avg merge
- 4d 23h
- Merged PRs (30d)
- 24
Description
### Current Behavior
Charts appear to have a straight line joining the first and last datapoints if the X Axis limit value for points is more than half of the available points.

Graph above with database query returning 100 data points, and the X Axis limit set to 2 Days or 51 points.

Graph above with database query returning 100 data points, and the X Axis limit set to 2 Days or 50 points.

Graph above with database query returning 3200 data points, and the X Axis limit set to 2 Days or 1601 points.

Graph above with database query returning 3200 data points, and the X Axis limit set to 2 Days or 1600 points.
### Expected Behavior
Chart should not have a straight line joining the first and last datapoints unless there are only 2 datapoints.
### Steps To Reproduce
Write a query to generate some data from a database, in that query apply a limit of any figure.
On the chart X axis limit, set the Or number of datapoints to be (the query limit/2) +1
OR any point limit of more than half of the datapoints available
eg

Graph above with database query returning 100 data points, and the X Axis limit set to 2 Days or 51 points.

Graph above with database query returning 100 data points, and the X Axis limit set to 2 Days or 50 points.

Graph above with database query returning 3200 data points, and the X Axis limit set to 2 Days or 1601 points.

Graph above with database query returning 3200 data points, and the X Axis limit set to 2 Days or 1600 points.
### Environment
- Dashboard version:2.0 (1.16)
- Node-RED version:4.02
- Node.js version: v20.17.0
- npm version:10.8.2
- Platform/OS: Linux/Debian
- Browser: Firefox
### Have you provided an initial effort estimate for this issue?
I have provided an initial effort estimate
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.