FlexChart for WinForms
Elements / Titles
In This Topic
    Titles
    In This Topic

    Titles are the text fields that appear on a chart and are used to give description about the chart data. There are two type of titles that a chart can have:

    Set Chart Titles

    There are two types of chart titles that can be added to a FlexChart: a Header and a Footer. Headers are generally used for summarizing the chart and tell what a particular chart is all about. On the other hand, Footers are generally used for mentioning the copyright information or source of data used in the chart. You can set the header and footer of a chart by using the Content property which can be accessed through Header and Footer property which are of the type ChartTitle class.

           flexChart1.Header.Content = "RelationShip between Production and Cost";
           flexChart1.Footer.Content = "copyright © GrapeCity, inc.";                        
           flexChart1.Header.Content = "RelationShip between Production and Cost"
           flexChart1.Footer.Content = "copyright © GrapeCity, inc."                      

    Style Chart Titles

    To style the header and footer of a chart so that they match with chart and rest of the UI of your application, FlexChart provides various styling properties through the ChartTitle class. You can style the titles such as setting the font, fill or stroke colors using the Style property. You can also change its HorizontalAlignment, as well as set and customize the Border and BorderStyle.

           flexChart1.Header.Style.Font = new Font("Arial", 14);
           flexChart1.Header.Style.StrokeColor = Color.DarkBlue;
           flexChart1.Header.Border = true;
           flexChart1.Header.BorderStyle.StrokeColor = Color.DarkGray;
           flexChart1.Header.HorizontalAlignment = HorizontalAlignment.Center;
           flexChart1.Footer.Style.StrokeColor = Color.DarkGray;
           flexChart1.Footer.Style.Font = new Font("Arial", 8);
           flexChart1.Footer.HorizontalAlignment = HorizontalAlignment.Right;                           
           flexChart1.Header.Style.Font = new Font("Arial", 14)
           flexChart1.Header.Style.StrokeColor = Color.DarkBlue
           flexChart1.Header.Border = true
           flexChart1.Header.BorderStyle.StrokeColor = Color.DarkGray
           flexChart1.Header.HorizontalAlignment = HorizontalAlignment.Center
           flexChart1.Footer.Style.StrokeColor = Color.DarkGray
           flexChart1.Footer.Style.Font = new Font("Arial", 8)
           flexChart1.Footer.HorizontalAlignment = HorizontalAlignment.Right

    Set Axis Titles

    Axis titles are the short text descriptions that explain the data displayed along a particular axis. In FlexChart, you can set the title for each axis by setting the Title property of Axis class.

           flexChart1.AxisX.Title = "Quantity";
           flexChart1.AxisY.Title = "Per Unit Cost";
           flexChart1.AxisX.TitleStyle.Font = new Font("Segoe UI", 12);                        
           flexChart1.AxisX.Title = "Quantity"
           flexChart1.AxisY.Title = "Per Unit Cost"
           flexChart1.AxisX.TitleStyle.Font = new Font("Segoe UI", 12)

    Style Axis Titles

    In FlexChart, you can customize the axis titles by using the TitleStyle property which is of the type ChartStyle class.

          flexChart1.AxisX.TitleStyle.Font = new Font("Segoe UI", 12);                        
          flexChart1.AxisX.TitleStyle.Font = new Font("Segoe UI", 12)