Sunburst Chart / Legend and Titles
Legend and Titles

Legend

The legend displays entries for series with their names and predefined symbols. In Sunburst, you can perform various customizations with the legend of Sunburst, as follows:

Header and Footer

Header and Footer are descriptive texts at the top and bottom of the chart that provide information about the overall chart data. You can access Header and Footer of Sunburst chart by using the Header and the Footer property respectively, of the FlexChartBase class. Possible customizations with Header and Footer are as follows:

The following image displays Sunburst chart with the legend and titles set and customized.

The following code snippet illustrates how to set respective properties for the legend and titles customization. This code uses the sample created in Quick Start.

<Chart:C1Sunburst x:Name="sunburst" 
                  SelectionMode="Point" 
                  SelectedItemOffset="0.1" 
                  SelectedItemPosition="Top" 
                  LegendPosition="None"
                  Header="Quartely Sales" 
                  Footer="Company XYZ" 
                  InnerRadius="0.1" 
                  Reversed="True" 
                  Palette="Dark" 
                  Offset="0.1" 
                  ItemsSource="{Binding HierarchicalData}" 
                  Binding="Value" 
                  BindingName="Year,Quarter,Month" 
                  ChildItemsPath="Items" 
                  ToolTipContent="{}{name}&#x000A;{y}" 
                  Margin="-376,0,0,0" 
                  LegendTitle="Year"  >
    <Chart:C1Sunburst.LegendTitleStyle>
        <Chart:ChartStyle FontFamily="Arial" 
                          FontSize="10" 
                          FontStretch="Normal" 
                          FontWeight="Bold"/>
    </Chart:C1Sunburst.LegendTitleStyle>
    <Chart:C1Sunburst.HeaderStyle>
        <Chart:ChartStyle FontFamily="Arial" 
                          FontSize="12" 
                          FontStretch="Normal" 
                          FontWeight="Bold"/>
    </Chart:C1Sunburst.HeaderStyle>
    <Chart:C1Sunburst.FooterStyle>
        <Chart:ChartStyle FontFamily="Arial" 
                          FontSize="10" 
                          FontStretch="Normal" 
                          FontWeight="Bold"/>
    </Chart:C1Sunburst.FooterStyle>
    <Chart:C1Sunburst.DataLabel>
        <Chart:PieDataLabel Position="Inside" 
                            Content="{}{name}" 
                            ConnectingLine="True" 
                            Border="True">
        </Chart:PieDataLabel>
    </Chart:C1Sunburst.DataLabel>
</Chart:C1Sunburst>