Skip to content

Commit 12921c9

Browse files
committed
Rebase fixes
1 parent 2bbde94 commit 12921c9

File tree

2 files changed

+19
-18
lines changed

2 files changed

+19
-18
lines changed

src/elements/element.line.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,8 @@ class Line extends Element {
423423
}
424424
const options = me.options;
425425
if (options.tension && !options.steppedLine) {
426-
updateBezierControlPoints(me._children, options, chartArea, me._loop);
426+
const loop = options.spanGaps ? me._loop : me._fullLoop;
427+
updateBezierControlPoints(me._points, options, chartArea, loop);
427428
}
428429
}
429430

src/plugins/plugin.filler.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ function getLineByIndex(chart, index) {
2626
return visible ? meta.dataset : null;
2727
}
2828

29-
function parseFillOption(el) {
30-
const {_model: model = {}} = el;
31-
const fillOption = model.fill;
29+
function parseFillOption(line) {
30+
const options = line.options;
31+
const fillOption = options.fill;
3232
let fill = valueOrDefault(fillOption && fillOption.target, fillOption);
3333

3434
if (fill === undefined) {
35-
fill = !!model.backgroundColor;
35+
fill = !!options.backgroundColor;
3636
}
3737

3838
if (fill === false || fill === null) {
@@ -46,8 +46,8 @@ function parseFillOption(el) {
4646
}
4747

4848
// @todo if (fill[0] === '#')
49-
function decodeFill(el, index, count) {
50-
const fill = parseFillOption(el);
49+
function decodeFill(line, index, count) {
50+
const fill = parseFillOption(line);
5151
let target = parseFloat(fill, 10);
5252

5353
if (isFinite(target) && Math.floor(target) === target) {
@@ -176,7 +176,7 @@ function pointsFromSegments(boundary, line) {
176176
}
177177

178178
function getTarget(source) {
179-
const {chart, fill, el: line} = source;
179+
const {chart, fill, line} = source;
180180

181181
if (isFinite(fill)) {
182182
return getLineByIndex(chart, fill);
@@ -361,20 +361,20 @@ export default {
361361
var count = (chart.data.datasets || []).length;
362362
var propagate = options.propagate;
363363
var sources = [];
364-
var meta, i, el, source;
364+
var meta, i, line, source;
365365

366366
for (i = 0; i < count; ++i) {
367367
meta = chart.getDatasetMeta(i);
368-
el = meta.dataset;
368+
line = meta.dataset;
369369
source = null;
370370

371-
if (el && el.options && el instanceof Line) {
371+
if (line && line.options && line instanceof Line) {
372372
source = {
373373
visible: chart.isDatasetVisible(i),
374-
fill: decodeFill(el, i, count),
374+
fill: decodeFill(line, i, count),
375375
chart: chart,
376376
scale: meta.vScale,
377-
el: el
377+
line
378378
};
379379
}
380380

@@ -405,7 +405,7 @@ export default {
405405
if (!meta || !meta.visible) {
406406
continue;
407407
}
408-
meta.el.updateControlPoints(area);
408+
meta.line.updateControlPoints(area);
409409
}
410410

411411
for (i = metasets.length - 1; i >= 0; --i) {
@@ -414,14 +414,14 @@ export default {
414414
if (!meta || meta.fill === false) {
415415
continue;
416416
}
417-
const {el, target, scale} = meta;
418-
const lineOpts = el.options;
417+
const {line, target, scale} = meta;
418+
const lineOpts = line.options;
419419
const fillOption = lineOpts.fill;
420420
const color = lineOpts.backgroundColor || defaults.global.defaultColor;
421421
const {above = color, below = color} = fillOption || {};
422-
if (target && el.points.length) {
422+
if (target && line.points.length) {
423423
clipArea(ctx, area);
424-
doFill(ctx, {line: el, target, above, below, area, scale});
424+
doFill(ctx, {line, target, above, below, area, scale});
425425
unclipArea(ctx);
426426
}
427427
}

0 commit comments

Comments
 (0)