File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import {
1111 RadarController ,
1212 ScatterController
1313} from 'chart.js'
14+ import type { DistributiveArray } from 'chart.js/dist/types/utils'
1415import type { TypedChartComponent , ChartComponentRef } from './types.js'
1516import { CommonProps } from './props.js'
1617import { Chart } from './chart.js'
@@ -54,7 +55,14 @@ export function createTypedChart<
5455 } ) as any
5556}
5657
57- export const Bar = /* #__PURE__ */ createTypedChart ( 'bar' , BarController )
58+ interface ExtendedDataPoint {
59+ [ key : string ] : string | number | null | ExtendedDataPoint
60+ }
61+
62+ export const Bar = /* #__PURE__ */ createTypedChart <
63+ 'bar' ,
64+ DefaultDataPoint < 'bar' > | DistributiveArray < ExtendedDataPoint >
65+ > ( 'bar' , BarController )
5866
5967export const Doughnut = /* #__PURE__ */ createTypedChart (
6068 'doughnut' ,
You can’t perform that action at this time.
0 commit comments