ComponentOne CandlestickChart for ASP.NET Web Forms
Candlestick Chart Elements / Axes / Axis Text Elements / 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.

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

    To format the chart label’s 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:

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

     

    This topic illustrates the following:

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