Skip to content

Commit

Permalink
chartjs#4202 Line Chart - line on the edge get cut fix
Browse files Browse the repository at this point in the history
  • Loading branch information
serhii-yakymuk committed Mar 6, 2018
1 parent b7025fe commit 14e24a9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/controllers/controller.line.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,11 +283,17 @@ module.exports = function(Chart) {
var points = meta.data || [];
var area = chart.chartArea;
var ilen = points.length;
var dataset = me.getDataset();
var i = 0;

helpers.canvas.clipArea(chart.ctx, area);
helpers.canvas.clipArea(chart.ctx, {
left: area.left,
right: area.right,
top: area.top - dataset.borderWidth / 2,
bottom: area.bottom + dataset.borderWidth / 2
});

if (lineEnabled(me.getDataset(), chart.options)) {
if (lineEnabled(dataset, chart.options)) {
meta.dataset.draw();
}

Expand Down

0 comments on commit 14e24a9

Please sign in to comment.