Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove console log and lint errors
  • Loading branch information
LeeLenaleee committed Jun 9, 2022
commit 82d83e7984d3522b55cfca2300046a0f86ec493c
2 changes: 1 addition & 1 deletion src/plugins/plugin.filler/filler.helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ export function _createBoundaryLine(boundary, line) {
}

export function _shouldApplyFill(source) {
return source && source.fill !== false;
return source && source.fill !== false;
}
4 changes: 2 additions & 2 deletions src/plugins/plugin.filler/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import LineElement from '../../elements/element.line';
import {_drawfill} from './filler.drawing';
import { _shouldApplyFill } from './filler.helper';
import {_shouldApplyFill} from './filler.helper';
import {_decodeFill, _resolveTarget} from './filler.options';

export default {
Expand Down Expand Up @@ -73,7 +73,7 @@ export default {
const metasets = chart.getSortedVisibleDatasetMetas();
for (let i = metasets.length - 1; i >= 0; --i) {
const source = metasets[i].$filler;
console.log(source)

if (_shouldApplyFill(source)) {
_drawfill(chart.ctx, source, chart.chartArea);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
module.exports = {
config: {
type: 'line',
data: {
labels: ['0', '1', '2', '3', '4', '5'],
datasets: [{
backgroundColor: 'red',
data: [3, -3, 0, 5, -5, 0],
fill: false
}]
},
options: {
plugins: {
legend: false,
title: false,
filler: {
drawTime: 'beforeDatasetDraw'
}
},
}
config: {
type: 'line',
data: {
labels: ['0', '1', '2', '3', '4', '5'],
datasets: [{
backgroundColor: 'red',
data: [3, -3, 0, 5, -5, 0],
fill: false
}]
},
};

options: {
plugins: {
legend: false,
title: false,
filler: {
drawTime: 'beforeDatasetDraw'
}
},
}
},
};
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
module.exports = {
config: {
type: 'line',
data: {
labels: ['0', '1', '2', '3', '4', '5'],
datasets: [{
backgroundColor: 'red',
data: [3, -3, 0, 5, -5, 0],
fill: false
}]
},
options: {
plugins: {
legend: false,
title: false,
filler: {
drawTime: 'beforeDatasetsDraw'
}
},
}
config: {
type: 'line',
data: {
labels: ['0', '1', '2', '3', '4', '5'],
datasets: [{
backgroundColor: 'red',
data: [3, -3, 0, 5, -5, 0],
fill: false
}]
},
};

options: {
plugins: {
legend: false,
title: false,
filler: {
drawTime: 'beforeDatasetsDraw'
}
},
}
},
};
41 changes: 20 additions & 21 deletions test/fixtures/plugin.filler/line/drawTimeFillFalse/beforeDraw.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
module.exports = {
config: {
type: 'line',
data: {
labels: ['0', '1', '2', '3', '4', '5'],
datasets: [{
backgroundColor: 'red',
data: [3, -3, 0, 5, -5, 0],
fill: false
}]
},
options: {
plugins: {
legend: false,
title: false,
filler: {
drawTime: 'beforeDraw'
}
},
}
config: {
type: 'line',
data: {
labels: ['0', '1', '2', '3', '4', '5'],
datasets: [{
backgroundColor: 'red',
data: [3, -3, 0, 5, -5, 0],
fill: false
}]
},
};

options: {
plugins: {
legend: false,
title: false,
filler: {
drawTime: 'beforeDraw'
}
},
}
},
};