ComponentOne BarChart for ASP.NET WebForms
Task-Based Help / Axis Tasks / Formatting the Axis Labels
In This Topic
    Formatting the Axis Labels
    In This Topic

    The Axis labels in the BarChart can be formatted using the following properties: Labels.Width, Labels.TextAlign, and Labels.Style.Rotation.

    To format the axis label's width and alignment in design view:

    1. Add a reference to the C1.Web.Wijmo.Controls.Design.3.dll to your project.
    2. Add the C1BarChart from the toolbox to your page. For more information on adding the C1BarChart icon to your Toolbox, see Getting Started with ASP.NET Web Forms Edition.
    3. In the C1BarChart properties window expand the X->Labels node and set the TextAlign property to Center and the Width property to 150.
    Note:This will align the X-Axis labels to the center and create a fixed width of 150 for each label.

    To format the chart labels width and alignment in source view:

    To format the chart labels width and alignment in source view, click the source tab and add the following code in your source file:

    Add the following within the <X></X> tags:

    To write code in Source View

    <Labels Width="150" TextAlign="Center">
    <Style Rotation="0"></Style>

    This topic illustrates the following:

    The X-Axis labels which appear where the Y-Axis labels are since a Bar chart is an inverted column chart

    Note: This will align the X-Axis labels to the center and create a fixed width of 150 for each label.

    See Also