You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In case where the data array are filled with all zeros, Expected Number error will occurred:
Error: <path> attribute d: Expected number, "M4 NaN L 4 NaN L 29…"
Base on looking at the source, the Y coord of each datapoint is determined by the max values of datapoints. If data arrays are all 0, then you will run into a divide by zero scenario resulting in the above error.
// The maximum value. This is used to calculate the Y coord of
// each sparkline datapoint.
const max = Math.max(...values);
In case where the data array are filled with all zeros,
Expected Numbererror will occurred:Error: <path> attribute d: Expected number, "M4 NaN L 4 NaN L 29…"Base on looking at the source, the Y coord of each datapoint is determined by the max values of datapoints. If data arrays are all 0, then you will run into a divide by zero scenario resulting in the above error.