Skip to content

Commit d7a1710

Browse files
mdd-33214 (#732)
mdd-33214
1 parent d94dce0 commit d7a1710

File tree

3 files changed

+78
-1
lines changed

3 files changed

+78
-1
lines changed

code-gen-library/SelectionMatcherOnViewInit/Blazor.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff 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);
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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+
}

0 commit comments

Comments
 (0)