Makanz / chartjs-plugin-trendline

This plugin draws an linear trendline in your Chart. Made for Chart.js > 3.0
MIT License
84 stars 59 forks source link

New error: Failed to execute 'createLinearGradient' #69

Closed directos closed 2 years ago

directos commented 2 years ago

When use data: [0] in order to inicialize the chart ... New issue in all charts with trendlineLinear: Uncaught TypeError: Failed to execute 'createLinearGradient' on 'CanvasRenderingContext2D': The provided double value is non-finite. (at addFitter, chartjs-plugin-trendline.js:132:23)

Using:

Chart: . . . trendlineLinear: { colorMin: "red", colorMax: "green", lineStyle: "dotted", width: 1, projection: false } . . .

directos commented 2 years ago

Solved using data: [] Thanks!

nileshdev0707 commented 1 year ago

but it will remove line too