FlexChart | ComponentOne
Elements / Axes / Axis Title
In This Topic
    Axis Title
    In This Topic

    Axis titles are the short text descriptions that explain the data displayed along a particular axis. They typically appear along the horizontal and vertical axes of a chart as shown in the following image.

    In FlexChart, you can set the title for each axis by setting the Title property of Axis class. This example uses the code and data source from the Quick Start topic.

    flexChart1.AxisX.Title = "Date";
    flexChart1.AxisY.Title = "Revenue";
    
    flexChart1.AxisX.Title = "Date"
    flexChart1.AxisY.Title = "Revenue"
    

    Rotate Axis Titles

    In FlexChart, you can rotate axis titles with respect to the axis line by setting  theTitleAngle property. This property accepts the numeric values from -90 to 90 in degrees and rotates the axis titles by the specified angle in anti-clockwise direction, thus giving it a more aesthetic look.

    The following code showcases how to set the TitleAngle property. This example uses the code and data source from the Quick Start topic.

    // Rotate the title counter-clockwise
    flexChart1.AxisX.TitleAngle = 90;
    flexChart1.AxisY.TitleAngle = 45; 
    
    'Rotate the title counter-clockwise
    flexChart1.AxisX.TitleAngle = 90
    flexChart1.AxisY.TitleAngle = 45
    

    Style Axis Titles

    In FlexChart, you can customize the axis titles by using the TitleStyle property which is of the type ChartStyle class. The following image showcases style set on axis title.

    The following code demonstrates how to set TitleStyle for axes. This example uses the same code and data source from the Quick Start topic.

    flexChart1.AxisX.TitleStyle.Font = new Font(flexChart1.Font.FontFamily, 16);
    flexChart1.AxisY.TitleStyle.Font = new Font(flexChart1.Font.FontFamily, 16);
    
    flexChart1.AxisX.TitleStyle.Font = new Font(flexChart1.Font.FontFamily, 16)
    flexChart1.AxisY.TitleStyle.Font = new Font(flexChart1.Font.FontFamily, 16)