Nevron .NET Vision
Nevron.Chart Namespace / NAxis Class
Members


In This Topic
    NAxis Class
    In This Topic
    The NAxis class is the base class of all axes displayed on charts.
    Object Model
    NAxis Class
    Syntax
    'Declaration
     
    
    <System.Runtime.InteropServices.ClassInterfaceAttribute(ClassInterfaceType.AutoDual)>
    <System.ComponentModel.TypeConverterAttribute(Nevron.Chart.NAxisTypeConverter)>
    <System.Xml.Serialization.XmlIncludeAttribute(Nevron.Chart.NCartesianAxis)>
    <NIconAttribute("Resources.Icons.Axes.VertAxis.png")>
    <System.SerializableAttribute()>
    Public MustInherit Class NAxis 
       Inherits NAxisBase
       Implements INChartElement, INChartElementContainer, INHitTestable, INMaster, INPreOrderPaintable2D, INPreOrderPaintable3D, INSlave, Nevron.Dom.INAtomicElement, Nevron.Dom.INAttributeContainer, Nevron.Dom.INAttributeObserver, Nevron.Dom.INElement, Nevron.Dom.INElementContainer, Nevron.Dom.INIdentifiable, Nevron.Dom.INNamed, Nevron.Dom.INNode, Nevron.Dom.INNodeContainer, Nevron.Dom.INUniquelyIdentifiable, Nevron.Editors.INDomEditableNode, Nevron.INReferenceHolder, Nevron.INReferenceProvider 
    'Usage
     
    
    Dim instance As NAxis
    [System.Runtime.InteropServices.ClassInterface(ClassInterfaceType.AutoDual)]
    [System.ComponentModel.TypeConverter(Nevron.Chart.NAxisTypeConverter)]
    [System.Xml.Serialization.XmlInclude(Nevron.Chart.NCartesianAxis)]
    [NIcon("Resources.Icons.Axes.VertAxis.png")]
    [System.Serializable()]
    public abstract class NAxis : NAxisBase, INChartElement, INChartElementContainer, INHitTestable, INMaster, INPreOrderPaintable2D, INPreOrderPaintable3D, INSlave, Nevron.Dom.INAtomicElement, Nevron.Dom.INAttributeContainer, Nevron.Dom.INAttributeObserver, Nevron.Dom.INElement, Nevron.Dom.INElementContainer, Nevron.Dom.INIdentifiable, Nevron.Dom.INNamed, Nevron.Dom.INNode, Nevron.Dom.INNodeContainer, Nevron.Dom.INUniquelyIdentifiable, Nevron.Editors.INDomEditableNode, Nevron.INReferenceHolder, Nevron.INReferenceProvider  
    Remarks
    Each axis displayed by the Nevron Chart for .NET component is represented by a class derived from this class. You can obtain a reference to a standard chart axis with the help of the Axis method of the NChart class. The following code obtains a reference to the PrimaryY axis. Dim axis As NAxis = NChart.Axis(StandardAxis.PrimaryY); NAxis axis = NChart.Axis(StandardAxis.PrimaryY); A reference to a custom axis can be obtained with the help of the second override of the Axis mehtod which receives a Int32 parameter which is the axis id. The following code demonstrates this. ' create a custom vertical axis Dim axis As NAxis = NChart.Axes.AddCustomAxis(AxisOrientation.Vertical,AxisDockZone.FrontRight) ' save the axis id Dim nAxisId As Integer = axis.AxisId ... ' obtain a reference to the axis with the saved id Dim customAxis As NAxis = NChart.Axis(nAxisId) // create a custom vertical axis NAxis axis = NChart.Axes.AddCustomAxis(AxisOrientation.Vertical, AxisDockZone.FrontRight); // save the axis id int nAxisId = axis.AxisId; ... // obtain a reference to the axis with the saved id NAxis customAxis = NChart.Axis(nAxisId); The NAxis class implements support for the following axis features:
    • each has has an unique id accessible from the AxisId readonly property
    • A set of properties control the visual appearance of the axis. The most important ones are AxisShape, Border, FillStyle and Width
    • You can control the axis scale mode as well as access the axis scale object responsible for the respective scaling. The scale mode is determined by the ScaleMode property. You can obtain a reference to the associated scale object with the help of the DimensionScale, NumericScale, LogarithmicScale and DataTimeScale properties respectively.
    • You can control the appearance and the length of the major and minor ticks.
    • You can control the appearance of the major and minor gridlines as well as control on which chart walls they are displayed
    • You can specify the position of the axis. The PredefinedPosition property specifies a predefined axis position, while the PositionOffset property determines an offset from this position.
    • You can control the formatting of the values. The ValueFormatter property controls the applied formatting.
    • You can specify a title string as well as control its appearance. The Title property determines the axis title string. You can control the appearance of the axis title with the help of the NTextStyle object accessible from the TitleTextStyle property.
    • you can display the axis texts in stagger mode and control various aspects of this vizualization method. The stagger mode is enabled when the StaggerTexts property is set to true.
    • you can access the collection of contant lines associated with this axis with the help of the ConstLines property
    • you can access the collection of stripe lines associated with this axis with the help of the Stripes property
    Inheritance Hierarchy

    System.Object
       Nevron.Chart.NChartNode
          Nevron.Chart.NChartElement
             Nevron.Chart.NChartElementContainer
                Nevron.Chart.NAxisBase
                   Nevron.Chart.NAxis
                      Nevron.Chart.NCartesianAxis
                      Nevron.Chart.NPolarAxis
                      Nevron.Chart.NRadarAxis
                      Nevron.Chart.NTernaryAxis

    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also