I'm trying to draw a little chart using some JavaScript and the canvas.
I'm doing a stuff like that :
RadarChart.prototype.fillRadar = function () {
var nbLabel = this.data.labels.length;
this.context.save();
this.context.lineWidth = 0.5;
this.context.lineJoin = "round";
this.context.translate(this.canvas.width / 2, this.canvas.height / 2);
this.context.strokeStyle = this.data.lineColor;
for (var i = 0; i < nbLabel; i++) {
this.context.moveTo(0, 0);
this.context.lineTo(0, -((this.canvas.height / 2) - 30))
this.context.stroke();
this.context.rotate((Math.PI / 180) * (360 / nbLabel));
}
this.context.restore();
}
the problem is that my lines are so pixelated and are not perfect. their width seems to change. It's like it's fading out over time...
Why is it doing that? How can I fix it?
Thanks for help.