When the data array contains a single non-null value I get this error:
Uncaught TypeError: Failed to execute 'createLinearGradient' on 'CanvasRenderingContext2D': The provided double value is non-finite.
This also occurs if the data array is all null values.
When the data array contains a single non-null value I get this error:
Uncaught TypeError: Failed to execute 'createLinearGradient' on 'CanvasRenderingContext2D': The provided double value is non-finite.
This also occurs if the data array is all null values.
Please see code example here: https://codesandbox.io/s/working-trendline-forked-dm6z2x?file=/src/index.js
Thanks