-
Notifications
You must be signed in to change notification settings - Fork 155
/
Copy pathinterface.ts
200 lines (198 loc) · 6.43 KB
/
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
/**
* Sparkline interface file.
*/
import { Sparkline } from '../sparkline';
import { SparklineBorderModel, SparklineFontModel } from './base-model';
import { Size } from '../utils/helper';
import { FontModel } from '../../stock-chart';
/**
* Specifies sparkline Events
*
* @private
*/
export interface ISparklineEventArgs {
/** Defines the name of the event. */
name: string;
/** Defines the event cancel status. */
cancel: boolean;
}
/**
* Specifies the interface for themes.
*/
export interface IThemes {
/** Defines the color of the axis line. */
axisLineColor: string;
/** Defines the color of the range band. */
rangeBandColor: string;
/** Defines the font color of the data labels. */
dataLabelColor: string;
/** Defines the background color of the tooltip. */
tooltipFill: string;
/** Defines the font color of the tooltip. */
tooltipFontColor: string;
/** Defines the background color of the sparkline. */
background: string;
/** Defines the color of the tracker line. */
trackerLineColor: string;
/** Defines the font style of the text. */
fontFamily?: string;
/** Defines the tooltip fill color opacity. */
tooltipFillOpacity?: number;
/** Defines the tooltip text opacity. */
tooltipTextOpacity?: number;
/** Defines the label font style. */
labelFontFamily?: string;
/** Defines the label font size. */
labelFontSize?: string;
/** Defines the tooltip font size. */
tooltipFontFamily: string;
/** Defines the tooltip font weight. */
tooltipFontWeight: string;
/** Defines the datalabel font style. */
dataLabelFont: FontModel;
/** Defines the tab color style. */
tabColor: string;
}
/**
* Specifies the Loaded Event arguments.
*/
export interface ISparklineLoadedEventArgs extends ISparklineEventArgs {
/** Defines the current sparkline instance. */
sparkline: Sparkline;
}
/**
* Specifies the Load Event arguments.
*/
export interface ISparklineLoadEventArgs extends ISparklineEventArgs {
/** Defines the current sparkline instance. */
sparkline: Sparkline;
}
/**
* Specifies the axis rendering Event arguments.
*/
export interface IAxisRenderingEventArgs extends ISparklineEventArgs {
/** Defines the current sparkline instance. */
sparkline: Sparkline;
/** Defines the sparkline axis min x. */
minX: number;
/** Defines the sparkline axis max x. */
maxX: number;
/** Defines the sparkline axis min y. */
minY: number;
/** Defines the sparkline axis max y. */
maxY: number;
/** Defines the sparkline axis value. */
value: number;
/** Defines the sparkline axis line color. */
lineColor: string;
/** Defines the sparkline axis line width. */
lineWidth: number;
}
/**
* Specifies the sparkline series rendering Event arguments.
*/
export interface ISeriesRenderingEventArgs extends ISparklineEventArgs {
/** Defines the current sparkline instance. */
sparkline: Sparkline;
/** Defines the sparkline series fill color. */
fill: string;
/** Defines the sparkline series line width for applicable line and area. */
lineWidth: number;
/** Defines the current sparkline series border. */
border: SparklineBorderModel;
}
/**
* Specifies the sparkline point related Event arguments.
*/
export interface ISparklinePointEventArgs extends ISparklineEventArgs {
/** Defines the current sparkline instance. */
sparkline?: Sparkline;
/** Defines the current sparkline point index. */
pointIndex: number;
/** Defines the current sparkline point fill color. */
fill: string;
/** Defines the current sparkline point border. */
border: SparklineBorderModel;
}
/**
* Specifies the sparkline mouse related Event arguments.
*/
export interface ISparklineMouseEventArgs extends ISparklineEventArgs {
/** Defines the current sparkline instance. */
sparkline?: Sparkline;
/** Defines the current sparkline mouse event. */
event: PointerEvent | MouseEvent;
}
/**
* Specifies the sparkline mouse point region Event arguments.
*/
export interface IPointRegionEventArgs extends ISparklineEventArgs {
/** Defines the current sparkline instance. */
sparkline?: Sparkline;
/** Defines the sparkline point index region event. */
pointIndex: number;
/** Defines the current sparkline mouse event. */
event: PointerEvent | MouseEvent;
}
/**
* Specifies the sparkline datalabel rendering Event arguments.
*/
export interface IDataLabelRenderingEventArgs extends ISparklineEventArgs {
/** Defines the current sparkline instance. */
sparkline?: Sparkline;
/** Defines the current sparkline label text. */
text?: string;
/** Defines the current sparkline label text location x. */
x?: number;
/** Defines the current sparkline label text location y. */
y?: number;
/** Defines the current sparkline label text color. */
color: string;
/** Defines the current sparkline label rect fill color. */
fill: string;
/** Defines the current sparkline label rect border. */
border?: SparklineBorderModel;
/** Defines the current sparkline label point index. */
pointIndex: number;
}
/**
* Specifies the sparkline marker rendering Event arguments.
*/
export interface IMarkerRenderingEventArgs extends ISparklineEventArgs {
/** Defines the current sparkline instance. */
sparkline?: Sparkline;
/** Defines the current sparkline marker location x. */
x: number;
/** Defines the current sparkline marker location y. */
y: number;
/** Defines the sparkline marker radius. */
size: number;
/** Defines the current sparkline marker fill color. */
fill: string;
/** Defines the current sparkline marker border. */
border?: SparklineBorderModel;
/** Defines the current sparkline label point index. */
pointIndex: number;
}
/**
* Sparkline Resize event arguments.
*/
export interface ISparklineResizeEventArgs {
/** Defines the name of the Event. */
name: string;
/** Defines the previous size of the sparkline. */
previousSize: Size;
/** Defines the current size of the sparkline. */
currentSize: Size;
/** Defines the sparkline instance. */
sparkline: Sparkline;
}
/**
* Sparkline tooltip event args.
*/
export interface ITooltipRenderingEventArgs extends ISparklineEventArgs {
/** Defines tooltip text. */
text?: string[];
/** Defines tooltip text style. */
textStyle?: SparklineFontModel;
}