FlexChart | ComponentOne
WPF FlexRadar Chart / Legend and Titles
本主题中
    Legend and Titles
    本主题中

    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#
    拷贝代码
    // 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
    拷贝代码
    ' 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