[Chartjs]-Chart.js custom charts

2👍

Solved issues by using the beginPath() method

ctx.beginPath();

        ranges.forEach(function (range) {

          var numbersBetween = range.end - range.start

          ctx.fillStyle = range.color;
          ctx.fillRect(_this.datasets[0].points[range.start].x - 0 * unitX, yTop, unitX * numbersBetween, yHeight);
        })

        ctx.fill();

Working fiddle below:

http://jsfiddle.net/cvwporru/2/

Leave a comment