Skip to content

Commit 30f9927

Browse files
committed
mdd-fix-slice-explosion
mdd-fix-slice-explosion
1 parent a219901 commit 30f9927

File tree

3 files changed

+8
-13
lines changed

3 files changed

+8
-13
lines changed

samples/charts/doughnut-chart/explosion/App.razor

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
{
1818
<IgbDoughnutChart Height="100%" Width="100%" @ref="Chart"
1919
AllowSliceExplosion="true"
20-
SliceClick="OnSliceClick">
20+
SliceClickScript="OnSliceClickScript">
2121
<IgbRingSeries DataSource="Data"
2222
LabelMemberPath="Summary"
2323
LabelsPosition="LabelsPosition.OutsideEnd"
@@ -40,7 +40,6 @@
4040
@code {
4141

4242
private List<DataItem> Data;
43-
public int[] explodedSlices { get; set; } = new int[0];
4443
public IgbItemLegend Legend;
4544
public IgbDoughnutChart Chart;
4645

@@ -66,14 +65,4 @@
6665
if (Chart != null && Legend != null && !firstRender)
6766
this.Chart.ActualSeries[0].Legend = Legend;
6867
}
69-
70-
protected void OnSliceClick(IgbSliceClickEventArgs e)
71-
{
72-
//Console.WriteLine("Sample OnButtonClick");
73-
74-
// TODO
75-
// e.IsExploded = !e.IsExploded;
76-
//e.IsSelected = false;
77-
//explodedSlices = new int[] { e.Index };
78-
}
7968
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+

2+
igRegisterScript("OnSliceClickScript", (ctx, evtArgs) => {
3+
4+
evtArgs.isExploded = !evtArgs.isExploded;
5+
6+
}, false);

samples/charts/doughnut-chart/explosion/wwwroot/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<!-- importing blazor bundle for IG controls: -->
2525
<script src="_content/IgniteUI.Blazor/app.bundle.js"></script>
2626
<script src="_framework/blazor.webassembly.js"></script>
27-
27+
<script src="events.js"/>
2828
</body>
2929

3030
</html>

0 commit comments

Comments
 (0)