Changing the Offset for All Slices

To change the offset for all Pie slices, use the following code:

 

chart.DataContext = new double[] { 1, 2, 3 };

      chart.ChartType = ChartType.Pie;

      chart.Loaded += (s, e) => ((BasePieRenderer)chart.Data.Renderer).Offset = 0.1;

 

Also it's possible to change offset for the specific slice but it requires to change the position manually in PlotElementLoaded event.


Send us comments about this topic.
Copyright © GrapeCity, inc. All rights reserved.