I see that it is possible to "explode" a segment, but I'd like to simply make one of the segments thicker (e.g., smaller inner radius, larger outer radius)
3 Answers, 1 is accepted
Thank you for your question.
At this moment, RadPieChart does not support functionality for changing the inner/outer radius for a specific series point; such properties are available only for the whole series.
The segments are of type Path and you can use the SegmentStyleSelector property of the chart series to define custom style for every segment, but this will not affect the radius of the segment.
If you have any other questions or suggestions do not hesitate to contact us again.
Rositsa Topchiyska
Telerik
Instead of altering the radius of the segment, what if I instead wanted to place an icon (or XAML path object) within a segment. Looking at the documentation for SegmentStyleSelector, it seems like this would be possible. Do you have any code samples available that show how to write a custom style for the segment and apply it using the selector?
The segments are objects of type Path and they can be styled via the PieChart.SegmentStyleSelector property. I have attached a project that demonstrates how to do that: you have to create a class that inherits the StyleSelector class and override the SelectStyleCore method that defines the style of each segment.
Note, however, that you cannot put additional content in the segment Path with this approach. You can achieve your desired functionality by retemplating the default content of the pie item labels. You can use the LabelDefinitions property of the Series to change the DataTemplate of the labels and put your desired content instead. Also, via the Margin property you can put the labels on the position you want.
For example:
<telerik:DoughnutSeries.LabelDefinitions> <telerik:ChartSeriesLabelDefinition Margin="50,0,0,0"> <telerik:ChartSeriesLabelDefinition.Template> <DataTemplate> <Ellipse Width="30" Height="30" Fill="White" Stroke="LightGray"/> </DataTemplate> </telerik:ChartSeriesLabelDefinition.Template> </telerik:ChartSeriesLabelDefinition></telerik:DoughnutSeries.LabelDefinitions>I hope this was useful and let me know if there is something else that I can assist you with.
Rositsa Topchiyska
Telerik