Skip to main content

Axis Appearance and Position

  • 2 minutes to read

This topic describes how to rotate an ASP.NET Chart Control’s axis, and change its color, thickness and alignment. Before proceeding with this section, you may wish to review the following help topic on axis fundamentals: Axes Overview.

A chart’s overall appearance is determined by the following properties: WebChartControl.AppearanceName, WebChartControl.PaletteName and WebChartControl.PaletteBaseColorNumber. They affect the chart’s entire appearance, including its diagram, legend and axes.

However, it is possible to manually customize axis appearance (for both primary and secondary axes) in the following ways.

  • To rotate an axis (and its associated series), use the Axis.Reverse property.

    Axis_Reverse_True

  • To position an axis within a chart’s diagram, use the Axis2D.Alignment property. For all types of axes (primary and secondary), you can define the Near and Far alignment. For the primary axes, there is a special option (Zero), which places the axis exactly where the zero level of another primary axis is.

    The following image demonstrates a chart with two primary and two secondary axes, with various alignment settings.

    Axes_Alignment

  • The Axis2D.Color property determines the axis color, and the Axis2D.Thickness property specifies its thickness (in pixels).

    AxisColor

  • Use the Axis2D.Visibility property to show or hide an axis. To control axis visibility in panes, use the Axis2D.VisibilityInPanes property.
See Also