javascript - How can I hide tick marks on Chart.js? -
i'm trying hide tick marks in x , y axes, marked them arrows... ideas? i've tried cannot find solution.
snapshot of problem:
it's easier clearing out tick marks after have been drawn. can extending 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/
Comments
Post a Comment