Méthode | Description | |
---|---|---|
Clone ( ) : object |
Deep copy of DateTimeAxis.
|
|
OnTradingDays ( double coord ) : bool |
Check whether the given coordinate falls on trading days.
|
|
PhysicalToWorld ( PointF p, PointF physicalMin, PointF physicalMax, bool clip ) : double |
Transforms a physical coordinate to an axis world coordinate given the physical extremites of the axis.
|
|
SparseWorldAdd ( double coord, double delta ) : double |
Adds a delta amount to the given world coordinate in such a way that all "sparse gaps" are skipped. In other words, the returned value is in delta distance from the given in the "virtual" world.
|
|
TradingDateTimeAxis ( ) : System |
Constructor
|
|
TradingDateTimeAxis ( |
Copy Constructor
|
|
WithinTradingHours ( double coord ) : bool |
Check whether the given coordinate falls within defined trading hours.
|
|
WorldToPhysical ( double coord, PointF physicalMin, PointF physicalMax, bool clip ) : PointF |
World to physical coordinate transform. Not sure how much time is spent in this often called function. If it's lots, then worth optimizing (there is scope to do so). |
Méthode | Description | |
---|---|---|
DoClone ( |
Helper method for Clone.
|
|
LargeTickLabel ( System.DateTime tickDate ) : string |
Get an appropriate label name, given the DateTime of a label
|
|
ReverseSparseWorldRemap ( double coord ) : double |
Remaps a "virtual" world coordinates back to true world coordinates.
|
|
SparseWorldRemap ( double coord ) : double |
Remap a world coordinate into a "virtual" world, where non-trading dates and times are collapsed. This code works under asumption that there are exactly 24*60*60 seconds in a day This is strictly speaking not correct but apparently .NET 2.0 does not count leap seconds. Luckilly, Ticks == 0 =~= 0001-01-01T00:00 =~= Monday First tried a version fully on floating point arithmetic, but failed hopelessly due to rounding errors. |
Méthode | Description | |
---|---|---|
Init ( ) : void |
Helper function for constructors.
|
|
WorldTickPositions_FirstPass ( Point physicalMin, Point physicalMax, |
Determines the positions of all Large and Small ticks. The method WorldTickPositions_FirstPass() from the base works just fine, except that it does not account for non-trading gaps in time, therefore, when less than two days are visible an own algorithm is used (to show intraday time). Otherwise the base class implementation is used but the output is corrected to remove ticks on non-trading days (Sat, Sun). |
protected static DoClone ( |
||
b | The cloned source object. | |
a | The cloned target object. | |
Résultat | void |
protected LargeTickLabel ( System.DateTime tickDate ) : string | ||
tickDate | System.DateTime | the DateTime to get the label name for |
Résultat | string |
public OnTradingDays ( double coord ) : bool | ||
coord | double | world coordinate in ticks to check. |
Résultat | bool |
public PhysicalToWorld ( PointF p, PointF physicalMin, PointF physicalMax, bool clip ) : double | ||
p | PointF | the point to convert |
physicalMin | PointF | the physical minimum extremity of the axis |
physicalMax | PointF | the physical maximum extremity of the axis |
clip | bool | whether or not to clip the world value to lie in the range of the axis if it is outside. |
Résultat | double |
protected ReverseSparseWorldRemap ( double coord ) : double | ||
coord | double | virtual world coordinate to transform. |
Résultat | double |
public SparseWorldAdd ( double coord, double delta ) : double | ||
coord | double | world coordinate to shift. |
delta | double | shif amount in "virtual" units. |
Résultat | double |
protected SparseWorldRemap ( double coord ) : double | ||
coord | double | world coordinate to transform. |
Résultat | double |
public TradingDateTimeAxis ( |
||
a | construct a TradingDateTimeAxis based on this provided axis. | |
Résultat | System |
public WithinTradingHours ( double coord ) : bool | ||
coord | double | world coordinate in ticks to check. |
Résultat | bool |
public WorldToPhysical ( double coord, PointF physicalMin, PointF physicalMax, bool clip ) : PointF | ||
coord | double | The coordinate value to transform. |
physicalMin | PointF | The physical position corresponding to the world minimum of the axis. |
physicalMax | PointF | The physical position corresponding to the world maximum of the axis. |
clip | bool | if false, then physical value may extend outside worldMin / worldMax. If true, the physical value returned will be clipped to physicalMin or physicalMax if it lies outside this range. |
Résultat | PointF |