forked from syncfusion/ej2-javascript-ui-controls
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchart.ts
4518 lines (4177 loc) · 169 KB
/
chart.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
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* eslint-disable jsdoc/valid-types */
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable jsdoc/require-param-type */
/* eslint-disable jsdoc/require-returns-description */
/* eslint-disable @typescript-eslint/no-this-alias */
/* eslint-disable curly */
/* eslint-disable @typescript-eslint/tslint/config */
/* eslint-disable no-case-declarations */
/* eslint-disable max-len */
/* eslint-disable jsdoc/require-returns */
/* eslint-disable jsdoc/require-param */
/* eslint-disable valid-jsdoc */
import { Component, Property, NotifyPropertyChanges, Internationalization } from '@syncfusion/ej2-base';
import { ModuleDeclaration, L10n, setValue, isNullOrUndefined, updateBlazorTemplate } from '@syncfusion/ej2-base';
import { TapEventArgs, EmitType, ChildProperty } from '@syncfusion/ej2-base';
import { remove, extend } from '@syncfusion/ej2-base';
import { INotifyPropertyChanged, Browser, Touch } from '@syncfusion/ej2-base';
import { Event, EventHandler, Complex, Collection } from '@syncfusion/ej2-base';
import { findClipRect, showTooltip, ImageOption, removeElement, appendChildElement, blazorTemplatesReset, withInBounds } from '../common/utils/helper';
import { textElement, RectOption, createSvg, firstToLowerCase, titlePositionX, PointData, redrawElement, getTextAnchor } from '../common/utils/helper';
import { appendClipElement, ChartLocation } from '../common/utils/helper';
import { ChartModel, CrosshairSettingsModel, ZoomSettingsModel, RangeColorSettingModel } from './chart-model';
import { MarginModel, BorderModel, ChartAreaModel, FontModel, TooltipSettingsModel } from '../common/model/base-model';
import { getSeriesColor, Theme, getThemeColor } from '../common/model/theme';
import { IndexesModel, titleSettingsModel } from '../common/model/base-model';
import { Margin, Border, ChartArea, Font, Indexes, TooltipSettings, titleSettings } from '../common/model/base';
import { AxisModel, RowModel, ColumnModel } from './axis/axis-model';
import { Row, Column, Axis } from './axis/axis';
import { Highlight } from './user-interaction/high-light';
import { CartesianAxisLayoutPanel } from './axis/cartesian-panel';
import { DateTime } from './axis/date-time-axis';
import { Category } from './axis/category-axis';
import { DateTimeCategory } from './axis/date-time-category-axis';
import { CandleSeries } from './series/candle-series';
import { ErrorBar } from './series/error-bar';
import { Logarithmic } from './axis/logarithmic-axis';
import { Rect, measureText, TextOption, Size, SvgRenderer, BaseAttibutes, CanvasRenderer } from '@syncfusion/ej2-svg-base';
import { ChartData } from './utils/get-data';
import { LineType, ZoomMode, ToolbarItems } from './utils/enum';
import { SelectionMode, HighlightMode, ChartTheme } from '../common/utils/enum';
import { Points, Series, SeriesBase } from './series/chart-series';
import { SeriesModel } from './series/chart-series-model';
import { Data } from '../common/model/data';
import { LineSeries } from './series/line-series';
import { AreaSeries } from './series/area-series';
import { BarSeries } from './series/bar-series';
import { HistogramSeries } from './series/histogram-series';
import { StepLineSeries } from './series/step-line-series';
import { StepAreaSeries } from './series/step-area-series';
import { ColumnSeries } from './series/column-series';
import { ParetoSeries } from './series/pareto-series';
import { StackingColumnSeries } from './series/stacking-column-series';
import { StackingBarSeries } from './series/stacking-bar-series';
import { StackingAreaSeries } from './series/stacking-area-series';
import { StackingStepAreaSeries } from './series/stacking-step-area-series';
import { StackingLineSeries } from './series/stacking-line-series';
import { ScatterSeries } from './series/scatter-series';
import { SplineSeries } from './series/spline-series';
import { SplineAreaSeries } from './series/spline-area-series';
import { RangeColumnSeries } from './series/range-column-series';
import { PolarSeries } from './series/polar-series';
import { RadarSeries } from './series/radar-series';
import { HiloSeries } from './series/hilo-series';
import { HiloOpenCloseSeries } from './series/hilo-open-close-series';
import { WaterfallSeries } from './series/waterfall-series';
import { BubbleSeries } from './series/bubble-series';
import { RangeAreaSeries } from './series/range-area-series';
import { RangeStepAreaSeries } from './series/range-step-area-series';
import { SplineRangeAreaSeries } from './series/spline-range-area-series';
import { Tooltip } from './user-interaction/tooltip';
import { Crosshair } from './user-interaction/crosshair';
import { DataEditing } from './user-interaction/data-editing';
import { Marker, markerShapes } from './series/marker';
import { LegendSettings } from '../common/legend/legend';
import { LegendSettingsModel } from '../common/legend/legend-model';
import { Legend } from './legend/legend';
import { Zoom } from './user-interaction/zooming';
import { Selection } from './user-interaction/selection';
import { DataLabel } from './series/data-label';
import { StripLine } from './axis/strip-line';
import { MultiLevelLabel } from './axis/multi-level-labels';
import { BoxAndWhiskerSeries } from './series/box-and-whisker-series';
import { PolarRadarPanel } from './axis/polar-radar-panel';
import { StripLineSettingsModel } from './model/chart-base-model';
import { Trendline } from './series/chart-series';
import { Trendlines } from './trend-lines/trend-line';
import { TechnicalIndicator } from './technical-indicators/technical-indicator';
import { SmaIndicator } from './technical-indicators/sma-indicator';
import { EmaIndicator } from './technical-indicators/ema-indicator';
import { TmaIndicator } from './technical-indicators/tma-indicator';
import { AccumulationDistributionIndicator } from './technical-indicators/ad-indicator';
import { AtrIndicator } from './technical-indicators/atr-indicator';
import { BollingerBands } from './technical-indicators/bollinger-bands';
import { MomentumIndicator } from './technical-indicators/momentum-indicator';
import { StochasticIndicator } from './technical-indicators/stochastic-indicator';
import { MacdIndicator } from './technical-indicators/macd-indicator';
import { RsiIndicator } from './technical-indicators/rsi-indicator';
import { TechnicalIndicatorModel } from './technical-indicators/technical-indicator-model';
import { ILegendRenderEventArgs, IAxisLabelRenderEventArgs, ITextRenderEventArgs, IResizeEventArgs } from '../chart/model/chart-interface';
import { IAnnotationRenderEventArgs, IAxisMultiLabelRenderEventArgs, IThemeStyle, IScrollEventArgs } from '../chart/model/chart-interface';
import { IPointRenderEventArgs, ISeriesRenderEventArgs, ISelectionCompleteEventArgs } from '../chart/model/chart-interface';
import { IDragCompleteEventArgs, ITooltipRenderEventArgs, IExportEventArgs } from '../chart/model/chart-interface';
import { IZoomCompleteEventArgs, ILoadedEventArgs, IZoomingEventArgs, IAxisLabelClickEventArgs } from '../chart/model/chart-interface';
import { IMultiLevelLabelClickEventArgs, ILegendClickEventArgs, ISharedTooltipRenderEventArgs } from '../chart/model/chart-interface';
import { IAnimationCompleteEventArgs, IMouseEventArgs, IPointEventArgs, IBeforeResizeEventArgs } from '../chart/model/chart-interface';
import { chartMouseClick, chartDoubleClick, pointClick, pointDoubleClick, axisLabelClick, beforeResize } from '../common/model/constants';
import { chartMouseDown, chartMouseMove, chartMouseUp, load, pointMove, chartMouseLeave, resized } from '../common/model/constants';
import { IPrintEventArgs, IAxisRangeCalculatedEventArgs, IDataEditingEventArgs } from '../chart/model/chart-interface';
import { ChartAnnotationSettingsModel } from './model/chart-base-model';
import { ChartAnnotationSettings } from './model/chart-base';
import { ChartAnnotation } from './annotation/annotation';
import { getElement, getTitle } from '../common/utils/helper';
import { Alignment, ExportType, SelectionPattern, TextOverflow, TitlePosition } from '../common/utils/enum';
import { MultiColoredLineSeries } from './series/multi-colored-line-series';
import { MultiColoredAreaSeries } from './series/multi-colored-area-series';
import { ScrollBar } from '../common/scrollbar/scrollbar';
import { DataManager } from '@syncfusion/ej2-data';
import { StockChart } from '../stock-chart/stock-chart';
import { Export } from './print-export/export';
import { PrintUtils } from '../common/utils/print';
import { IAfterExportEventArgs } from '../common/model/interface';
/**
* Configures the RangeColorSetting in the chart.
*/
export class RangeColorSetting extends ChildProperty<RangeColorSetting> {
/**
* Specify the start value of color mapping range.
*/
@Property()
public start: number;
/**
* Specify the end value of color mapping range.
*/
@Property()
public end: number;
/**
* Specify the fill colors of point those lies on the given range, if multiple colors mentioned, then we need to fill gradient.
*/
@Property([])
public colors: string[];
/**
* Specify name for the range mapping item.
*/
@Property('')
public label: string;
}
/**
* Configures the crosshair in the chart.
*/
export class CrosshairSettings extends ChildProperty<CrosshairSettings> {
/**
* If set to true, crosshair line becomes visible.
*
* @default false
*/
@Property(false)
public enable: boolean;
/**
* DashArray for crosshair.
*
* @default ''
*/
@Property('')
public dashArray: string;
/**
* Options to customize the crosshair line.
*/
@Complex<BorderModel>({ color: null, width: 1 }, Border)
public line: BorderModel;
/**
* Specifies the line type. Horizontal mode enables the horizontal line and Vertical mode enables the vertical line. They are,
* * None: Hides both vertical and horizontal crosshair lines.
* * Both: Shows both vertical and horizontal crosshair lines.
* * Vertical: Shows the vertical line.
* * Horizontal: Shows the horizontal line.
*
* @default Both
*/
@Property('Both')
public lineType: LineType;
/**
* The color of the border that accepts value in hex and rgba as a valid CSS color string.
*
* @default ''
*/
@Property('')
public verticalLineColor: string;
/**
* The color of the border that accepts value in hex and rgba as a valid CSS color string.
*
* @default ''
*/
@Property('')
public horizontalLineColor: string;
/**
* The opacity for background.
*
* @default 1
*/
@Property(1)
public opacity: number;
}
/**
* Configures the zooming behavior for the chart.
*/
export class ZoomSettings extends ChildProperty<ZoomSettings> {
/**
* If set to true, chart can be zoomed by a rectangular selecting region on the plot area.
*
* @default false
*/
@Property(false)
public enableSelectionZooming: boolean;
/**
* If to true, chart can be pinched to zoom in / zoom out.
*
* @default false
*/
@Property(false)
public enablePinchZooming: boolean;
/**
* If set to true, chart can be rendered with toolbar at initial load.
*
* @default false
*/
@Property(false)
public showToolbar: boolean;
/**
* If set to true, chart can be zoomed by using mouse wheel.
*
* @default false
*/
@Property(false)
public enableMouseWheelZooming: boolean;
/**
* If set to true, zooming will be performed on mouse up. It requires `enableSelectionZooming` to be true.
* ```html
* <div id='Chart'></div>
* ```
* ```typescript
* let chart: Chart = new Chart({
* ...
* zoomSettings: {
* enableSelectionZooming: true,
* enableDeferredZooming: false
* }
* ...
* });
* chart.appendTo('#Chart');
* ```
*
* @default true
*/
@Property(true)
public enableDeferredZooming: boolean;
/**
* Specifies whether to allow zooming vertically or horizontally or in both ways. They are,
* * x,y: Chart can be zoomed both vertically and horizontally.
* * x: Chart can be zoomed horizontally.
* * y: Chart can be zoomed vertically.
* It requires `enableSelectionZooming` to be true.
* ```html
* <div id='Chart'></div>
* ```
* ```typescript
* let chart: Chart = new Chart({
* ...
* zoomSettings: {
* enableSelectionZooming: true,
* mode: 'XY'
* }
* ...
* });
* chart.appendTo('#Chart');
* ```
*
* @default 'XY'
*/
@Property('XY')
public mode: ZoomMode;
/**
* Specifies the toolkit options for the zooming as follows:
* * Zoom
* * ZoomIn
* * ZoomOut
* * Pan
* * Reset
*
* @default '["Zoom", "ZoomIn", "ZoomOut", "Pan", "Reset"]'
*/
@Property(['Zoom', 'ZoomIn', 'ZoomOut', 'Pan', 'Reset'])
public toolbarItems: ToolbarItems[];
/**
* Specifies whether chart needs to be panned by default.
*
* @default false.
*/
@Property(false)
public enablePan: boolean;
/**
* Specifies whether axis needs to have scrollbar.
*
* @default false.
*/
@Property(false)
public enableScrollbar: boolean;
}
/**
* Represents the Chart control.
* ```html
* <div id="chart"/>
* <script>
* var chartObj = new Chart({ isResponsive : true });
* chartObj.appendTo("#chart");
* </script>
* ```
*
* @public
*/
@NotifyPropertyChanges
export class Chart extends Component<HTMLElement> implements INotifyPropertyChanged {
//Module Declaration of Chart.
/**
* `lineSeriesModule` is used to add line series to the chart.
*/
public lineSeriesModule: LineSeries;
/**
* `multiColoredLineSeriesModule` is used to add multi colored line series to the chart.
*/
public multiColoredLineSeriesModule: MultiColoredLineSeries;
/**
* `multiColoredAreaSeriesModule` is used to add multi colored area series to the chart.
*/
public multiColoredAreaSeriesModule: MultiColoredAreaSeries;
/**
* `columnSeriesModule` is used to add column series to the chart.
*/
public columnSeriesModule: ColumnSeries;
/**
* `ParetoSeriesModule` is used to add pareto series in the chart.
*/
public paretoSeriesModule: ParetoSeries;
/**
* `areaSeriesModule` is used to add area series in the chart.
*/
public areaSeriesModule: AreaSeries;
/**
* `barSeriesModule` is used to add bar series to the chart.
*/
public barSeriesModule: BarSeries;
/**
* `stackingColumnSeriesModule` is used to add stacking column series in the chart.
*/
public stackingColumnSeriesModule: StackingColumnSeries;
/**
* `stackingAreaSeriesModule` is used to add stacking area series to the chart.
*/
public stackingAreaSeriesModule: StackingAreaSeries;
/**
* `stackingStepAreaSeriesModule` is used to add stacking step area series to the chart.
*/
public stackingStepAreaSeriesModule: StackingStepAreaSeries;
/**
* `stackingLineSeriesModule` is used to add stacking line series to the chart.
*/
public stackingLineSeriesModule: StackingLineSeries;
/**
* 'CandleSeriesModule' is used to add candle series in the chart.
*/
public candleSeriesModule: CandleSeries;
/**
* `stackingBarSeriesModule` is used to add stacking bar series to the chart.
*/
public stackingBarSeriesModule: StackingBarSeries;
/**
* `stepLineSeriesModule` is used to add step line series to the chart.
*/
public stepLineSeriesModule: StepLineSeries;
/**
* `stepAreaSeriesModule` is used to add step area series to the chart.
*/
public stepAreaSeriesModule: StepAreaSeries;
/**
* `polarSeriesModule` is used to add polar series in the chart.
*/
public polarSeriesModule: PolarSeries;
/**
* `radarSeriesModule` is used to add radar series in the chart.
*/
public radarSeriesModule: RadarSeries;
/**
* `splineSeriesModule` is used to add spline series to the chart.
*/
public splineSeriesModule: SplineSeries;
/**
* `splineAreaSeriesModule` is used to add spline area series to the chart.
*/
public splineAreaSeriesModule: SplineAreaSeries;
/**
* `scatterSeriesModule` is used to add scatter series to the chart.
*/
public scatterSeriesModule: ScatterSeries;
/**
* `boxAndWhiskerSeriesModule` is used to add line series to the chart.
*/
public boxAndWhiskerSeriesModule: BoxAndWhiskerSeries;
/**
* `rangeColumnSeriesModule` is used to add rangeColumn series to the chart.
*/
public rangeColumnSeriesModule: RangeColumnSeries;
/**
* histogramSeriesModule is used to add histogram series in chart
*/
public histogramSeriesModule: HistogramSeries;
/**
* hiloSeriesModule is used to add hilo series in chart
*/
public hiloSeriesModule: HiloSeries;
/**
* hiloOpenCloseSeriesModule is used to add hilo series in chart
*/
public hiloOpenCloseSeriesModule: HiloOpenCloseSeries;
/**
* `waterfallSeries` is used to add waterfall series in chart.
*/
public waterfallSeriesModule: WaterfallSeries;
/**
* `bubbleSeries` is used to add bubble series in chart.
*/
public bubbleSeriesModule: BubbleSeries;
/**
* `rangeAreaSeriesModule` is used to add rangeArea series in chart.
*/
public rangeAreaSeriesModule: RangeAreaSeries;
/**
* `rangeStepAreaSeriesModule` is used to add rangeStepArea series in chart.
*/
public rangeStepAreaSeriesModule: RangeStepAreaSeries;
/**
* `splineRangeAreaSeriesModule` is used to add splineRangeArea series in chart.
*/
public splineRangeAreaSeriesModule: SplineRangeAreaSeries;
/**
* `tooltipModule` is used to manipulate and add tooltip to the series.
*/
public tooltipModule: Tooltip;
/**
* `crosshairModule` is used to manipulate and add crosshair to the chart.
*/
public crosshairModule: Crosshair;
/**
* `errorBarModule` is used to manipulate and add errorBar for series.
*/
public errorBarModule: ErrorBar;
/**
* `dataLabelModule` is used to manipulate and add data label to the series.
*/
public dataLabelModule: DataLabel;
/**
* `datetimeModule` is used to manipulate and add dateTime axis to the chart.
*/
public dateTimeModule: DateTime;
/**
* `categoryModule` is used to manipulate and add category axis to the chart.
*/
public categoryModule: Category;
/**
* `dateTimeCategoryModule` is used to manipulate date time and category axis
*/
public dateTimeCategoryModule: DateTimeCategory;
/**
* `logarithmicModule` is used to manipulate and add log axis to the chart.
*/
public logarithmicModule: Logarithmic;
/**
* `legendModule` is used to manipulate and add legend to the chart.
*/
public legendModule: Legend;
/**
* `zoomModule` is used to manipulate and add zooming to the chart.
*/
public zoomModule: Zoom;
/**
* `dataEditingModule` is used to drag and drop of the point.
*/
public dataEditingModule: DataEditing;
/**
* `selectionModule` is used to manipulate and add selection to the chart.
*/
public selectionModule: Selection;
/**
* `highlightModule` is used to manipulate and add highlight to the chart.
*/
public highlightModule: Highlight;
/**
* `annotationModule` is used to manipulate and add annotation in chart.
*/
public annotationModule: ChartAnnotation;
/**
* `stripLineModule` is used to manipulate and add stripLine in chart.
*/
public stripLineModule: StripLine;
/**
* `multiLevelLabelModule` is used to manipulate and add multiLevelLabel in chart.
*/
public multiLevelLabelModule: MultiLevelLabel;
/**
* 'TrendlineModule' is used to predict the market trend using trendlines
*/
public trendLineModule: Trendlines;
/**
* `sMAIndicatorModule` is used to predict the market trend using SMA approach
*/
public sMAIndicatorModule: SmaIndicator;
/**
* `eMAIndicatorModule` is used to predict the market trend using EMA approach
*/
public eMAIndicatorModule: EmaIndicator;
/**
* `tMAIndicatorModule` is used to predict the market trend using TMA approach
*/
public tMAIndicatorModule: TmaIndicator;
/**
* `accumulationDistributionIndicatorModule` is used to predict the market trend using Accumulation Distribution approach
*/
public accumulationDistributionIndicatorModule: AccumulationDistributionIndicator;
/**
* `atrIndicatorModule` is used to predict the market trend using ATR approach
*/
public atrIndicatorModule: AtrIndicator;
/**
* `rSIIndicatorModule` is used to predict the market trend using RSI approach
*/
public rsiIndicatorModule: RsiIndicator;
/**
* `macdIndicatorModule` is used to predict the market trend using Macd approach
*/
public macdIndicatorModule: MacdIndicator;
/**
* `stochasticIndicatorModule` is used to predict the market trend using Stochastic approach
*/
public stochasticIndicatorModule: StochasticIndicator;
/**
* `momentumIndicatorModule` is used to predict the market trend using Momentum approach
*/
public momentumIndicatorModule: MomentumIndicator;
/**
* `bollingerBandsModule` is used to predict the market trend using Bollinger approach
*/
public bollingerBandsModule: BollingerBands;
/**
* ScrollBar Module is used to render scrollbar in chart while zooming.
*/
public scrollBarModule: ScrollBar;
/**
* Export Module is used to export chart.
*/
public exportModule: Export;
/**
* The width of the chart as a string, accepting input as both '100px' or '100%'.
* If specified as '100%', the chart renders to the full width of its parent element.
*
* @default null
*/
@Property(null)
public width: string;
/**
* The height of the chart as a string, accepting input as both '100px' or '100%'.
* If specified as '100%', the chart renders to the full height of its parent element.
*
* @default null
*/
@Property(null)
public height: string;
/**
* The title of the chart.
*
* @default ''
*/
@Property('')
public title: string;
/**
* Specifies the DataSource for the chart. It can be an array of JSON objects or an instance of DataManager.
* ```html
* <div id='Chart'></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 chart: Chart = new Chart({
* ...
* dataSource:dataManager,
* series: [{
* xName: 'Id',
* yName: 'Estimate',
* query: query
* }],
* ...
* });
* chart.appendTo('#Chart');
* ```
*
* @default ''
*/
@Property('')
public dataSource: Object | DataManager;
/**
* Options for customizing the title of the Chart.
*/
@Complex<titleSettingsModel>({fontFamily: null, size: "16px", fontStyle: 'Normal', fontWeight: '600', color: null}, titleSettings)
public titleStyle: titleSettingsModel;
/**
* The subtitle of the chart
*
* @default ''
*/
@Property('')
public subTitle: string;
/**
* Options for customizing the subtitle of the Chart.
*/
@Complex<titleSettingsModel>({fontFamily: null, size: "14px", fontStyle: 'Normal', fontWeight: '400', color: null}, titleSettings)
public subTitleStyle: titleSettingsModel;
/**
* Options to customize the left, right, top, and bottom margins of the chart.
*/
@Complex<MarginModel>({}, Margin)
public margin: MarginModel;
/**
* Options for customizing the color and width of the chart border.
*/
@Complex<BorderModel>({ color: '#DDDDDD', width: 0 }, Border)
public border: BorderModel;
/**
* The background color of the chart that accepts value in hex and rgba as a valid CSS color string.
*
* @default null
*/
@Property(null)
public background: string;
/**
* Options for configuring the border and background of the chart area.
*/
@Complex<ChartAreaModel>({ border: { color: null, width: 0.5 }, background: 'transparent' }, ChartArea)
public chartArea: ChartAreaModel;
/**
* Configuration options for the horizontal axis.
*/
@Complex<AxisModel>({ name: 'primaryXAxis' }, Axis)
public primaryXAxis: AxisModel;
/**
* Configuration options for the vertical axis.
*/
@Complex<AxisModel>({ name: 'primaryYAxis' }, Axis)
public primaryYAxis: AxisModel;
/**
* Options to split Chart into multiple plotting areas horizontally.
* Each object in the collection represents a plotting area in the Chart.
*/
@Collection<RowModel>([{}], Row)
public rows: RowModel[];
/**
* Options to split chart into multiple plotting areas vertically.
* Each object in the collection represents a plotting area in the chart.
*/
@Collection<ColumnModel>([{}], Column)
public columns: ColumnModel[];
/**
* Secondary axis collection for the chart.
*/
@Collection<AxisModel>([{}], Axis)
public axes: AxisModel[];
/**
* Configuration options for the chart's series.
*/
@Collection<SeriesModel>([{}], Series)
public series: SeriesModel[];
/**
* The configuration for annotation in chart.
*/
@Collection<ChartAnnotationSettingsModel>([{}], ChartAnnotationSettings)
public annotations: ChartAnnotationSettingsModel[];
/**
* Palette for the chart series.
*
* @default []
*/
@Property([])
public palettes: string[];
/**
* Specifies the theme for the chart.
*
* @default 'Material'
*/
@Property('Material')
public theme: ChartTheme;
/**
* The chart tooltip configuration options.
*/
@Complex<TooltipSettingsModel>({}, TooltipSettings)
public tooltip: TooltipSettingsModel;
/**
* Options for customizing the crosshair of the chart.
*/
@Complex<CrosshairSettingsModel>({}, CrosshairSettings)
public crosshair: CrosshairSettingsModel;
/**
* The chart legend configuration options.
*/
@Complex<LegendSettingsModel>({}, LegendSettings)
public legendSettings: LegendSettingsModel;
/**
* Options for customizing the points fill color based on condition.
*/
@Collection<RangeColorSettingModel>([{}], RangeColorSetting)
public rangeColorSettings: RangeColorSettingModel[];
/**
* Options to enable the zooming feature in the chart.
*/
@Complex<ZoomSettingsModel>({}, ZoomSettings)
public zoomSettings: ZoomSettingsModel;
/**
* Defines the color for the highlighted data point.
*
* @default ''
*/
@Property('')
public highlightColor: string;
/**
* Specifies whether a series or data point should be highlighted. The options are:
* * 'none': Disables the highlight.
* * 'series': Highlights a series.
* * 'point': Highlights a single data point.
* * 'cluster': Highlights a cluster of data points.
* * '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.
* * 'lasso': Selects points by dragging with respect to free form.
*
* @default None
*/
@Property('None')
public selectionMode: SelectionMode;
/**
* Specifies whether a series or data point should be highlighted. The options are:
* * 'none': Disables the highlight
* * 'series': Highlights a series
* * 'point': Highlights a single data point.
* * 'cluster': Highlights a cluster of data points.
*
* @default None
*/
@Property('None')
public highlightMode: HighlightMode;
/**
* Specifies whether series or data point has to be selected. They are,
* * none: sets none as selecting pattern.
* * chessboard: sets chess board as selecting pattern.
* * dots: sets dots as selecting pattern.
* * diagonalForward: sets diagonal forward as selecting pattern.
* * crosshatch: sets crosshatch as selecting pattern.
* * pacman: sets pacman selecting pattern.
* * diagonalbackward: sets diagonal backward as selecting pattern.
* * grid: sets grid as selecting pattern.
* * turquoise: sets turquoise as selecting pattern.
* * star: sets star as selecting pattern.
* * triangle: sets triangle as selecting pattern.
* * circle: sets circle as selecting pattern.
* * tile: sets tile as selecting pattern.
* * horizontaldash: sets horizontal dash as selecting pattern.
* * verticaldash: sets vertical dash as selecting pattern.
* * rectangle: sets rectangle as selecting pattern.
* * box: sets box as selecting pattern.
* * verticalstripe: sets vertical stripe as selecting pattern.
* * horizontalstripe: sets horizontal stripe as selecting pattern.
* * bubble: sets bubble as selecting pattern.
*
* @default None
*/
@Property('None')
public selectionPattern: SelectionPattern;
/**
* Specifies whether series or data point has to be selected. They are,
* * none: sets none as highlighting pattern.
* * chessboard: sets chess board as highlighting pattern.
* * dots: sets dots as highlighting pattern.
* * diagonalForward: sets diagonal forward as highlighting pattern.
* * crosshatch: sets crosshatch as highlighting pattern.
* * pacman: sets pacman highlighting pattern.
* * diagonalbackward: sets diagonal backward as highlighting pattern.
* * grid: sets grid as highlighting pattern.
* * turquoise: sets turquoise as highlighting pattern.
* * star: sets star as highlighting pattern.
* * triangle: sets triangle as highlighting pattern.
* * circle: sets circle as highlighting pattern.
* * tile: sets tile as highlighting pattern.
* * horizontaldash: sets horizontal dash as highlighting pattern.
* * verticaldash: sets vertical dash as highlighting pattern.
* * rectangle: sets rectangle as highlighting pattern.
* * box: sets box as highlighting pattern.
* * verticalstripe: sets vertical stripe as highlighting pattern.
* * horizontalstripe: sets horizontal stripe as highlighting pattern.
* * bubble: sets bubble as highlighting pattern.
*
* @default None
*/
@Property('None')
public highlightPattern: SelectionPattern;
/**
* If set to true, enables multi-selection in the chart. It requires the `selectionMode` to be `Point`, `Series`, or `Cluster`.
*
* @default false
*/
@Property(false)
public isMultiSelect: boolean;
/**
* If set true, enables the multi drag selection in chart. It requires `selectionMode` to be `Dragx` | `DragY` | or `DragXY`.
*
* @default false
*/
@Property(false)
public allowMultiSelection: boolean;
/**
* To enable export feature in chart.
*
* @default true
*/
@Property(true)
public enableExport: boolean;
/**
* To enable export feature in blazor chart.
*
* @default false
*/
@Property(false)
public allowExport: boolean;
/**
* Specifies the point indexes to be selected while loading a chart.
* It requires `selectionMode` or `highlightMode` 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 []
*/
@Collection<IndexesModel>([], Indexes)
public selectedDataIndexes: IndexesModel[];
/**
* Specifies whether a grouping separator should be used for numbers.
*
* @default false
*/
@Property(false)
public useGroupingSeparator: boolean;
/**
* If set to true, both axis interval will be calculated automatically with respect to the zoomed range.
*
* @default false
*/
@Property(false)
public enableAutoIntervalOnBothAxis: boolean;
/**
* It specifies whether the chart should be render in transposed manner or not.
*
* @default false
*/
@Property(false)
public isTransposed: boolean;
/**
* It specifies whether the chart should be rendered in canvas mode.
*
* @default false
*/
@Property(false)
public enableCanvas: boolean;
/**
* The background image of the chart that accepts value in string as url link or location of an image.
*
* @default null
*/
@Property(null)
public backgroundImage: string;
/**
* Defines the collection of technical indicators, that are used in financial markets.