Skip to content

Commit d20b59f

Browse files
authored
Add colors plugin TS options to be configured (#11115)
1 parent 23e8f7d commit d20b59f

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

src/types/index.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {ChartArea, Padding, Point} from './geometric.js';
1212
import {LayoutItem, LayoutPosition} from './layout.js';
1313
import {RenderTextOpts} from './helpers/helpers.canvas.js';
1414
import {CanvasFontSpec} from '../helpers/helpers.options.js';
15+
import type {ColorsPluginOptions} from '../plugins/plugin.colors.js';
1516

1617
export {EasingFunction} from '../helpers/helpers.easing.js';
1718
export {default as ArcElement, ArcProps} from '../elements/element.arc.js';
@@ -2791,6 +2792,7 @@ export interface TooltipItem<TType extends ChartType> {
27912792
}
27922793

27932794
export interface PluginOptionsByType<TType extends ChartType> {
2795+
colors: ColorsPluginOptions;
27942796
decimation: DecimationOptions;
27952797
filler: FillerOptions;
27962798
legend: LegendOptions<TType>;
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { Chart } from '../../../../src/types.js';
2+
3+
const chart = new Chart('id', {
4+
type: 'bubble',
5+
data: {
6+
labels: [],
7+
datasets: [{
8+
data: []
9+
}]
10+
},
11+
options: {
12+
plugins: {
13+
colors: {
14+
enabled: true,
15+
forceOverride: false,
16+
}
17+
}
18+
}
19+
});

0 commit comments

Comments
 (0)