chartjs-node
chartjs-node copied to clipboard
Expose CanvasGradient and CanvasPattern
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 You could try https://github.com/jacktuck/node-chartjs as it doesn't depend on globals i've only tested 2.4.0 though