mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-06 04:09:08 +02:00
Add colors plugin TS options to be configured (#11115)
This commit is contained in:
parent
23e8f7d378
commit
d20b59fb03
2
src/types/index.d.ts
vendored
2
src/types/index.d.ts
vendored
@ -12,6 +12,7 @@ import {ChartArea, Padding, Point} from './geometric.js';
|
||||
import {LayoutItem, LayoutPosition} from './layout.js';
|
||||
import {RenderTextOpts} from './helpers/helpers.canvas.js';
|
||||
import {CanvasFontSpec} from '../helpers/helpers.options.js';
|
||||
import type {ColorsPluginOptions} from '../plugins/plugin.colors.js';
|
||||
|
||||
export {EasingFunction} from '../helpers/helpers.easing.js';
|
||||
export {default as ArcElement, ArcProps} from '../elements/element.arc.js';
|
||||
@ -2791,6 +2792,7 @@ export interface TooltipItem<TType extends ChartType> {
|
||||
}
|
||||
|
||||
export interface PluginOptionsByType<TType extends ChartType> {
|
||||
colors: ColorsPluginOptions;
|
||||
decimation: DecimationOptions;
|
||||
filler: FillerOptions;
|
||||
legend: LegendOptions<TType>;
|
||||
|
19
test/types/plugins/plugin.colors/colors.ts
Normal file
19
test/types/plugins/plugin.colors/colors.ts
Normal file
@ -0,0 +1,19 @@
|
||||
import { Chart } from '../../../../src/types.js';
|
||||
|
||||
const chart = new Chart('id', {
|
||||
type: 'bubble',
|
||||
data: {
|
||||
labels: [],
|
||||
datasets: [{
|
||||
data: []
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
plugins: {
|
||||
colors: {
|
||||
enabled: true,
|
||||
forceOverride: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
Loading…
Reference in New Issue
Block a user