score:0

Accepted answer

i solved it by playing with the lintto and linewidth values

my final code looks like this:

chart.controllers.bar = chart.controllers.bar.extend({
    draw: function (ease) {
        chart.controllers.line.prototype.draw.call(this, ease);
        if (this.chart.tooltip._active && this.chart.tooltip._active.length) {
            var activepoint = this.chart.tooltip._active[0],
                ctx = this.chart.ctx,
                x = activepoint.tooltipposition().x,
                topy = 1000000,
                width = activepoint._view.width,
                bottomy = 0;
            ctx.save();
            ctx.beginpath();
            ctx.moveto(x, topy);
            ctx.lineto(x, bottomy);
            ctx.linewidth = width + 20;
            ctx.strokestyle = 'rgba(0, 123, 255, 0.1)';
            ctx.stroke();
            ctx.restore();
        }
    }
});

Related Query

More Query from same tag