File tree Expand file tree Collapse file tree 3 files changed +78
-1
lines changed
code-gen-library/SelectionMatcherOnViewInit Expand file tree Collapse file tree 3 files changed +78
-1
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,6 @@ private void addSelection()
3737 matcher = new IgbSeriesMatcher ( ) ;
3838 matcher . MemberPath = "Hydro" ;
3939 matcher . MemberPathType = "ValueMemberPath" ;
40-
4140 selection . Matcher = matcher ;
4241
4342 chart . SelectedSeriesItems . Add ( selection ) ;
Original file line number Diff line number Diff line change 1+ //begin imports
2+ import { IgrCategoryChart , IgrChartSelection , IgrSeriesMatcher } from 'igniteui-react-charts' ;
3+ //end imports
4+
5+ import { CodeGenHelper } from 'igniteui-webcomponents-core' ;
6+
7+ export class SelectionMatcherOnViewInit
8+ {
9+
10+ //begin eventHandler
11+ private _timer : ReturnType < typeof setInterval > ;
12+
13+ public selectionMatcherOnViewInit ( ) : void {
14+
15+ var chart = CodeGenHelper . getDescription < IgrCategoryChart > ( "content" ) ;
16+
17+ this . _timer = setInterval ( ( ) => {
18+ var selection = new IgrChartSelection ( ) ;
19+ selection . item = this . energyRenewableConsumption [ 1 ] ;
20+
21+ var matcher = new IgrSeriesMatcher ( ) ;
22+ matcher . memberPath = "solar" ;
23+ matcher . memberPathType = "ValueMemberPath" ;
24+ selection . matcher = matcher ;
25+
26+ chart . selectedSeriesItems . add ( selection ) ;
27+
28+ selection . item = this . energyRenewableConsumption [ 1 ] ;
29+ matcher . memberPath = "hydro" ;
30+ matcher . memberPathType = "ValueMemberPath" ;
31+ selection . matcher = matcher ;
32+
33+ chart . selectedSeriesItems . add ( selection ) ;
34+
35+ } , 100 ) ;
36+ }
37+ //end eventHandler
38+
39+ }
Original file line number Diff line number Diff line change 1+ //begin imports
2+ import { IgcCategoryChartComponent , IgcChartSelection , IgcSeriesMatcher } from 'igniteui-webcomponents-charts' ;
3+ //end imports
4+
5+ import { CodeGenHelper } from 'igniteui-webcomponents-core' ;
6+
7+ export class SelectionMatcherOnViewInit
8+ {
9+
10+ //begin eventHandler
11+ private _timer : ReturnType < typeof setInterval > ;
12+
13+ public selectionMatcherOnViewInit ( ) : void {
14+
15+ var chart = CodeGenHelper . getDescription < IgcCategoryChartComponent > ( "content" ) ;
16+
17+ this . _timer = setInterval ( ( ) => {
18+ let selection : IgcChartSelection = new IgcChartSelection ( ) ;
19+ selection . item = this . energyRenewableConsumption [ 1 ] ;
20+
21+ let matcher : IgcSeriesMatcher = new IgcSeriesMatcher ( ) ;
22+ matcher . memberPath = "solar" ;
23+ matcher . memberPathType = "ValueMemberPath" ;
24+ selection . matcher = matcher ;
25+
26+ chart . selectedSeriesItems . add ( selection ) ;
27+
28+ selection . item = this . energyRenewableConsumption [ 1 ] ;
29+ matcher . memberPath = "hydro" ;
30+ matcher . memberPathType = "ValueMemberPath" ;
31+ selection . matcher = matcher ;
32+
33+ chart . selectedSeriesItems . add ( selection ) ;
34+
35+ } , 100 ) ;
36+ }
37+ //end eventHandler
38+
39+ }
You can’t perform that action at this time.
0 commit comments