bernii / gauge.js

100% native and cool looking JavaScript gauge
MIT License
1.42k stars 391 forks source link

Feature Request: Linear gradient dynamic x0 y0 x1 y1 positions #183

Open ArtiK56 opened 6 years ago

ArtiK56 commented 6 years ago

Hi,

While creating a linear gradient the values for x0 y0 y1 is static ( value: 0 ) and x1 depends on the width of the canvas. Is it possible to set these values dynamically from outside? If not could you please add this feature in your next release?

I need changes something like below: fillStyle = this.ctx.createLinearGradient(0+this.options.gradientAddToX0, 0+this.options.gradientAddToY0, w+this.options.gradientAddToX1, 0+this.options.gradientAddToY1);

I needed this to change the look and feel of the default linear gradient.

Thanks, Arti