rendro / easy-pie-chart

easy pie chart is a lightweight plugin to draw simple, animated pie charts for single values

Home Page:http://rendro.github.io/easy-pie-chart

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Jquery gradient issue

valeri879 opened this issue · comments

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;
            }
        });
commented

I'd like to see someone provide a working sample of this 'gradient' because I have yet to get any working examples to render

commented

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