C# Class WinRTXamlToolkit.Controls.DataVisualization.Charting.ValueHelper

A set of functions for data conversion operations.
Mostrar archivo Open project: xyzzer/WinRTXamlToolkit Class Usage Examples

Public Methods

Method Description
BottomOrDefault ( this rectangle, double value ) : double

Returns the bottom value of the rectangle.

CanGraph ( double value ) : bool

Returns a value indicating whether this value can be graphed on a linear axis.

Compare ( IComparable left, IComparable right ) : int

Compares two IComparables returning -1 if the left is null and 1 if the right is null.

GetDateTimesBetweenInclusive ( DateTime start, DateTime end, long count ) : IEnumerable

Returns a sequence of date time values from a start and end date time inclusive.

GetIntervalsInclusive ( long start, long end, long count ) : IEnumerable

Returns that intervals between a start and end value, including those start and end values.

GetLength ( this range ) : TimeSpan?

Returns the time span of a date range.

GetLength ( this range ) : double?

Returns the time span of a date range.

GetTimeSpanIntervalsInclusive ( TimeSpan timeSpan, long count ) : IEnumerable

Returns a sequence of time span values within a time span inclusive.

HeightOrDefault ( this rectangle, double value ) : double

Returns the height value of the rectangle.

IsEmptyOrHasNoSize ( this rect ) : bool

Returns a value indicating whether a rectangle is empty or has no width or height.

LeftOrDefault ( this rectangle, double value ) : double

Returns the left value of the rectangle.

RightOrDefault ( this rectangle, double value ) : double

Returns the right value of the rectangle.

SetStyle ( this element, Style style ) : void

Sets the style property of an element.

ToComparableRange ( this range ) : Range

Converts any range to a range of IComparable.

ToComparableRange ( this range ) : Range

Converts any range to a range of IComparable.

ToDateTime ( object value ) : DateTime

Converts a value to a date.

ToDateTimeRange ( this range ) : Range

Converts a range into a date time range.

ToDouble ( object value ) : double

Converts an object into a double.

ToDoubleRange ( this range ) : Range

Converts a range into a double range.

TopOrDefault ( this rectangle, double value ) : double

Returns the top value of the rectangle.

Translate ( this origin, Point offset ) : Point

Applies the translate transform to a point.

TryConvert ( object value, DateTime &dateTimeValue ) : bool

Attempts to convert an object into a date time.

TryConvert ( object value, double &doubleValue ) : bool

Attempts to convert an object into a double.

WidthOrDefault ( this rectangle, double value ) : double

Returns the width value of the rectangle.

Private Methods

Method Description
RemoveNoiseFromDoubleMath ( double value ) : double

Removes the noise from double math.

Method Details

BottomOrDefault() public static method

Returns the bottom value of the rectangle.
public static BottomOrDefault ( this rectangle, double value ) : double
rectangle this The rectangle.
value double The default value.
return double

CanGraph() public static method

Returns a value indicating whether this value can be graphed on a linear axis.
public static CanGraph ( double value ) : bool
value double The value to evaluate.
return bool

Compare() public static method

Compares two IComparables returning -1 if the left is null and 1 if the right is null.
public static Compare ( IComparable left, IComparable right ) : int
left IComparable The left comparable.
right IComparable The right comparable.
return int

GetDateTimesBetweenInclusive() public static method

Returns a sequence of date time values from a start and end date time inclusive.
public static GetDateTimesBetweenInclusive ( DateTime start, DateTime end, long count ) : IEnumerable
start DateTime The start date time.
end DateTime The end date time.
count long The number of values to return.
return IEnumerable

GetIntervalsInclusive() public static method

Returns that intervals between a start and end value, including those start and end values.
public static GetIntervalsInclusive ( long start, long end, long count ) : IEnumerable
start long The start value.
end long The end value.
count long The total number of intervals.
return IEnumerable

GetLength() public static method

Returns the time span of a date range.
public static GetLength ( this range ) : TimeSpan?
range this The range of values.
return TimeSpan?

GetLength() public static method

Returns the time span of a date range.
public static GetLength ( this range ) : double?
range this The range of values.
return double?

GetTimeSpanIntervalsInclusive() public static method

Returns a sequence of time span values within a time span inclusive.
public static GetTimeSpanIntervalsInclusive ( TimeSpan timeSpan, long count ) : IEnumerable
timeSpan TimeSpan The time span to split.
count long The number of time spans to return.
return IEnumerable

HeightOrDefault() public static method

Returns the height value of the rectangle.
public static HeightOrDefault ( this rectangle, double value ) : double
rectangle this The rectangle.
value double The default value.
return double

IsEmptyOrHasNoSize() public static method

Returns a value indicating whether a rectangle is empty or has no width or height.
public static IsEmptyOrHasNoSize ( this rect ) : bool
rect this The rectangle.
return bool

LeftOrDefault() public static method

Returns the left value of the rectangle.
public static LeftOrDefault ( this rectangle, double value ) : double
rectangle this The rectangle.
value double The default value.
return double

RightOrDefault() public static method

Returns the right value of the rectangle.
public static RightOrDefault ( this rectangle, double value ) : double
rectangle this The rectangle.
value double The default value.
return double

SetStyle() public static method

Sets the style property of an element.
public static SetStyle ( this element, Style style ) : void
element this The element.
style Style The style.
return void

ToComparableRange() public static method

Converts any range to a range of IComparable.
public static ToComparableRange ( this range ) : Range
range this The range to be converted.
return Range

ToComparableRange() public static method

Converts any range to a range of IComparable.
public static ToComparableRange ( this range ) : Range
range this The range to be converted.
return Range

ToDateTime() public static method

Converts a value to a date.
public static ToDateTime ( object value ) : DateTime
value object The value to convert to a date.
return DateTime

ToDateTimeRange() public static method

Converts a range into a date time range.
public static ToDateTimeRange ( this range ) : Range
range this The range to convert.
return Range

ToDouble() public static method

Converts an object into a double.
public static ToDouble ( object value ) : double
value object The value to convert to a double.
return double

ToDoubleRange() public static method

Converts a range into a double range.
public static ToDoubleRange ( this range ) : Range
range this The range to convert.
return Range

TopOrDefault() public static method

Returns the top value of the rectangle.
public static TopOrDefault ( this rectangle, double value ) : double
rectangle this The rectangle.
value double The default value.
return double

Translate() public static method

Applies the translate transform to a point.
public static Translate ( this origin, Point offset ) : Point
origin this The origin point.
offset Point The offset point.
return Point

TryConvert() public static method

Attempts to convert an object into a date time.
public static TryConvert ( object value, DateTime &dateTimeValue ) : bool
value object The value to convert.
dateTimeValue DateTime The double value.
return bool

TryConvert() public static method

Attempts to convert an object into a double.
public static TryConvert ( object value, double &doubleValue ) : bool
value object The value to convert.
doubleValue double The double value.
return bool

WidthOrDefault() public static method

Returns the width value of the rectangle.
public static WidthOrDefault ( this rectangle, double value ) : double
rectangle this The rectangle.
value double The default value.
return double