forked from coreui/coreui-angular
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchartjs.interface.ts
79 lines (65 loc) · 1.87 KB
/
chartjs.interface.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
import { ChartData, ChartOptions, ChartType, Plugin } from 'chart.js/auto';
import { EventEmitter } from '@angular/core';
export interface IChartjs {
/**
* Enables custom html based tooltips instead of standard tooltips.
* @default true
*/
customTooltips?: boolean;
/**
* The data object that is passed into the Chart.js chart (more info).
*/
data: ChartData | ((canvas: HTMLCanvasElement) => ChartData) | undefined;
/**
* Height attribute applied to the rendered canvas.
*
* @default 150
*/
height?: number;
/**
* Html id attribute applied to the rendered canvas.
*/
id?: string;
/**
* The options object that is passed into the Chart.js chart.
* {@link https://www.chartjs.org/docs/latest/general/options.html More Info}
*/
options?: ChartOptions;
/**
* The plugins array that is passed into the Chart.js chart (more info)
* {@link https://www.chartjs.org/docs/latest/developers/plugins.html More Info}
*/
plugins?: Plugin[];
/**
* If true, will tear down and redraw chart on all updates.
* @default false
*/
redraw?: boolean;
/**
* Chart.js chart type.
* @type {'line' | 'bar' | 'radar' | 'doughnut' | 'polarArea' | 'bubble' | 'pie' | 'scatter'}
*/
type: ChartType;
/**
* Width attribute applied to the rendered canvas.
* @default 300
*/
width?: number;
/**
* Put the chart into the wrapper div element.
* @default true
*/
wrapper?: boolean;
/**
* Proxy for Chart.js getDatasetAtEvent. Calls with dataset and triggering event.
*/
getDatasetAtEvent: EventEmitter<any>;
/**
* Proxy for Chart.js getElementAtEvent. Calls with single element array and triggering event.
*/
getElementAtEvent: EventEmitter<any>;
/**
* Proxy for Chart.js getElementsAtEvent. Calls with element array and triggering event.
*/
getElementsAtEvent: EventEmitter<any>;
}