ComponentOne Xamarin.iOS Documentation
Controls / FlexPie / Features / Legend
In This Topic
    In This Topic

    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 BorderColorBorderWidth and Color properties. Additionally, you may use the Position property to determine where to display the chart legend.

    The legend automatically wraps when the Position property is set to Top, Bottom, Left or Right, Orientation property is set to Horizontal and there is not enough screen real estate.

    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.

    Copy Code
    pieChart.LegendStyle.Stroke = UIColor.Blue;
    pieChart.LegendStyle.StrokeThickness = 2;
    pieChart.LegendStyle.Fill = UIColor.LightGray;
    pieChart.LegendPosition = ChartPositionType.Left;