chartjs-node icon indicating copy to clipboard operation
chartjs-node copied to clipboard

Expose CanvasGradient and CanvasPattern

Open kfitzgerald opened this issue 7 years ago • 1 comments

Greetings,

I got some fatal errors when generating a line chart. Seems as though chart.js expected CanvasGradient to exist globally, but it wasn't. It also appears that chart.js hasn't bothered exporting this until the (currently unreleased) 2.x branch.

This PR adds CanvasCradient and CanvasPattern to global as well. Haven't seen any crashes since.

Thanks, -Kevin

kfitzgerald avatar Nov 15 '17 21:11 kfitzgerald

@kfitzgerald You could try https://github.com/jacktuck/node-chartjs as it doesn't depend on globals i've only tested 2.4.0 though

jacktuck avatar Feb 04 '18 00:02 jacktuck