@@ -2678,10 +2678,23 @@ export interface Tooltip extends Plugin {
2678
2678
2679
2679
export declare const Tooltip : Tooltip ;
2680
2680
2681
- export interface TooltipCallbacks <
2681
+ export interface TooltipDatasetCallbacks <
2682
2682
TType extends ChartType ,
2683
2683
Model = TooltipModel < TType > ,
2684
2684
Item = TooltipItem < TType > > {
2685
+ beforeLabel ( this : Model , tooltipItem : Item ) : string | string [ ] | void ;
2686
+ label ( this : Model , tooltipItem : Item ) : string | string [ ] | void ;
2687
+ afterLabel ( this : Model , tooltipItem : Item ) : string | string [ ] | void ;
2688
+
2689
+ labelColor ( this : Model , tooltipItem : Item ) : TooltipLabelStyle | void ;
2690
+ labelTextColor ( this : Model , tooltipItem : Item ) : Color | void ;
2691
+ labelPointStyle ( this : Model , tooltipItem : Item ) : { pointStyle : PointStyle ; rotation : number } | void ;
2692
+ }
2693
+
2694
+ export interface TooltipCallbacks <
2695
+ TType extends ChartType ,
2696
+ Model = TooltipModel < TType > ,
2697
+ Item = TooltipItem < TType > > extends TooltipDatasetCallbacks < TType , Model , Item > {
2685
2698
2686
2699
beforeTitle ( this : Model , tooltipItems : Item [ ] ) : string | string [ ] | void ;
2687
2700
title ( this : Model , tooltipItems : Item [ ] ) : string | string [ ] | void ;
@@ -2913,6 +2926,10 @@ export interface TooltipOptions<TType extends ChartType = ChartType> extends Cor
2913
2926
callbacks : TooltipCallbacks < TType > ;
2914
2927
}
2915
2928
2929
+ export interface TooltipDatasetOptions < TType extends ChartType = ChartType > {
2930
+ callbacks : TooltipDatasetCallbacks < TType > ;
2931
+ }
2932
+
2916
2933
export interface TooltipItem < TType extends ChartType > {
2917
2934
/**
2918
2935
* The chart the tooltip is being shown on
@@ -2960,6 +2977,10 @@ export interface TooltipItem<TType extends ChartType> {
2960
2977
element : Element ;
2961
2978
}
2962
2979
2980
+ export interface PluginDatasetOptionsByType < TType extends ChartType > {
2981
+ tooltip : TooltipDatasetOptions < TType > ;
2982
+ }
2983
+
2963
2984
export interface PluginOptionsByType < TType extends ChartType > {
2964
2985
colors : ColorsPluginOptions ;
2965
2986
decimation : DecimationOptions ;
@@ -3800,13 +3821,17 @@ export type ChartDataset<
3800
3821
TData = DefaultDataPoint < TType >
3801
3822
> = DeepPartial <
3802
3823
{ [ key in ChartType ] : { type : key } & ChartTypeRegistry [ key ] [ 'datasetOptions' ] } [ TType ]
3824
+ > & DeepPartial <
3825
+ PluginDatasetOptionsByType < TType >
3803
3826
> & ChartDatasetProperties < TType , TData > ;
3804
3827
3805
3828
export type ChartDatasetCustomTypesPerDataset <
3806
3829
TType extends ChartType = ChartType ,
3807
3830
TData = DefaultDataPoint < TType >
3808
3831
> = DeepPartial <
3809
3832
{ [ key in ChartType ] : { type : key } & ChartTypeRegistry [ key ] [ 'datasetOptions' ] } [ TType ]
3833
+ > & DeepPartial <
3834
+ PluginDatasetOptionsByType < TType >
3810
3835
> & ChartDatasetPropertiesCustomTypesPerDataset < TType , TData > ;
3811
3836
3812
3837
/**
0 commit comments