dotnetCHARTING Send comments on this topic.
Axis Class
See Also  Members  
dotnetCHARTING Namespace : Axis Class


Represents an axis drawn on a ChartArea.

Object Model























Syntax

Visual Basic (Declaration) 
Public Class Axis 
   Implements IInstanceID 
Visual Basic (Usage)Copy Code
Dim instance As Axis
C# 
public class Axis : IInstanceID  

Example

Remarks

The axis object is a powerful class that does the following.
  • Defines objects used to draw the axis and fill sections of a ChartArea such as grid lines.
  • Facilitates tick label text formatting and numerous manipulation mechanisms.
  • Defines data element layout and order.
  • Defines an axis Scale, range, and tick frequency.
  • Calculates copies of itself that can perform unit conversions between over one thousand defined units, mark time ranges with a specified TimeInterval, and manipulate each tick label with a specified custom method.
Axes can behave in 3 different modes.
ModeDescription
Value AxisThe value axis dynamically displays a numeric or DateTime range. Properties such as Scale, Interval, TimeInterval and others that relate to ranges apply to this type of axis. Using ChartType.Combo, the y axis is a value axis, with ChartType.Horizontal the x axis is.
Label AxisThe label axis does not display a range of values but rather the names of elements or series. Using ChartType.Combo, the x axis is a label axis and with ChartType.Horizontal the y axis is. Using the DataEngine with DataEngine.DateGrouping generates elements with a numeric value in Element.YValue and a DateTime value in Element.XDateTime. Because the Combo chart's x axis is a label axis the date time value cannot be shown. To remedy this, the DataEngine also populates each element's Name property with a string representation of the DateTime value. This allows the x axis to show date values but it does not allow the use of advanced options such as setting the TimeInterval for those dates. To expose this functionality ChartType.Scatter must be used because the x axis for that chart type acts as a value axis.
Calculated AxisA calculated or shadow axis is created by using of the Axis.Calculate methods and must be added to the Chart.AxisCollection collection. It is drawn by the original axis and represents the same range but displays it in a different way.

Inheritance Hierarchy

System.Object
   dotnetCHARTING.Axis

See Also

© 2021 All Rights Reserved.