easy-pie-chart
easy-pie-chart copied to clipboard
Jquery gradient issue
How to use gradient on jquery ??
Dublicate of #198
https://github.com/rendro/easy-pie-chart#using-a-gradient
$(elem).easyPieChart({
barColor: function() {
var ctx = this.renderer.getCtx();
var canvas = this.renderer.getCanvas();
var gradient = ctx.createLinearGradient(0,0,canvas.width,0);
gradient.addColorStop(0, "#ffe57e");
gradient.addColorStop(1, "#de5900");
return gradient;
}
});
I'd like to see someone provide a working sample of this 'gradient' because I have yet to get any working examples to render
https://codepen.io/MarioPerini/pen/exKeJm
Thanks for the quick response. Gradients seem to be relatively tricky to position - especially in a dynamic environment. I have been trying to get some kind of 'ranged' display (not my idea) to be flexible.
https://codepen.io/givan2code/pen/rPKwze