FlexChart | ComponentOne
FlexRadar / Legend and Titles
In This Topic
    Legend and Titles
    In This Topic

    Legend

    The legend displays entries for series with their names and predefined symbols. In FlexRadar, you can perform various customizations with the legend of FlexRadar, 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 FlexRadar 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 FlexRadar with the legend and titles set.

    The following code snippet demonstrates how to set various properties.

    <Chart:C1FlexRadar Header="Country Wise Comparison" 
                       LegendOrientation="Vertical" 
                       LegendPosition="Right" 
                       LegendTitle="Parameters"
                       ChartType="Area" 
                       Reversed="True" 
                       StartAngle="10"
                       ItemsSource="{Binding DataContext.Data}" 
                       BindingX="Country" 
                       Margin="54,78,58,10" Palette="Standard">
        <Chart:C1FlexRadar.HeaderStyle>
            <Chart:ChartStyle FontFamily="Arial" 
                              FontSize="14" 
                              FontWeight="Bold" 
                              Stroke="Blue"/>
        </Chart:C1FlexRadar.HeaderStyle>
        <Chart:C1FlexRadar.FooterStyle>
            <Chart:ChartStyle FontFamily="Arial" 
                              FontSize="12" 
                              FontWeight="Bold"/>
        </Chart:C1FlexRadar.FooterStyle>
        <Chart:C1FlexRadar.LegendStyle>
            <Chart:ChartStyle FontFamily="Arial" 
                              FontSize="11" 
                              FontWeight="Bold" 
                              Stroke="DarkCyan"/>
        </Chart:C1FlexRadar.LegendStyle>
        <Chart:C1FlexRadar.LegendTitleStyle>
            <Chart:ChartStyle FontFamily="Arial" 
                              FontSize="11" 
                              FontWeight="Bold" 
                              Stroke="Brown"/>
        </Chart:C1FlexRadar.LegendTitleStyle>
        <Chart:Series SeriesName="Sales" 
                      Binding="Sales"/>
        <Chart:Series SeriesName="Expenses" 
                      Binding="Expenses" />
    </Chart:C1FlexRadar>
    
    C#
    Copy Code
    // set the FlexRadar header
    flexRadar.Header = "Country Wise Comparison";
    
    // set the legend orientation
    flexRadar.LegendOrientation = C1.Chart.Orientation.Horizontal;
    
    // set the legend position
    flexRadar.LegendPosition = C1.Chart.Position.Bottom;
    
                   
    VB
    Copy Code
    ' set the FlexRadar header
    flexRadar.Header = "Country Wise Comparison"
    
    ' set the legend orientation
    flexRadar.LegendOrientation = C1.Chart.Orientation.Horizontal
    
    ' set the legend position
    flexRadar.LegendPosition = C1.Chart.Position.Bottom