2π
β
Itβs easier to do this by clearing out the tick marks after they have been drawn. You can do this by extending the chart.
Preview
Script
Chart.types.Line.extend({
name: "LineAlt",
initialize: function () {
Chart.types.Line.prototype.initialize.apply(this, arguments);
var scale = this.scale;
var originalDraw = scale.draw;
scale.draw = function () {
originalDraw.apply(this, arguments);
ctx.clearRect(scale.calculateX(0), scale.endPoint, scale.width, 5);
ctx.clearRect(scale.calculateX(0), scale.endPoint + 1, -5, -scale.height);
}
}
});
and then
...
new Chart(ctx).LineAlt(data);
Fiddle β http://jsfiddle.net/m9k5goaL/
Source:stackexchange.com