Shop
Anmelden
MindFusion

Q: I want to show several pie controls under each other and I want to have the pies look all the same. Is it possible to adjust the size of the pie in the control?

A: It is not possible directly to set the radius of the pie chart in the WPF control. But there are other ways, which you can affect the size of the pie.

1. You can change the margin around the entire pie – this will increase / decrease the space around the graphic and will affect its size:

 //set the margin around the pie
 pieChart1.PlotAreaMargin = new Thickness(3);


By default the PlotAreaMargin is set to Thickness(10).

2. You can change the offset of the outer labels, if you use any. You can delete them to have more space for the pie or increase their offset to make the pie smaller.

 PieSeries pieSeries = pieChart1.Series[0] as PieSeries;

 //no labels outside the pie pieces
 pieSeries.OuterLabelType = LabelType.Empty;

 //change the offset of the outer labels
 pieSeries.OuterLabelOffset = 10;

Copyright © 2001-2024 MindFusion LLC. Alle Rechte vorbehalten.
Nutzungsbedingungen - Kontakt