C# Class NPlot.DateTimeAxis

The DateTimeAxis class
Inheritance: Axis
Mostra file Open project: GridProtectionAlliance/openHistorian Class Usage Examples

Protected Properties

Property Type Description
LargeTickLabelType_ LargeTickLabelType

Public Methods

Method Description
Clone ( ) : object

Deep copy of DateTimeAxis.

DateTimeAxis ( ) : System

Default Constructor

DateTimeAxis ( Axis a ) : System

Constructor

DateTimeAxis ( System.DateTime worldMin, System.DateTime worldMax ) : System

Constructor

DateTimeAxis ( double worldMin, double worldMax ) : System

Constructor

DateTimeAxis ( long worldMin, long worldMax ) : System

Constructor

Protected Methods

Method Description
DoClone ( DateTimeAxis b, DateTimeAxis a ) : void

Helper method for Clone.

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

Draw the ticks.

LargeTickLabel ( System.DateTime tickDate ) : string

Get the label corresponding to the provided date time

Private Methods

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

Determines the positions, in world coordinates, of the large ticks. No small tick marks are currently calculated by this method.

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

Compute the small tick positions for largetick size of one or more years. - inside the domain or the large tick positons, is take the mid-point of pairs of large ticks - outside the large tick range, check if a half tick is inside the world min/max This method works only if there are atleast 2 large ticks, since we don't know if its minutes, hours, month, or yearly divisor.

Added by Rosco Hill

Method Details

Clone() public method

Deep copy of DateTimeAxis.
public Clone ( ) : object
return object

DateTimeAxis() public method

Default Constructor
public DateTimeAxis ( ) : System
return System

DateTimeAxis() public method

Constructor
public DateTimeAxis ( Axis a ) : System
a Axis Axis to construct from
return System

DateTimeAxis() public method

Constructor
public DateTimeAxis ( System.DateTime worldMin, System.DateTime worldMax ) : System
worldMin System.DateTime World min of axis
worldMax System.DateTime World max of axis
return System

DateTimeAxis() public method

Constructor
public DateTimeAxis ( double worldMin, double worldMax ) : System
worldMin double World min of axis
worldMax double World max of axis
return System

DateTimeAxis() public method

Constructor
public DateTimeAxis ( long worldMin, long worldMax ) : System
worldMin long World min of axis
worldMax long World max of axis
return System

DoClone() protected static method

Helper method for Clone.
protected static DoClone ( DateTimeAxis b, DateTimeAxis a ) : void
b DateTimeAxis The cloned object.
a DateTimeAxis The original object to clone.
return void

DrawTicks() protected method

Draw the ticks.
protected DrawTicks ( Graphics g, Point physicalMin, Point physicalMax, object &labelOffset, object &boundingBox ) : void
g System.Drawing.Graphics The drawing surface on which to draw.
physicalMin Point The minimum physical extent of the axis.
physicalMax Point The maximum physical extent of the axis.
labelOffset object out: a suitable offset from the axis to draw the axis label.
boundingBox object out: smallest box that completely encompasses all of the ticks and tick labels.
return void

LargeTickLabel() protected method

Get the label corresponding to the provided date time
protected LargeTickLabel ( System.DateTime tickDate ) : string
tickDate System.DateTime the date time to get the label for
return string

Property Details

LargeTickLabelType_ protected_oe property

this gets set after a get LargeTickPositions.
protected LargeTickLabelType LargeTickLabelType_
return LargeTickLabelType