File tree 1 file changed +9
-1
lines changed
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import {
11
11
RadarController ,
12
12
ScatterController
13
13
} from 'chart.js'
14
+ import type { DistributiveArray } from 'chart.js/dist/types/utils'
14
15
import type { TypedChartComponent , ChartComponentRef } from './types.js'
15
16
import { CommonProps } from './props.js'
16
17
import { Chart } from './chart.js'
@@ -54,7 +55,14 @@ export function createTypedChart<
54
55
} ) as any
55
56
}
56
57
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 )
58
66
59
67
export const Doughnut = /* #__PURE__ */ createTypedChart (
60
68
'doughnut' ,
You can’t perform that action at this time.
0 commit comments