ComponentOne Chart for WPF and Silverlight
Chart for WPF and Silverlight / Chart Features / Axis / Annotation / Axis Annotation Format
In This Topic
    Axis Annotation Format
    In This Topic

    You can control the annotation formatting for the values on the X or Y axis using the AnnoFormat property.

    Setting the AnnoFormat property to a .NET Framework composite format string will format the data entered into the property. For more information on the standard numeric format strings that you can use for the AnnoFormat property see Standard Numeric Format Strings.

    DateTime Format Strings

    The DateTime format strings are divided into two categories:

    Numeric Format Strings

    Custom Numeric Format Strings

    You can also customize your format strings by using the custom numeric format strings.

    To use the AnnoFormat property specify a standard or custom format string for it. For example the following Bar chart's AnnoFormat property is set to "c" to change the whole values to currency format.

     

     

    XAML
    Copy Code
    <c1chart:C1Chart.View>
                    <c1chart:ChartView>
                        <c1chart:ChartView.AxisX>
                            <c1chart:Axis Min="0" AnnoFormat="c" AutoMin="false" AutoMax="false" Max="200" />
                        </c1chart:ChartView.AxisX>
                    </c1chart:ChartView>
                </c1chart:C1Chart.View>
    

     

    C#
    Copy Code
    // Financial formatting
       c1Chart1.View.AxisX.AnnoFormat = "c";
       c1Chart1.View.AxisX.Min = 0;
    

     

     

     

    See Also