chartjs-plugin-trendline icon indicating copy to clipboard operation
chartjs-plugin-trendline copied to clipboard

Error when there is less than two non-null values

Open jasmine-q opened this issue 2 years ago • 1 comments

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

jasmine-q avatar Oct 04 '23 08:10 jasmine-q

Please try the latest version 2.1.0

Makanz avatar Jan 22 '24 20:01 Makanz