CNiAxis

CNi

Class CNiAxis Base ClassesData ItemsConstructorsDestructorsFunctionsGo to hierarchy chart    Prev page: SetMinMaxNext page: AutoScale    
Class Declared in:
NiAxis.h

'Overview' icon -- Shortcut to top of page. Overview

CNiAxis encapsulates the interface to a single axis of a graph, knob, or slide control, which allows you to modify the appearance and behavior of the axis.

You obtain individual axes using the Axes property on a CNiGraph object.

Note: To specify a date/time value, you must convert your date or time value to a double. A date is implemented as a floating-point value with the integer part of the number measuring days from midnight, 30 December 1899, and the fractional part representing the time of day. The absolute value of the fractional part of the number represents the time as a fraction of a day. Thus, 1 second equals 1 / 24 hours / 60 minutes, which is 1/86400 or approximately 1.157407e-5. So, midnight, 31 December 1899, is represented by 1.0. Similarly, 6 AM, 1 January 1900, is represented by 2.25, and midnight, 29 December 1899, is -1.0. However, 6 AM, 29 December 1899, is -1.25.

Hierarchy Chart Hierarchy Chart

'Base Classes' icon -- Shortcut to top of page. Base Classes

'Data Items' icon -- Shortcut to top of page. Data Items

Public data bool AutoScale Determines if the system automatically sets the minimum and maximum limits of the axis.
Public data CString Caption Specifies the text to draw on the axis.
Public data CNiColor CaptionColor Specifies the color used to draw the caption.
Public data bool Discrete Represents only discrete values on the axis, according to the base and interval properties.
Public data double DiscreteBase Specifies the base value for discrete axes.
Public data double DiscreteInterval Specifies the interval between discrete values.
Public data CString FormatString Specifies the format string for formatting the labels on this axis.
Public data bool Inverted Specifies if the direction of an axis is inverted.
Public data CNiLabels Labels Returns a CNiLabel object, which specifies how labels appear on the axis.
Public data bool Log Specifies if the axis has a Log10 scale.
Public data double Maximum Specifies the maximum value of the axis.
Public data double Minimum Specifies the minimum value of the axis.
Public data CString Name Specifies the name of the axis.
Public data CNiTicks Ticks Returns a CNiTicks object, which specifies how divisions and ticks appear on this axis.
Public data CNiValuePairs ValuePairs Gets a collection of ValuePair objects associated with the control.
Public data bool Visible Specifies if the axis is visible or hidden.

'Constructors' icon -- Shortcut to top of page. Constructors

Public constructor

CNiAxis()

Default constructor.
Public constructor

CNiAxis( CWAxis_CI* pCustom, CNiInterface::ThreadAccess option )

Constructor that attaches to the specified CWAxis_CI pointer.
Public constructor

CNiAxis( const CNiAxis& source )

Copy constructor.

'Destructors' icon -- Shortcut to top of page. Destructors

Public destructor

~CNiAxis()

Destructor.

'Functions' icon -- Shortcut to top of page. Functions

Public function void

AutoScaleNow()

Causes the axis to rescale immediately.
Public function static const IID &

GetIid()

Returns the globally unique identifier (GUID) of the ActiveX interface to which this class connects.
Public function const CNiAxis &

operator =( const CNiAxis& source )

Assignment operator.
Public function void

SetMinMax( double Minimum, double Maximum )

Sets both the minimum and the maximum values of the axis at the same time.

Shortcut to top of page. Example

    // Set the caption and visibility of the x axis.
    CNiGraph graph;
    CNiAxis xAxis = graph.Axes.Item("XAxis");
    xAxis.Caption = "Temperature";
    xAxis.Visible = true;