FlexPie provides the option to display legend for denoting the type of the data presented in the pie slices. The position of legend is by default set to "Auto", which means the legend positions itself automatically depending on the real estate available on the device. This allows the pie to efficiently occupy the available space on the device.
You can customize the legend in the FlexPie using the BorderColor, BorderWidth and Color properties. Additionally, you may use the Position property to determine where to display the chart legend.
The image below shows customized legend in the FlexPie control.
The following code example demonstrates how to set these properties. This example uses the sample created in the Quick Start section.
CS |
Copy Code
|
---|---|
pieChart.LegendStyle.Stroke = UIColor.Blue; pieChart.LegendStyle.StrokeThickness = 2; pieChart.LegendStyle.Fill = UIColor.LightGray; pieChart.LegendPosition = ChartPositionType.Left; |