You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I suggest to divide the scale in 20 sections instead of 24. Percentage is using the decimal system and not the duodecimal system. Therefore it is a bit confusing when for example the 10% track ends between two bars. Using 20 sections leads to bars in 5% steps which is IMHO more reasonable.
/**
* Draw the scale of the chart
*/
var drawScale = function() {
var offset;
var length;
ctx.lineWidth = 1;
ctx.fillStyle = options.scaleColor;
ctx.save();
for (var i = 20; i > 0; --i) {
if (i % 5 === 0) {
length = options.scaleLength;
offset = 0;
} else {
length = options.scaleLength * 0.6;
offset = options.scaleLength - length;
}
ctx.fillRect(-options.size/2 + offset, 0, length, 1);
ctx.rotate(Math.PI / 10);
}
ctx.restore();
};
The text was updated successfully, but these errors were encountered:
I suggest to divide the scale in 20 sections instead of 24. Percentage is using the decimal system and not the duodecimal system. Therefore it is a bit confusing when for example the 10% track ends between two bars. Using 20 sections leads to bars in 5% steps which is IMHO more reasonable.
The text was updated successfully, but these errors were encountered: