@@ -36,23 +36,85 @@ export default class Sample extends React.Component<any, any> {
3636 this . setState ( { } ) ;
3737 }
3838 private xAxisBottom : IgrCategoryXAxis
39+ private xAxisBottonRef ( r : IgrCategoryXAxis ) {
40+ this . xAxisBottom = r ;
41+ this . setState ( { } ) ;
42+ }
3943 private xAxis : IgrCategoryXAxis
44+ private xAxisRef ( r : IgrCategoryXAxis ) {
45+ this . xAxis = r ;
46+ this . setState ( { } ) ;
47+ }
4048 private xAxisTop : IgrCategoryXAxis
49+ private xAxisTopRef ( r : IgrCategoryXAxis ) {
50+ this . xAxisTop = r ;
51+ this . setState ( { } ) ;
52+ }
4153 private yAxisLeft : IgrNumericYAxis
54+ private yAxisLeftRef ( r : IgrNumericYAxis ) {
55+ this . yAxisLeft = r ;
56+ this . setState ( { } ) ;
57+ }
4258 private yAxisRight : IgrNumericYAxis
59+ private yAxisRightRef ( r : IgrNumericYAxis ) {
60+ this . yAxisRight = r ;
61+ this . setState ( { } ) ;
62+ }
4363 private series1 : IgrFinancialPriceSeries
4464 private tooltip : IgrDataToolTipLayer
4565 private stripLayer : IgrDataAnnotationStripLayer
66+ private stripRef1 ( r : IgrDataAnnotationStripLayer ) {
67+ this . stripLayer = r ;
68+ this . setState ( { } ) ;
69+ }
4670 private lineLayer52WeekRange : IgrDataAnnotationLineLayer
71+ private lineRef1 ( r : IgrDataAnnotationLineLayer ) {
72+ this . lineLayer52WeekRange = r ;
73+ this . setState ( { } ) ;
74+ }
4775 private lineLayerGrowthAndDecline : IgrDataAnnotationLineLayer
76+ private lineRef2 ( r : IgrDataAnnotationLineLayer ) {
77+ this . lineLayerGrowthAndDecline = r ;
78+ this . setState ( { } ) ;
79+ }
4880 private sliceLayerStockSplit : IgrDataAnnotationSliceLayer
81+ private sliceRef1 ( r : IgrDataAnnotationSliceLayer ) {
82+ this . sliceLayerStockSplit = r ;
83+ this . setState ( { } ) ;
84+ }
4985 private sliceLayerEarningsMissAnnotations : IgrDataAnnotationSliceLayer
86+ private sliceRef2 ( r : IgrDataAnnotationSliceLayer ) {
87+ this . sliceLayerEarningsMissAnnotations = r ;
88+ this . setState ( { } ) ;
89+ }
5090 private sliceLayerEarningsBeatAnnotations : IgrDataAnnotationSliceLayer
51-
91+ private sliceRef3 ( r : IgrDataAnnotationSliceLayer ) {
92+ this . sliceLayerEarningsBeatAnnotations = r ;
93+ this . setState ( { } ) ;
94+ }
5295 constructor ( props : any ) {
5396 super ( props ) ;
5497
5598 this . chartRef = this . chartRef . bind ( this ) ;
99+ this . stripRef1 = this . stripRef1 . bind ( this ) ;
100+ this . lineRef1 = this . lineRef1 . bind ( this ) ;
101+ this . lineRef2 = this . lineRef2 . bind ( this ) ;
102+ this . sliceRef1 = this . sliceRef1 . bind ( this ) ;
103+ this . sliceRef2 = this . sliceRef2 . bind ( this ) ;
104+ this . sliceRef3 = this . sliceRef3 . bind ( this ) ;
105+ this . xAxisRef = this . xAxisRef . bind ( this ) ;
106+ this . xAxisBottonRef = this . xAxisBottonRef . bind ( this ) ;
107+ this . xAxisTopRef = this . xAxisTopRef . bind ( this ) ;
108+ this . yAxisLeftRef = this . yAxisLeftRef . bind ( this ) ;
109+ this . yAxisRightRef = this . yAxisRightRef . bind ( this ) ;
110+ }
111+ componentDidMount ( ) : void {
112+ this . stripLayer . targetAxis = this . xAxisTop ;
113+ this . lineLayer52WeekRange . targetAxis = this . yAxisRight ;
114+ this . lineLayerGrowthAndDecline . targetAxis = this . xAxis ;
115+ this . sliceLayerStockSplit . targetAxis = this . xAxisBottom ;
116+ this . sliceLayerEarningsMissAnnotations . targetAxis = this . xAxisBottom ;
117+ this . sliceLayerEarningsBeatAnnotations . targetAxis = this . xAxisBottom ;
56118 }
57119
58120 public render ( ) : JSX . Element {
@@ -80,6 +142,7 @@ export default class Sample extends React.Component<any, any> {
80142 chartTitle = "This Data Chart has multiple Data Annotation Layers bound to data that annotates important events and patterns in stock prices." >
81143 < IgrCategoryXAxis
82144 name = "xAxisBottom"
145+ ref = { this . xAxisBottonRef }
83146 dataSource = { this . stockTesla }
84147 label = "index"
85148 tickLength = "0"
@@ -95,6 +158,7 @@ export default class Sample extends React.Component<any, any> {
95158 </ IgrCategoryXAxis >
96159 < IgrCategoryXAxis
97160 name = "xAxis"
161+ ref = { this . xAxisRef }
98162 dataSource = { this . stockTesla }
99163 label = "date"
100164 labelLeftMargin = "0"
@@ -104,6 +168,7 @@ export default class Sample extends React.Component<any, any> {
104168 </ IgrCategoryXAxis >
105169 < IgrCategoryXAxis
106170 name = "xAxisTop"
171+ ref = { this . xAxisTopRef }
107172 dataSource = { this . stockTesla }
108173 label = "date"
109174 tickLength = "0"
@@ -118,6 +183,7 @@ export default class Sample extends React.Component<any, any> {
118183 </ IgrCategoryXAxis >
119184 < IgrNumericYAxis
120185 name = "yAxisLeft"
186+ ref = { this . yAxisLeftRef }
121187 labelLocation = "OutsideLeft"
122188 labelTextStyle = "normal normal 12px Verdana"
123189 labelExtent = "80"
@@ -131,6 +197,7 @@ export default class Sample extends React.Component<any, any> {
131197 </ IgrNumericYAxis >
132198 < IgrNumericYAxis
133199 name = "yAxisRight"
200+ ref = { this . yAxisRightRef }
134201 labelLocation = "OutsideRight"
135202 labelTextStyle = "normal normal 12px Verdana"
136203 labelExtent = "80"
@@ -161,9 +228,9 @@ export default class Sample extends React.Component<any, any> {
161228 layoutMode = "Vertical" >
162229 </ IgrDataToolTipLayer >
163230 < IgrDataAnnotationStripLayer
231+ ref = { this . stripRef1 }
164232 name = "StripLayer"
165233 dataSource = { this . annotationStripData }
166- targetAxisName = "xAxisTop"
167234 centerLabelMemberPath = "label"
168235 startValueMemberPath = "start"
169236 endValueMemberPath = "end"
@@ -177,8 +244,8 @@ export default class Sample extends React.Component<any, any> {
177244 </ IgrDataAnnotationStripLayer >
178245 < IgrDataAnnotationLineLayer
179246 name = "LineLayer52WeekRange"
247+ ref = { this . lineRef1 }
180248 dataSource = { this . annotationLineData1 }
181- targetAxisName = "yAxisRight"
182249 centerLabelXDisplayMode = "Hidden"
183250 startLabelXDisplayMode = "Hidden"
184251 startLabelYDisplayMode = "DataValue"
@@ -200,8 +267,8 @@ export default class Sample extends React.Component<any, any> {
200267 </ IgrDataAnnotationLineLayer >
201268 < IgrDataAnnotationLineLayer
202269 name = "LineLayerGrowthAndDecline"
270+ ref = { this . lineRef2 }
203271 dataSource = { this . annotationLineData2 }
204- targetAxisName = "xAxis"
205272 centerLabelXDisplayMode = "Hidden"
206273 startLabelXDisplayMode = "Hidden"
207274 endLabelXDisplayMode = "Hidden"
@@ -221,8 +288,8 @@ export default class Sample extends React.Component<any, any> {
221288 </ IgrDataAnnotationLineLayer >
222289 < IgrDataAnnotationSliceLayer
223290 name = "SliceLayerStockSplit"
291+ ref = { this . sliceRef1 }
224292 dataSource = { this . annotationSliceStockSplitData }
225- targetAxisName = "xAxisBottom"
226293 brush = "dodgerblue"
227294 annotationTextColor = "white"
228295 annotationLabelMemberPath = "label"
@@ -235,8 +302,8 @@ export default class Sample extends React.Component<any, any> {
235302 </ IgrDataAnnotationSliceLayer >
236303 < IgrDataAnnotationSliceLayer
237304 name = "SliceLayerEarningsMissAnnotations"
305+ ref = { this . sliceRef2 }
238306 dataSource = { this . annotationSliceEarningsMissData }
239- targetAxisName = "xAxisBottom"
240307 brush = "red"
241308 annotationTextColor = "white"
242309 annotationLabelMemberPath = "label"
@@ -249,8 +316,8 @@ export default class Sample extends React.Component<any, any> {
249316 </ IgrDataAnnotationSliceLayer >
250317 < IgrDataAnnotationSliceLayer
251318 name = "SliceLayerEarningsBeatAnnotations"
319+ ref = { this . sliceRef3 }
252320 dataSource = { this . annotationSliceEarningsBeatData }
253- targetAxisName = "xAxisBottom"
254321 brush = "green"
255322 annotationTextColor = "white"
256323 annotationLabelMemberPath = "label"
0 commit comments