We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
value is displaying NaN when I'm trying to reset to zero before I recalculate again...
//setup ; (function () { var _originalInitFill = $.circleProgress.defaults.initFill; // circle progress plugin to get sectors $.circleProgress.defaults.initFill = function () { _originalInitFill.apply(this, arguments); if (this.fill.sectors) { var s = this.size, r = s / 2, sa = this.startAngle; var bg = $('<canvas>')[0]; bg.width = s; bg.height = s; var lastValue = 0, ctx = bg.getContext('2d'); for (var i = 0; i < this.fill.sectors.length; i++) { var sector = this.fill.sectors[i], currentColor = sector[0], currentValue = sector[1]; ctx.beginPath(); ctx.moveTo(r, r); ctx.arc(r, r, r, sa + 2 * lastValue * Math.PI, sa + 2 * currentValue * Math.PI); ctx.moveTo(r, r); ctx.fillStyle = currentColor; ctx.fill(); lastValue = currentValue; } this.arcFill = this.ctx.createPattern(bg, 'no-repeat'); } }; })(); //initial load $("#circle").circleProgress({ value: (v1 + v2 )/v3, emptyFill: "#D9D9D'', size: 148, startAngle: -Math.PI / 4 * 2, fill: { sectors: [ ["#0072a3",v1 / v3], ["#f2b72b",(v1 + v2 )/v3] ] } , thickness: 12 }); //reset $("#circle").circleProgress({ value: 0.0 });
I also tried value: 0, still displays NaN. Honestly what I really want it display is " -- ", but i'll take 0
The text was updated successfully, but these errors were encountered:
No branches or pull requests
value is displaying NaN when I'm trying to reset to zero before I recalculate again...
I also tried value: 0, still displays NaN. Honestly what I really want it display is " -- ", but i'll take 0
The text was updated successfully, but these errors were encountered: