@@ -492,7 +492,7 @@ export declare class Chart<
492
492
readonly id : string ;
493
493
readonly canvas : HTMLCanvasElement ;
494
494
readonly ctx : CanvasRenderingContext2D ;
495
- readonly config : ChartConfigurationInstance ;
495
+ readonly config : ChartConfiguration < TType , TData , TLabel > | ChartConfigurationCustomTypesPerDataset < TType , TData , TLabel > ;
496
496
readonly width : number ;
497
497
readonly height : number ;
498
498
readonly aspectRatio : number ;
@@ -502,11 +502,11 @@ export declare class Chart<
502
502
readonly scales : { [ key : string ] : Scale } ;
503
503
readonly attached : boolean ;
504
504
505
- readonly legend ?: LegendElement ; // Only available if legend plugin is registered and enabled
506
- readonly tooltip ?: TooltipModel ; // Only available if tooltip plugin is registered and enabled
505
+ readonly legend ?: LegendElement < TType > ; // Only available if legend plugin is registered and enabled
506
+ readonly tooltip ?: TooltipModel < TType > ; // Only available if tooltip plugin is registered and enabled
507
507
508
- data : ChartData ;
509
- options : ChartOptions ;
508
+ data : ChartData < TType , TData , TLabel > ;
509
+ options : ChartOptions < TType > ;
510
510
511
511
constructor ( item : ChartItem , config : ChartConfiguration < TType , TData , TLabel > | ChartConfigurationCustomTypesPerDataset < TType , TData , TLabel > ) ;
512
512
@@ -2197,7 +2197,7 @@ export interface LegendItem {
2197
2197
textAlign ?: TextAlign ;
2198
2198
}
2199
2199
2200
- export interface LegendElement < TType extends ChartType = ChartType > extends Element < AnyObject , LegendOptions < TType > > , LayoutItem {
2200
+ export interface LegendElement < TType extends ChartType > extends Element < AnyObject , LegendOptions < TType > > , LayoutItem {
2201
2201
chart : Chart < TType > ;
2202
2202
ctx : CanvasRenderingContext2D ;
2203
2203
legendItems ?: LegendItem [ ] ;
@@ -2431,7 +2431,7 @@ export interface TooltipLabelStyle {
2431
2431
*/
2432
2432
borderRadius ?: number | BorderRadius ;
2433
2433
}
2434
- export interface TooltipModel < TType extends ChartType = ChartType > extends Element < AnyObject , TooltipOptions < TType > > {
2434
+ export interface TooltipModel < TType extends ChartType > extends Element < AnyObject , TooltipOptions < TType > > {
2435
2435
readonly chart : Chart < TType > ;
2436
2436
2437
2437
// The items that we are rendering in the tooltip. See Tooltip Item Interface section
@@ -3676,5 +3676,3 @@ export interface ChartConfigurationCustomTypesPerDataset<
3676
3676
options ?: ChartOptions < TType > ;
3677
3677
plugins ?: Plugin < TType > [ ] ;
3678
3678
}
3679
-
3680
- export type ChartConfigurationInstance = ChartConfiguration | ChartConfigurationCustomTypesPerDataset & { type ?: undefined }
0 commit comments