mirror of
https://github.com/chartjs/Chart.js.git
synced 2026-03-12 03:06:54 +01:00
Fix: update line options on resize, for gradients (#8832)
This commit is contained in:
@@ -29,17 +29,14 @@ export default class LineController extends DatasetController {
|
||||
line._decimated = !!_dataset._decimated;
|
||||
line.points = points;
|
||||
|
||||
// In resize mode only point locations change, so no need to set the options.
|
||||
if (mode !== 'resize') {
|
||||
const options = me.resolveDatasetElementOptions(mode);
|
||||
if (!me.options.showLine) {
|
||||
options.borderWidth = 0;
|
||||
}
|
||||
me.updateElement(line, undefined, {
|
||||
animated: !animationsDisabled,
|
||||
options
|
||||
}, mode);
|
||||
const options = me.resolveDatasetElementOptions(mode);
|
||||
if (!me.options.showLine) {
|
||||
options.borderWidth = 0;
|
||||
}
|
||||
me.updateElement(line, undefined, {
|
||||
animated: !animationsDisabled,
|
||||
options
|
||||
}, mode);
|
||||
|
||||
// Update Points
|
||||
me.updateElements(points, start, count, mode);
|
||||
|
||||
Reference in New Issue
Block a user