C# Class NPlot.LinearAxis

Provides functionality for drawing axes with a linear numeric scale.
Inheritance: Axis, System.ICloneable
Afficher le fichier Open project: GridProtectionAlliance/openHistorian Class Usage Examples

Méthodes publiques

Свойство Type Description
ApproxNumberLargeTicks float
Mantissas double[]
SmallTickCounts int[]

Méthodes publiques

Méthode Description
AdjustedWorldValue ( double world ) : double

Adjusts a real world value to one that has been modified to reflect the Axis Scale and Offset properties.

Clone ( ) : object

Deep copy of LinearAxis.

LinearAxis ( ) : System

Default constructor.

LinearAxis ( Axis a ) : System

Copy constructor

LinearAxis ( double worldMin, double worldMax ) : System

Construct a linear axis with the provided world min and max values.

Méthodes protégées

Méthode Description
DoClone ( LinearAxis b, LinearAxis a ) : void

Helper method for Clone.

DrawTicks ( Graphics g, Point physicalMin, Point physicalMax, object &labelOffset, object &boundingBox ) : void

Draws the large and small ticks [and tick labels] for this axis.

Private Methods

Méthode Description
DetermineLargeTickStep ( float physicalLength, bool &shouldCullMiddle ) : double

Calculates the world spacing between large ticks, based on the physical axis length (parameter), world axis length, Mantissa values and MinPhysicalLargeTickStep. A value such that at least two

TODO: This can be optimised a bit.

DetermineNumberSmallTicks ( double bigTickDist ) : int

Given the large tick step, determine the number of small ticks that should be placed in between.

Init ( ) : void
WorldTickPositions_FirstPass ( Point physicalMin, Point physicalMax, List &largeTickPositions, List &smallTickPositions ) : void

Determines the positions, in world coordinates, of the large ticks. When the physical extent of the axis is small, some of the positions that were generated in this pass may be converted to small tick positions and returned as well. If the LargeTickStep isn't set then this is calculated automatically and depends on the physical extent of the axis.

WorldTickPositions_SecondPass ( Point physicalMin, Point physicalMax, List largeTickPositions, List &smallTickPositions ) : void

Determines the positions, in world coordinates, of the small ticks if they have not already been generated.

Method Details

AdjustedWorldValue() public méthode

Adjusts a real world value to one that has been modified to reflect the Axis Scale and Offset properties.
public AdjustedWorldValue ( double world ) : double
world double world value to adjust
Résultat double

Clone() public méthode

Deep copy of LinearAxis.
public Clone ( ) : object
Résultat object

DoClone() protected méthode

Helper method for Clone.
protected DoClone ( LinearAxis b, LinearAxis a ) : void
b LinearAxis
a LinearAxis
Résultat void

DrawTicks() protected méthode

Draws the large and small ticks [and tick labels] for this axis.
protected DrawTicks ( Graphics g, Point physicalMin, Point physicalMax, object &labelOffset, object &boundingBox ) : void
g System.Drawing.Graphics The graphics surface on which to draw.
physicalMin Point The physical position corresponding to the world minimum of the axis.
physicalMax Point The physical position corresponding to the world maximum of the axis.
labelOffset object out: offset from the axis to draw the axis label.
boundingBox object out: smallest box that completely surrounds all ticks and associated labels for this axis.
Résultat void

LinearAxis() public méthode

Default constructor.
public LinearAxis ( ) : System
Résultat System

LinearAxis() public méthode

Copy constructor
public LinearAxis ( Axis a ) : System
a Axis The Axis to clone
Résultat System

LinearAxis() public méthode

Construct a linear axis with the provided world min and max values.
public LinearAxis ( double worldMin, double worldMax ) : System
worldMin double the world minimum value of the axis.
worldMax double the world maximum value of the axis.
Résultat System

Property Details

ApproxNumberLargeTicks public_oe property

If LargeTickStep isn't specified, then a suitable value is calculated automatically. To determine the tick spacing, the world axis length is divided by ApproximateNumberLargeTicks and the next lowest distance m*10^e for some m in the Mantissas set and some integer e is used as the large tick spacing.
public float ApproxNumberLargeTicks
Résultat float

Mantissas public_oe property

If LargeTickStep isn't specified, then a suitable value is calculated automatically. The value will be of the form m*10^e for some m in this set.
public double[] Mantissas
Résultat double[]

SmallTickCounts public_oe property

If NumberOfSmallTicks isn't specified then .... If specified LargeTickStep manually, then no small ticks unless NumberOfSmallTicks specified.
public int[] SmallTickCounts
Résultat int[]