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

    You can specify the position where you want to display the legend using the LegendPosition property of the Sunburst chart. Legend helps in displaying the series of a chart with a predefined symbol and name of the series.

    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 Sunburst to efficiently occupy the available space on the device. Users have the option to customize the appearance of the legend and enhance the visual appeal of the Sunburst Chart control.

    The image below shows customized legend in the Sunburst Chart 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
    sunburst.LegendPosition = ChartPositionType.Top;sunburst.LegendOrientation = Orientation.Horizontal;sunburst.LegendStyle.Stroke = UIColor.Blue;sunburst.Header = "Product By Value";sunburst.Footer = "2014 GrapeCity.inc.";