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.
To rotate an axis (and its associated series), use the Axis.Reverse property.
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.
- Use the Axis2D.Visibility property to show or hide an axis. To control axis visibility in panes, use the Axis2D.VisibilityInPanes property.