ComponentOne Xamarin.Forms Documentation
Controls / FlexChart / Features / Header Footer
In This Topic
    Header Footer
    In This Topic

    You can add a title to the FlexChart control by setting its Header property. Besides a title, you may also set a footer for the chart by setting the Footer property. There are also some additional properties to customize header and footer text in a FlexChart.

    The image below shows how the FlexChart appears, after these properties have been set.

    Header and footer in FlexChart

    The following code examples demonstrate how to set header and footer properties in C# and XAML. This example uses the sample created in the Quick Start section.

    In Code

    C#
    Copy Code
    //Set header and footer
    chart.Header = "Sales data";      
    chart.HeaderAlignment = LayoutAlignment.Fill;
    
    chart.Footer = "Random data by ComponentOne";
    chart.FooterAlignment = LayoutAlignment.Fill;
    

    In XAML

    XAML
    Copy Code
    <c1:FlexChart x:Name="chart" ItemsSource="{Binding Data}" BindingX="Name" ChartType="Column"
    Header="Sales Data" HeaderAlignment="Fill" Footer="Random data by ComponentOne"
    FooterAlignment="Fill">
    </c1:FlexChart>