File tree Expand file tree Collapse file tree 3 files changed +8
-13
lines changed
samples/charts/doughnut-chart/explosion Expand file tree Collapse file tree 3 files changed +8
-13
lines changed Original file line number Diff line number Diff line change 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"
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
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}
Original file line number Diff line number Diff line change 1+
2+ igRegisterScript ( "OnSliceClickScript" , ( ctx , evtArgs ) => {
3+
4+ evtArgs . isExploded = ! evtArgs . isExploded ;
5+
6+ } , false ) ;
Original file line number Diff line number Diff line change 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>
You can’t perform that action at this time.
0 commit comments