[XYChart] incorrect spacing between data points #5555
Labels
Status: Triage
Needs to be verified, categorized, etc
Type: Bug / Error
Something isn't working or is incorrect
Description
When using the XYChart in combination with a numeric range for the x-axis, the distance between the individual data points is not always correct. This leads to the data being distorted in an unpredictable way and data points on the right hand side of the diagram to be cut off.
Steps to reproduce
Copy the code sample below or create a XYChart with a numeric range where$\text{max} - \text{min} + 1 \ne \text{number of data points}$ .
Screenshots
Code Sample
Setup
Suggested Solutions
Change
const step = (max - min + 1) / data.length;
in xychartDb.ts toconst step = (max - min) / (data.length - 1);
.Additional Context
No response
The text was updated successfully, but these errors were encountered: