ComponentOne Chart for .NET (2.0) Search HelpCentral 

Axes Object

The following graphic illustrates the X and Y axes in C1Chart.

Most charts have two axes, X and Y. The exceptions are pie charts (which have no axes) and charts with a secondary Y axis (Y2, which have three axes).

The axes are represented by sub-properties of the ChartArea property: ChartArea.AxisX, ChartArea.AxisY, and AxisY2. Each of these properties returns an Axis object with the following main properties:

·      Layout and Style properties

The following properties below represent the layout and style of the axes in C1Chart:

Property

Description

Compass

Allows you to set the position of the axis. For example, you may want to display the X-axis above the data instead of below.

Font

Sets the font used to display the values along the axis.

ForeColor

Sets the color used to display the axis, tickmarks, and values.

Reversed

Allows you to reverse the direction of the axis. For example, you can show Y values going down instead of up.

Text

Sets a string to display next to the axis (this is typically used to describe the variable and units being depicted by the axis).

Rotation

Sets the orientation of the Text string.

·      Annotation properties

The following properties below represent the format for the annotation of the axes in C1Chart:

Property

Description

AnnoFormat

A set of predefined formats used to format the values displayed next to the axis.

AnnoFormatString

The .NET formatting string used to format the values displayed next to the axis when AnnoFormat is set to “NumericManual” or “DateManual”.  If the AnnoFormat is set to either NumericManual or DateManual and the AnnoFormatString is empty, then the chart uses an algorithm to find the “best” formatting available.

AnnoMethod

Determines what values are displayed next to the axis. Options are “Values”, which displays the actual series values, or “ValueLabels”, which displays the elements in the ValueLabels collection.

ValueLabels

A collection of text/value pairs to display next to the axis when AnnoMethod is set to “ValueLabels”. This property is useful when you want to display strings along an axis instead of numeric values (for example, you may be charting product prices and want to display the product names along the X-axis).

AnnotationRotation

Allows you to rotate the values so they take up less space along the axis.

·      Scaling Tickmark and Gridline properties

The following properties represent the scaling, tickmarks, and gridline styles and function for the axes in C1Chart:

Property

Description

AutoMin, AutoMax

Determine whether the minimum and maximum values for the axis should be calculated automatically.

Min, Max

Set the minimum and maximum values for the axis (when AutoMin and AutoMax are set to False).

AutoMajor, AutoMinor

Determine whether the spacing between the major and minor tickmarks should be calculated automatically.

UnitMajor, UnitMinor

Set the spacing between the major and minor tickmarks (when the AutoMajor and AutoMinor properties are set to False).

GridMajor, GridMinor

Returns a ChartGridStyle object with properties that control the appearance of the grid lines drawn perpendicular to major and minor tickmarks.

AutoOrigin

Determines whether the X-axis should be automatically positioned with respect to the Y-axis.

Origin

Sets the position of the X-axis with respect to the Y-axis. The X-axis is usually placed at the bottom of the chart. This property allows you to place it so that it crosses the Y-axis at a given coordinate.


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.