-
Notifications
You must be signed in to change notification settings - Fork 154
/
Copy pathstock-chart-model.d.ts
423 lines (342 loc) · 12.6 KB
/
stock-chart-model.d.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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
import { Component, INotifyPropertyChanged, Property, Complex, Collection, Internationalization, NotifyPropertyChanges, ModuleDeclaration } from '@syncfusion/ej2-base';import { Browser, EmitType, remove, Event, EventHandler } from '@syncfusion/ej2-base';import { DataManager } from '@syncfusion/ej2-data';import { Chart, ZoomSettings, CrosshairSettings } from '../chart/chart';import { ZoomSettingsModel, CrosshairSettingsModel } from '../chart/chart-model';import { appendChildElement, redrawElement, titlePositionX, textElement } from '../common/utils/helper';import { Axis } from '../chart/axis/axis';import { Series } from '../chart/series/chart-series';import { Size, Rect, TextOption, measureText, SvgRenderer } from '@syncfusion/ej2-svg-base';import { ITooltipRenderEventArgs, IMouseEventArgs, IPointEventArgs } from '../chart/model/chart-interface';import { IRangeSelectorRenderEventArgs } from '../range-navigator/model/range-navigator-interface';import { IAxisLabelRenderEventArgs, ISeriesRenderEventArgs, IZoomingEventArgs } from '../chart/model/chart-interface';import { StockTooltipSettingsModel, PeriodsModel } from '../common/model/base-model';import { calculateSize, getElement } from '../common/utils/helper';import { RangeNavigator } from '../range-navigator/range-navigator';import { getRangeValueXByPoint } from '../range-navigator/utils/helper';import { PeriodSelector } from '../common/period-selector/period-selector';import { CartesianChart } from './renderer/cartesian-chart';import { RangeSelector } from './renderer/range-selector';import { ToolBarSelector } from './renderer/toolbar-selector';import { StockMargin, StockChartArea, StockChartAxis, StockChartRow, StockChartIndexes, StockEventsSettings, IStockLegendRenderEventArgs, IStockLegendClickEventArgs } from './model/base';import { StockSeries, IStockChartEventArgs, StockChartIndicator, StockChartBorder, IRangeChangeEventArgs } from './model/base';import { StockChartAnnotationSettings, IStockEventRenderArgs } from './model/base';import { StockChartAnnotationSettingsModel } from './model/base-model';import { StockChartFont } from './model/base';import { StockSeriesModel, StockChartIndicatorModel, StockChartAxisModel, StockChartRowModel } from './model/base-model';import { StockChartIndexesModel, StockChartFontModel, StockChartAreaModel, StockEventsSettingsModel } from './model/base-model';import { StockChartBorderModel, StockMarginModel } from './model/base-model';import { ChartSeriesType, TrendlineTypes, TechnicalIndicators} from '../chart/utils/enum';import { ChartTheme, SelectionMode } from '../common/utils/enum';import { ExportType, Alignment } from '../common/utils/enum';import { getSeriesColor, getThemeColor } from '../common/model/theme';import { StockEvents } from './renderer/stock-events';import { IThemeStyle } from '../chart/model/chart-interface';import { StockChartLegendSettingsModel } from './legend/legend-model';import { StockLegend, StockChartLegendSettings } from './legend/legend';import { ColumnSeries, RangeAreaSeries, SeriesModel, SplineRangeAreaSeries } from './index';import { VisibleRangeModel } from '../common/model/interface';import { Periods, StockTooltipSettings } from '../common/model/base';
import {ComponentModel} from '@syncfusion/ej2-base';
/**
* Interface for a class StockChart
*/
export interface StockChartModel extends ComponentModel{
/**
* The width of the stockChart as a string accepts input as both like '100px' or '100%'.
* If specified as '100%, stockChart renders to the full width of its parent element.
*
* @default null
*/
width?: string;
/**
* The height of the stockChart as a string accepts input both as '100px' or '100%'.
* If specified as '100%, stockChart renders to the full height of its parent element.
*
* @default null
*/
height?: string;
/**
* Specifies the DataSource for the stockChart. It can be an array of JSON objects or an instance of DataManager.
* ```html
* <div id='financial'></div>
* ```
* ```typescript
* let dataManager: DataManager = new DataManager({
* url: 'http://mvc.syncfusion.com/Services/Northwnd.svc/Tasks/'
* });
* let query: Query = new Query().take(50).where('Estimate', 'greaterThan', 0, false);
* let financial: stockChart = new stockChart({
* ...
* dataSource:dataManager,
* series: [{
* xName: 'Id',
* yName: 'Estimate',
* query: query
* }],
* ...
* });
* financial.appendTo('#financial');
* ```
*
* @default ''
*/
dataSource?: Object | DataManager;
/**
* Options to customize left, right, top and bottom margins of the stockChart.
*/
margin?: StockMarginModel;
/**
* Options for customizing the color and width of the stockChart border.
*/
border?: StockChartBorderModel;
/**
* The background color of the stockChart that accepts value in hex and rgba as a valid CSS color string.
*
* @default null
*/
background?: string;
/**
* Specifies the theme for the stockChart.
*
* @default 'Material'
*/
theme?: ChartTheme;
/**
* Options to configure the horizontal axis.
*/
primaryXAxis?: StockChartAxisModel;
/**
* Options for configuring the border and background of the stockChart area.
*/
chartArea?: StockChartAreaModel;
/**
* Options to configure the vertical axis.
*/
primaryYAxis?: StockChartAxisModel;
/**
* Options to split stockChart into multiple plotting areas horizontally.
* Each object in the collection represents a plotting area in the stockChart.
*/
rows?: StockChartRowModel[];
/**
* Secondary axis collection for the stockChart.
*/
axes?: StockChartAxisModel[];
/**
* The configuration for series in the stockChart.
*/
series?: StockSeriesModel[];
/**
* The configuration for stock events in the stockChart.
*/
stockEvents?: StockEventsSettingsModel[];
/**
* It specifies whether the stockChart should be render in transposed manner or not.
*
* @default false
*/
isTransposed?: boolean;
/**
* Title of the chart
*
* @default ''
*/
title?: string;
/**
* Options for customizing the title of the Chart.
*/
titleStyle?: StockChartFontModel;
/**
* Defines the collection of technical indicators, that are used in financial markets.
*/
indicators?: StockChartIndicatorModel[];
/**
* Options for customizing the tooltip of the chart.
*/
tooltip?: StockTooltipSettingsModel;
/**
* Options for customizing the crosshair of the chart.
*/
crosshair?: CrosshairSettingsModel;
/**
* Options for customizing the legend of the stockChart.
*/
legendSettings?: StockChartLegendSettingsModel;
/**
* Options to enable the zooming feature in the chart.
*/
zoomSettings?: ZoomSettingsModel;
/**
* It specifies whether the periodSelector to be rendered in financial chart
*
* @default true
*/
enablePeriodSelector?: boolean;
/**
* Custom Range
*
* @default true
*/
enableCustomRange?: boolean;
/**
* If set true, enables the animation in chart.
*
* @default false
*/
isSelect?: boolean;
/**
* It specifies whether the range navigator to be rendered in financial chart
*
* @default true
*/
enableSelector?: boolean;
/**
* To configure period selector options.
*/
periods?: PeriodsModel[];
/**
* The configuration for annotation in chart.
*/
annotations?: StockChartAnnotationSettingsModel[];
/**
* Triggers before render the selector
*
* @event selectorRender
* @deprecated
*/
selectorRender?: EmitType<IRangeSelectorRenderEventArgs>;
/**
* Triggers on hovering the stock chart.
*
* @event stockChartMouseMove
* @blazorProperty 'OnStockChartMouseMove'
*/
stockChartMouseMove?: EmitType<IMouseEventArgs>;
/**
* Triggers when cursor leaves the chart.
*
* @event stockChartMouseLeave
* @blazorProperty 'OnStockChartMouseLeave'
*/
stockChartMouseLeave?: EmitType<IMouseEventArgs>;
/**
* Triggers on mouse down.
*
* @event stockChartMouseDown
* @blazorProperty 'OnStockChartMouseDown'
*/
stockChartMouseDown?: EmitType<IMouseEventArgs>;
/**
* Triggers on mouse up.
*
* @event stockChartMouseUp
* @blazorProperty 'OnStockChartMouseUp'
*/
stockChartMouseUp?: EmitType<IMouseEventArgs>;
/**
* Triggers on clicking the stock chart.
*
* @event stockChartMouseClick
* @blazorProperty 'OnStockChartMouseClick'
*/
stockChartMouseClick?: EmitType<IMouseEventArgs>;
/**
* Triggers on point click.
*
* @event pointClick
* @blazorProperty 'OnPointClick'
*/
pointClick?: EmitType<IPointEventArgs>;
/**
* Triggers on point move.
*
* @event pointMove
* @blazorProperty 'PointMoved'
*/
pointMove?: EmitType<IPointEventArgs>;
/**
* Triggers after the zoom selection is completed.
*
* @event onZooming
*/
onZooming?: EmitType<IZoomingEventArgs>;
/**
* Triggers before the legend is rendered.
*
* @event legendRender
* @deprecated
*/
legendRender?: EmitType<IStockLegendRenderEventArgs>;
/**
* Triggers after click on legend.
*
* @event legendClick
*/
legendClick?: EmitType<IStockLegendClickEventArgs>;
/**
* Specifies whether series or data point has to be selected. They are,
* * none: Disables the selection.
* * series: selects a series.
* * point: selects a point.
* * cluster: selects a cluster of point
* * dragXY: selects points by dragging with respect to both horizontal and vertical axes
* * dragX: selects points by dragging with respect to horizontal axis.
* * dragY: selects points by dragging with respect to vertical axis.
*
* @default None
*/
selectionMode?: SelectionMode;
/**
* If set true, enables the multi selection in chart. It requires `selectionMode` to be `Point` | `Series` | or `Cluster`.
*
* @default false
*/
isMultiSelect?: boolean;
/**
* Triggers before the range navigator rendering.
*
* @event load
*/
load?: EmitType<IStockChartEventArgs>;
/**
* Triggers after the range navigator rendering.
*
* @event loaded
* @blazorProperty 'Loaded'
*/
loaded?: EmitType<IStockChartEventArgs>;
/**
* Triggers if the range is changed
*
* @event rangeChange
* @blazorProperty 'RangeChange'
*/
rangeChange?: EmitType<IRangeChangeEventArgs>;
/**
* Triggers before each axis label is rendered.
*
* @event axisLabelRender
* @deprecated
*/
axisLabelRender?: EmitType<IAxisLabelRenderEventArgs>;
/**
* Triggers before the tooltip for series is rendered.
*
* @event tooltipRender
* @deprecated
*/
tooltipRender?: EmitType<ITooltipRenderEventArgs>;
/**
* Triggers before the series is rendered.
*
* @event seriesRender
* @deprecated
*/
seriesRender?: EmitType<ISeriesRenderEventArgs>;
/**
* Triggers before the series is rendered.
*
* @event stockEventRender
* @deprecated
*/
stockEventRender?: EmitType<IStockEventRenderArgs>;
/**
* Specifies the point indexes to be selected while loading a chart.
* It requires `selectionMode` to be `Point` | `Series` | or `Cluster`.
* ```html
* <div id='Chart'></div>
* ```
* ```typescript
* let chart: Chart = new Chart({
* ...
* selectionMode: 'Point',
* selectedDataIndexes: [ { series: 0, point: 1},
* { series: 2, point: 3} ],
* ...
* });
* chart.appendTo('#Chart');
* ```
*
* @default []
*/
selectedDataIndexes?: StockChartIndexesModel[];
/**
* It specifies the types of series in financial chart.
*/
seriesType?: ChartSeriesType[];
/**
* It specifies the types of indicators in financial chart.
*/
indicatorType?: TechnicalIndicators[];
/**
* It specifies the types of Export types in financial chart.
*/
exportType?: ExportType[];
/**
* It specifies the types of trendline types in financial chart.
*/
trendlineType?: TrendlineTypes[];
}