]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Add drawTime option to filler plugin (#8796)
authorJukka Kurkela <jukka.kurkela@gmail.com>
Sat, 3 Apr 2021 12:13:00 +0000 (15:13 +0300)
committerGitHub <noreply@github.com>
Sat, 3 Apr 2021 12:13:00 +0000 (08:13 -0400)
97 files changed:
docs/.vuepress/config.js
docs/charts/area.md
docs/samples/area/line-drawtime.md [new file with mode: 0644]
src/plugins/plugin.filler.js
test/fixtures/plugin.filler/line/before-dataset-draw.js [new file with mode: 0644]
test/fixtures/plugin.filler/line/before-dataset-draw.png [new file with mode: 0644]
test/fixtures/plugin.filler/line/before-datasets-draw.js [new file with mode: 0644]
test/fixtures/plugin.filler/line/before-datasets-draw.png [new file with mode: 0644]
test/fixtures/plugin.filler/line/boundary/end-span.json [moved from test/fixtures/plugin.filler/fill-line-boundary-end-span.json with 100% similarity]
test/fixtures/plugin.filler/line/boundary/end-span.png [moved from test/fixtures/plugin.filler/fill-line-boundary-end-span.png with 100% similarity]
test/fixtures/plugin.filler/line/boundary/end.json [moved from test/fixtures/plugin.filler/fill-line-boundary-end.json with 100% similarity]
test/fixtures/plugin.filler/line/boundary/end.png [moved from test/fixtures/plugin.filler/fill-line-boundary-end.png with 100% similarity]
test/fixtures/plugin.filler/line/boundary/origin-span-dual.json [moved from test/fixtures/plugin.filler/fill-line-boundary-origin-span-dual.json with 100% similarity]
test/fixtures/plugin.filler/line/boundary/origin-span-dual.png [moved from test/fixtures/plugin.filler/fill-line-boundary-origin-span-dual.png with 100% similarity]
test/fixtures/plugin.filler/line/boundary/origin-span.json [moved from test/fixtures/plugin.filler/fill-line-boundary-origin-span.json with 100% similarity]
test/fixtures/plugin.filler/line/boundary/origin-span.png [moved from test/fixtures/plugin.filler/fill-line-boundary-origin-span.png with 100% similarity]
test/fixtures/plugin.filler/line/boundary/origin-spline-above.json [moved from test/fixtures/plugin.filler/fill-line-boundary-origin-spline-above.json with 100% similarity]
test/fixtures/plugin.filler/line/boundary/origin-spline-above.png [moved from test/fixtures/plugin.filler/fill-line-boundary-origin-spline-above.png with 100% similarity]
test/fixtures/plugin.filler/line/boundary/origin-spline-span.json [moved from test/fixtures/plugin.filler/fill-line-boundary-origin-spline-span.json with 100% similarity]
test/fixtures/plugin.filler/line/boundary/origin-spline-span.png [moved from test/fixtures/plugin.filler/fill-line-boundary-origin-spline-span.png with 100% similarity]
test/fixtures/plugin.filler/line/boundary/origin-spline.json [moved from test/fixtures/plugin.filler/fill-line-boundary-origin-spline.json with 100% similarity]
test/fixtures/plugin.filler/line/boundary/origin-spline.png [moved from test/fixtures/plugin.filler/fill-line-boundary-origin-spline.png with 100% similarity]
test/fixtures/plugin.filler/line/boundary/origin-stepped-span.json [moved from test/fixtures/plugin.filler/fill-line-boundary-origin-stepped-span.json with 100% similarity]
test/fixtures/plugin.filler/line/boundary/origin-stepped-span.png [moved from test/fixtures/plugin.filler/fill-line-boundary-origin-stepped-span.png with 100% similarity]
test/fixtures/plugin.filler/line/boundary/origin-stepped.json [moved from test/fixtures/plugin.filler/fill-line-boundary-origin-stepped.json with 100% similarity]
test/fixtures/plugin.filler/line/boundary/origin-stepped.png [moved from test/fixtures/plugin.filler/fill-line-boundary-origin-stepped.png with 100% similarity]
test/fixtures/plugin.filler/line/boundary/origin.json [moved from test/fixtures/plugin.filler/fill-line-boundary-origin.json with 100% similarity]
test/fixtures/plugin.filler/line/boundary/origin.png [moved from test/fixtures/plugin.filler/fill-line-boundary-origin.png with 100% similarity]
test/fixtures/plugin.filler/line/boundary/start-span.json [moved from test/fixtures/plugin.filler/fill-line-boundary-start-span.json with 100% similarity]
test/fixtures/plugin.filler/line/boundary/start-span.png [moved from test/fixtures/plugin.filler/fill-line-boundary-start-span.png with 100% similarity]
test/fixtures/plugin.filler/line/boundary/start.json [moved from test/fixtures/plugin.filler/fill-line-boundary-start.json with 100% similarity]
test/fixtures/plugin.filler/line/boundary/start.png [moved from test/fixtures/plugin.filler/fill-line-boundary-start.png with 100% similarity]
test/fixtures/plugin.filler/line/dataset/border.json [moved from test/fixtures/plugin.filler/fill-line-dataset-border.json with 100% similarity]
test/fixtures/plugin.filler/line/dataset/border.png [moved from test/fixtures/plugin.filler/fill-line-dataset-border.png with 100% similarity]
test/fixtures/plugin.filler/line/dataset/dual.json [moved from test/fixtures/plugin.filler/fill-line-dataset-dual.json with 100% similarity]
test/fixtures/plugin.filler/line/dataset/dual.png [moved from test/fixtures/plugin.filler/fill-line-dataset-dual.png with 100% similarity]
test/fixtures/plugin.filler/line/dataset/interpolated.js [moved from test/fixtures/plugin.filler/fill-line-dataset-interpolated.js with 100% similarity]
test/fixtures/plugin.filler/line/dataset/interpolated.png [moved from test/fixtures/plugin.filler/fill-line-dataset-interpolated.png with 100% similarity]
test/fixtures/plugin.filler/line/dataset/no-border.json [moved from test/fixtures/plugin.filler/fill-line-dataset.json with 100% similarity]
test/fixtures/plugin.filler/line/dataset/no-border.png [moved from test/fixtures/plugin.filler/fill-line-dataset.png with 100% similarity]
test/fixtures/plugin.filler/line/dataset/span-dual.json [moved from test/fixtures/plugin.filler/fill-line-dataset-span-dual.json with 100% similarity]
test/fixtures/plugin.filler/line/dataset/span-dual.png [moved from test/fixtures/plugin.filler/fill-line-dataset-span-dual.png with 100% similarity]
test/fixtures/plugin.filler/line/dataset/span.json [moved from test/fixtures/plugin.filler/fill-line-dataset-span.json with 100% similarity]
test/fixtures/plugin.filler/line/dataset/span.png [moved from test/fixtures/plugin.filler/fill-line-dataset-span.png with 100% similarity]
test/fixtures/plugin.filler/line/dataset/spline-span-above.json [moved from test/fixtures/plugin.filler/fill-line-dataset-spline-span-above.json with 100% similarity]
test/fixtures/plugin.filler/line/dataset/spline-span-above.png [moved from test/fixtures/plugin.filler/fill-line-dataset-spline-span-above.png with 100% similarity]
test/fixtures/plugin.filler/line/dataset/spline-span-below.json [moved from test/fixtures/plugin.filler/fill-line-dataset-spline-span-below.json with 100% similarity]
test/fixtures/plugin.filler/line/dataset/spline-span-below.png [moved from test/fixtures/plugin.filler/fill-line-dataset-spline-span-below.png with 100% similarity]
test/fixtures/plugin.filler/line/dataset/spline-span.json [moved from test/fixtures/plugin.filler/fill-line-dataset-spline-span.json with 100% similarity]
test/fixtures/plugin.filler/line/dataset/spline-span.png [moved from test/fixtures/plugin.filler/fill-line-dataset-spline-span.png with 100% similarity]
test/fixtures/plugin.filler/line/dataset/spline.json [moved from test/fixtures/plugin.filler/fill-line-dataset-spline.json with 100% similarity]
test/fixtures/plugin.filler/line/dataset/spline.png [moved from test/fixtures/plugin.filler/fill-line-dataset-spline.png with 100% similarity]
test/fixtures/plugin.filler/line/dataset/stepped.json [moved from test/fixtures/plugin.filler/fill-line-dataset-stepped.json with 100% similarity]
test/fixtures/plugin.filler/line/dataset/stepped.png [moved from test/fixtures/plugin.filler/fill-line-dataset-stepped.png with 100% similarity]
test/fixtures/plugin.filler/line/points-outside-canvas-initial.js [moved from test/fixtures/plugin.filler/points-outside-canvas-initial.js with 100% similarity]
test/fixtures/plugin.filler/line/points-outside-canvas-initial.png [moved from test/fixtures/plugin.filler/points-outside-canvas-initial.png with 100% similarity]
test/fixtures/plugin.filler/line/points-outside-canvas-update.js [moved from test/fixtures/plugin.filler/points-outside-canvas-update.js with 100% similarity]
test/fixtures/plugin.filler/line/points-outside-canvas-update.png [moved from test/fixtures/plugin.filler/points-outside-canvas-update.png with 100% similarity]
test/fixtures/plugin.filler/line/stack.json [moved from test/fixtures/plugin.filler/fill-line-stack.json with 100% similarity]
test/fixtures/plugin.filler/line/stack.png [moved from test/fixtures/plugin.filler/fill-line-stack.png with 100% similarity]
test/fixtures/plugin.filler/line/value.json [moved from test/fixtures/plugin.filler/fill-line-value.json with 100% similarity]
test/fixtures/plugin.filler/line/value.png [moved from test/fixtures/plugin.filler/fill-line-value.png with 100% similarity]
test/fixtures/plugin.filler/radar/boundary/end-circular.json [moved from test/fixtures/plugin.filler/fill-radar-boundary-end-circular.json with 100% similarity]
test/fixtures/plugin.filler/radar/boundary/end-circular.png [moved from test/fixtures/plugin.filler/fill-radar-boundary-end-circular.png with 100% similarity]
test/fixtures/plugin.filler/radar/boundary/end-span.json [moved from test/fixtures/plugin.filler/fill-radar-boundary-end-span.json with 100% similarity]
test/fixtures/plugin.filler/radar/boundary/end-span.png [moved from test/fixtures/plugin.filler/fill-radar-boundary-end-span.png with 100% similarity]
test/fixtures/plugin.filler/radar/boundary/end.json [moved from test/fixtures/plugin.filler/fill-radar-boundary-end.json with 100% similarity]
test/fixtures/plugin.filler/radar/boundary/end.png [moved from test/fixtures/plugin.filler/fill-radar-boundary-end.png with 100% similarity]
test/fixtures/plugin.filler/radar/boundary/origin-circular.json [moved from test/fixtures/plugin.filler/fill-radar-boundary-origin-circular.json with 100% similarity]
test/fixtures/plugin.filler/radar/boundary/origin-circular.png [moved from test/fixtures/plugin.filler/fill-radar-boundary-origin-circular.png with 100% similarity]
test/fixtures/plugin.filler/radar/boundary/origin-span.json [moved from test/fixtures/plugin.filler/fill-radar-boundary-origin-span.json with 100% similarity]
test/fixtures/plugin.filler/radar/boundary/origin-span.png [moved from test/fixtures/plugin.filler/fill-radar-boundary-origin-span.png with 100% similarity]
test/fixtures/plugin.filler/radar/boundary/origin-spline-span.json [moved from test/fixtures/plugin.filler/fill-radar-boundary-origin-spline-span.json with 100% similarity]
test/fixtures/plugin.filler/radar/boundary/origin-spline-span.png [moved from test/fixtures/plugin.filler/fill-radar-boundary-origin-spline-span.png with 100% similarity]
test/fixtures/plugin.filler/radar/boundary/origin-spline.json [moved from test/fixtures/plugin.filler/fill-radar-boundary-origin-spline.json with 100% similarity]
test/fixtures/plugin.filler/radar/boundary/origin-spline.png [moved from test/fixtures/plugin.filler/fill-radar-boundary-origin-spline.png with 100% similarity]
test/fixtures/plugin.filler/radar/boundary/origin.json [moved from test/fixtures/plugin.filler/fill-radar-boundary-origin.json with 100% similarity]
test/fixtures/plugin.filler/radar/boundary/origin.png [moved from test/fixtures/plugin.filler/fill-radar-boundary-origin.png with 100% similarity]
test/fixtures/plugin.filler/radar/boundary/start-circular.json [moved from test/fixtures/plugin.filler/fill-radar-boundary-start-circular.json with 100% similarity]
test/fixtures/plugin.filler/radar/boundary/start-circular.png [moved from test/fixtures/plugin.filler/fill-radar-boundary-start-circular.png with 100% similarity]
test/fixtures/plugin.filler/radar/boundary/start-span.json [moved from test/fixtures/plugin.filler/fill-radar-boundary-start-span.json with 100% similarity]
test/fixtures/plugin.filler/radar/boundary/start-span.png [moved from test/fixtures/plugin.filler/fill-radar-boundary-start-span.png with 100% similarity]
test/fixtures/plugin.filler/radar/boundary/start.json [moved from test/fixtures/plugin.filler/fill-radar-boundary-start.json with 100% similarity]
test/fixtures/plugin.filler/radar/boundary/start.png [moved from test/fixtures/plugin.filler/fill-radar-boundary-start.png with 100% similarity]
test/fixtures/plugin.filler/radar/dataset/border.json [moved from test/fixtures/plugin.filler/fill-radar-dataset-border.json with 100% similarity]
test/fixtures/plugin.filler/radar/dataset/border.png [moved from test/fixtures/plugin.filler/fill-radar-dataset-border.png with 100% similarity]
test/fixtures/plugin.filler/radar/dataset/default.json [moved from test/fixtures/plugin.filler/fill-radar-dataset.json with 100% similarity]
test/fixtures/plugin.filler/radar/dataset/default.png [moved from test/fixtures/plugin.filler/fill-radar-dataset.png with 100% similarity]
test/fixtures/plugin.filler/radar/dataset/order.js [moved from test/fixtures/plugin.filler/fill-radar-dataset-order.js with 100% similarity]
test/fixtures/plugin.filler/radar/dataset/order.png [moved from test/fixtures/plugin.filler/fill-radar-dataset-order.png with 100% similarity]
test/fixtures/plugin.filler/radar/dataset/span.json [moved from test/fixtures/plugin.filler/fill-radar-dataset-span.json with 100% similarity]
test/fixtures/plugin.filler/radar/dataset/span.png [moved from test/fixtures/plugin.filler/fill-radar-dataset-span.png with 100% similarity]
test/fixtures/plugin.filler/radar/dataset/spline.json [moved from test/fixtures/plugin.filler/fill-radar-dataset-spline.json with 100% similarity]
test/fixtures/plugin.filler/radar/dataset/spline.png [moved from test/fixtures/plugin.filler/fill-radar-dataset-spline.png with 100% similarity]
test/fixtures/plugin.filler/radar/value.json [moved from test/fixtures/plugin.filler/fill-radar-value.json with 100% similarity]
test/fixtures/plugin.filler/radar/value.png [moved from test/fixtures/plugin.filler/fill-radar-value.png with 100% similarity]
types/index.esm.d.ts

index a5a4ba77103204ba68bb2c92595cfbdcddc1c166..b23375e1aa5030d907089fc21ff9a4d4f15ed4ef 100644 (file)
@@ -133,6 +133,7 @@ module.exports = {
           children: [
             'area/line-boundaries',
             'area/line-datasets',
+            'area/line-drawtime',
             'area/line-stacked',
             'area/radar'
           ]
index 05e16a1e5267b042ae1dadb2c12b12636d71f95d..f37515e4905025a6fe914e88c5279b79a22102f5 100644 (file)
@@ -64,9 +64,12 @@ new Chart(ctx, {
 
 ## Configuration
 
+Namespace: `options.plugins.filler`
+
 | Option | Type | Default | Description |
 | :--- | :--- | :--- | :--- |
-| [`plugins.filler.propagate`](#propagate) | `boolean` | `true` | Fill propagation when target is hidden.
+| `drawTime` | `string` | `beforeDatasetDraw` | Filler draw time. Supported values: `'beforeDatasetDraw'`, `'beforeDatasetsDraw'`
+| [`propagate`](#propagate) | `boolean` | `true` | Fill propagation when target is hidden.
 
 ### propagate
 
diff --git a/docs/samples/area/line-drawtime.md b/docs/samples/area/line-drawtime.md
new file mode 100644 (file)
index 0000000..1c45fcb
--- /dev/null
@@ -0,0 +1,108 @@
+# Line Chart drawTime
+
+```js chart-editor
+// <block:setup:2>
+const inputs = {
+  min: -100,
+  max: 100,
+  count: 8,
+  decimals: 2,
+  continuity: 1
+};
+
+const generateLabels = () => {
+  return Utils.months({count: inputs.count});
+};
+
+Utils.srand(3);
+const generateData = () => (Utils.numbers(inputs));
+// </block:setup>
+
+// <block:data:0>
+const data = {
+  labels: generateLabels(),
+  datasets: [
+    {
+      label: 'Dataset 1',
+      data: generateData(),
+      borderColor: Utils.CHART_COLORS.red,
+      backgroundColor: Utils.transparentize(Utils.CHART_COLORS.red),
+      fill: true
+    },
+    {
+      label: 'Dataset 2',
+      data: generateData(),
+      borderColor: Utils.CHART_COLORS.blue,
+      backgroundColor: Utils.transparentize(Utils.CHART_COLORS.blue),
+      fill: true
+    }
+  ]
+};
+// </block:data>
+
+// <block:actions:3>
+let smooth = false;
+
+const actions = [
+  {
+    name: 'drawTime: beforeDatasetDraw (default)',
+    handler: (chart) => {
+      chart.options.plugins.filler.drawTime = 'beforeDatasetDraw';
+      chart.update();
+    }
+  },
+  {
+    name: 'drawTime: beforeDatasetsDraw',
+    handler: (chart) => {
+      chart.options.plugins.filler.drawTime = 'beforeDatasetsDraw';
+      chart.update();
+    }
+  },
+  {
+    name: 'Randomize',
+    handler(chart) {
+      chart.data.datasets.forEach(dataset => {
+        dataset.data = generateData();
+      });
+      chart.update();
+    }
+  },
+  {
+    name: 'Smooth',
+    handler(chart) {
+      smooth = !smooth;
+      chart.options.elements.line.tension = smooth ? 0.4 : 0;
+      chart.update();
+    }
+  }
+];
+// </block:actions>
+
+// <block:config:1>
+const config = {
+  type: 'line',
+  data: data,
+  options: {
+    plugins: {
+      filler: {
+        propagate: false,
+      },
+      title: {
+        display: true,
+        text: (ctx) => 'drawTime: ' + ctx.chart.options.plugins.filler.drawTime
+      }
+    },
+    pointBackgroundColor: '#fff',
+    radius: 10,
+    interaction: {
+      intersect: false,
+    }
+  },
+};
+// </block:config>
+
+module.exports = {
+  actions: actions,
+  config: config,
+};
+```
index a7e4dfeac0197acda0a00074fbc01ee94faa2886..8ecb7b06491d5a1455a564f489a53cf1086b35de 100644 (file)
@@ -516,12 +516,25 @@ function doFill(ctx, cfg) {
   ctx.restore();
 }
 
+function drawfill(ctx, source, area) {
+  const target = getTarget(source);
+  const {line, scale} = source;
+  const lineOpts = line.options;
+  const fillOption = lineOpts.fill;
+  const color = lineOpts.backgroundColor;
+  const {above = color, below = color} = fillOption || {};
+  if (target && line.points.length) {
+    clipArea(ctx, area);
+    doFill(ctx, {line, target, above, below, area, scale});
+    unclipArea(ctx);
+  }
+}
+
 export default {
   id: 'filler',
 
   afterDatasetsUpdate(chart, _args, options) {
     const count = (chart.data.datasets || []).length;
-    const propagate = options.propagate;
     const sources = [];
     let meta, i, line, source;
 
@@ -537,7 +550,7 @@ export default {
           fill: decodeFill(line, i, count),
           chart,
           scale: meta.vScale,
-          line
+          line,
         };
       }
 
@@ -551,47 +564,39 @@ export default {
         continue;
       }
 
-      source.fill = resolveTarget(sources, i, propagate);
+      source.fill = resolveTarget(sources, i, options.propagate);
     }
   },
 
-  beforeDatasetsDraw(chart) {
+  beforeDatasetsDraw(chart, _args, options) {
     const metasets = chart.getSortedVisibleDatasetMetas();
     const area = chart.chartArea;
-    let i, meta;
 
-    for (i = metasets.length - 1; i >= 0; --i) {
-      meta = metasets[i].$filler;
+    for (let i = metasets.length - 1; i >= 0; --i) {
+      const source = metasets[i].$filler;
 
-      if (meta) {
-        meta.line.updateControlPoints(area);
+      if (source) {
+        source.line.updateControlPoints(area);
+
+        if (options.drawTime === 'beforeDatasetsDraw') {
+          drawfill(chart.ctx, source, area);
+        }
       }
     }
   },
 
-  beforeDatasetDraw(chart, args) {
-    const area = chart.chartArea;
-    const ctx = chart.ctx;
+  beforeDatasetDraw(chart, args, options) {
     const source = args.meta.$filler;
 
-    if (!source || source.fill === false) {
+    if (!source || source.fill === false || options.drawTime !== 'beforeDatasetDraw') {
       return;
     }
 
-    const target = getTarget(source);
-    const {line, scale} = source;
-    const lineOpts = line.options;
-    const fillOption = lineOpts.fill;
-    const color = lineOpts.backgroundColor;
-    const {above = color, below = color} = fillOption || {};
-    if (target && line.points.length) {
-      clipArea(ctx, area);
-      doFill(ctx, {line, target, above, below, area, scale});
-      unclipArea(ctx);
-    }
+    drawfill(chart.ctx, source, chart.chartArea);
   },
 
   defaults: {
-    propagate: true
+    propagate: true,
+    drawTime: 'beforeDatasetDraw'
   }
 };
diff --git a/test/fixtures/plugin.filler/line/before-dataset-draw.js b/test/fixtures/plugin.filler/line/before-dataset-draw.js
new file mode 100644 (file)
index 0000000..3c89a45
--- /dev/null
@@ -0,0 +1,41 @@
+module.exports = {
+  config: {
+    type: 'line',
+    data: {
+      labels: ['15:00', '16:00', '17:00', '18:00', '19:00', '20:00'],
+      datasets: [
+        {
+          borderColor: '#00ADEE80',
+          backgroundColor: '#00ADEE',
+          data: [0, 1, 1, 2, 2, 0],
+        },
+        {
+          borderColor: '#BD262880',
+          backgroundColor: '#BD2628',
+          data: [0, 2, 2, 1, 1, 1],
+        }
+      ]
+    },
+    options: {
+      borderWidth: 4,
+      fill: true,
+      radius: 20,
+      pointBackgroundColor: '#ffff',
+      cubicInterpolationMode: 'monotone',
+      plugins: {
+        legend: false,
+        filler: {
+          drawTime: 'beforeDatasetDraw'
+        }
+      },
+      scales: {
+        x: {
+          display: false,
+        },
+        y: {
+          display: false
+        }
+      }
+    }
+  }
+};
diff --git a/test/fixtures/plugin.filler/line/before-dataset-draw.png b/test/fixtures/plugin.filler/line/before-dataset-draw.png
new file mode 100644 (file)
index 0000000..b69852d
Binary files /dev/null and b/test/fixtures/plugin.filler/line/before-dataset-draw.png differ
diff --git a/test/fixtures/plugin.filler/line/before-datasets-draw.js b/test/fixtures/plugin.filler/line/before-datasets-draw.js
new file mode 100644 (file)
index 0000000..3b06f3f
--- /dev/null
@@ -0,0 +1,41 @@
+module.exports = {
+  config: {
+    type: 'line',
+    data: {
+      labels: ['15:00', '16:00', '17:00', '18:00', '19:00', '20:00'],
+      datasets: [
+        {
+          borderColor: '#00ADEE80',
+          backgroundColor: '#00ADEE',
+          data: [0, 1, 1, 2, 2, 0],
+        },
+        {
+          borderColor: '#BD262880',
+          backgroundColor: '#BD2628',
+          data: [0, 2, 2, 1, 1, 1],
+        }
+      ]
+    },
+    options: {
+      borderWidth: 4,
+      fill: true,
+      radius: 20,
+      pointBackgroundColor: '#ffff',
+      cubicInterpolationMode: 'monotone',
+      plugins: {
+        legend: false,
+        filler: {
+          drawTime: 'beforeDatasetsDraw'
+        }
+      },
+      scales: {
+        x: {
+          display: false,
+        },
+        y: {
+          display: false
+        }
+      }
+    }
+  }
+};
diff --git a/test/fixtures/plugin.filler/line/before-datasets-draw.png b/test/fixtures/plugin.filler/line/before-datasets-draw.png
new file mode 100644 (file)
index 0000000..9178b85
Binary files /dev/null and b/test/fixtures/plugin.filler/line/before-datasets-draw.png differ
index f2a911829bcde23329cfa68b88844f57123a5069..d6f0d300937a187be4fff76c47d950e170dadd69 100644 (file)
@@ -1956,6 +1956,7 @@ export type DecimationOptions = LttbDecimationOptions | MinMaxDecimationOptions;
 
 export const Filler: Plugin;
 export interface FillerOptions {
+  drawTime: 'beforeDatasetDraw' | 'beforeDatasetsDraw';
   propagate: boolean;
 }