Xuni Product Documentation - Xamarin.Forms
Header Footer

You can add a title to the FlexChart control by setting its HeaderText property. Besides a title, you may also set a footer for the chart by setting the FooterText 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.

The following code examples demonstrate how to set these properties in C# and XAML. These examples use the sample created in the Quick Start section.

In Code

C#
Copy Code
chart.HeaderText = "Sales Data for 2015";
chart.HeaderFontSize = 20;
chart.HeaderTextColor = Color.Aqua;

chart.FooterText = "*Random data by ComponentOne";
chart.FooterFontSize = 20;
chart.FooterTextColor = Color.Aqua;

In XAML

XAML
Copy Code
<xuni:FlexChart x:Name="chart" ChartType="Column" ItemsSource="{Binding Data}" BindingX="Name"
  HeaderText = "Sales Data for 2015" HeaderTextColor="#3366FF" HeaderFontSize="20"
  FooterText="*Random data by ComponentOne" FooterTextColor="#FFFFFF" FooterFontSize="20"
  Grid.Row="1" Grid.ColumnSpan="2">
  <xuni:FlexChart.Series>
    <xuni:ChartSeries x:Name="Sales2015" Name ="2015 Sales" Binding="Sales" ></xuni:ChartSeries>
  </xuni:FlexChart.Series>
</xuni:FlexChart>

 

 


Copyright © GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback