IAxis
Defines the base interface to an Axis used throughout Ultrachart
实现: IAxisParams, IHitTestable, ISuspendable, IInvalidatableElement, IDrawable
属性
AnimatedVisibleRange : IRange
Gets or sets the animated VisibleRange of the Axis. When this property is set, the axis animates the VisibleRange to the new value
AutoAlignVisibleRange : bool
Gets or sets whether to auto-align the visible range to the data when it is set. Note that this property only applies to the X-Axis. The default value is True. Whenever the VisibleRange is set on the X-Axis, the Min and Max values will be aligned to data values in the XValues
AxisAlignment : AxisAlignment
Gets or sets the AxisAlignment for this Axis. Default is Right.
AxisMode : AxisMode
Gets or sets the AxisMode, e.g. Linear or Logarithmic, that this Axis operates in
CurrentDatapointPixelSize : double
Gets the current data-point size in pixels
CursorTextFormatting : string
Gets or sets the Text Formatting String for Labels on this cursor
DrawMajorGridLines : bool
If True, draws Major Grid Lines, else skips this step
DrawMajorTicks : bool
If True, draws Major Tick Lines, else skips this step
DrawMinorGridLines : bool
If True, draws Minor Grid Lines, else skips this step
DrawMinorTicks : bool
If True, draws Minor Tick Lines, else skips this step
FlipCoordinates : bool
Gets or sets a flag indicating whether to flip the tick and pixel coordinate generation for this axis, causing the axis ticks to decrement and chart to be flipped in the axis direction
HasDefaultVisibleRange : bool
Gets whether the VisibleRange has default value
HasValidVisibleRange : bool
Gets whether the VisibleRange is valid, e.g. is not null, is not NaN and the difference between Max and Min is not zero
HorizontalAlignment : HorizontalAlignment
Gets or sets the horizontal alignment characteristics that are applied to a FrameworkElement when it is composed in a layout parent, such as a panel or items control.
返回值: A horizontal alignment setting, as a value of the enumeration. The default is Stretch.
Id : string
Gets or sets the string Id of this axis. Used to associated IRenderableSeries and YAxisDragModifier
IsAxisFlipped : bool
Gets whether the current axis is flipped (e.g. YAxis on the bottom or top, or XAxis on the left or right)
IsCategoryAxis : bool
Gets a value indicating whether this instance is a category axis.
IsCenterAxis : bool
Gets or sets whether current Axis should placed in the center of chart or not
IsHorizontalAxis : bool
Gets whether this axis is horizontal or not
IsLabelCullingEnabled : bool
Gets or sets a value indicating whether Label Culling is enabled (when labels overlap) on this AxisPanel instance
IsLogarithmicAxis : bool
Gets a value indicating whether this instance is a logarithmic axis.
IsPolarAxis : bool
Gets a value indicating whether this instance is a polar axis.
IsPrimaryAxis : bool
Gets or sets whether current Axis is the main one in axis collection. This is the axis which is responsible for drawing grid lines on the GridLinesPanel and by default, is the first axis in the collection
IsStaticAxis : bool
Gets or sets whether current Axis is a static axis
LabelProvider : ILabelProvider
Gets or sets a ILabelProvider instance, which may be used to programmatically override the formatting of text and cursor labels. For examples, see the NumericLabelProvider and TradeChartAxisLabelProvider
MajorGridLineStyle : Style
Gets or sets the Major Grid Line Style (TargetType Line), applied to all major gridlines drawn by this axis
MajorLineStroke : Brush
Gets or sets the Major Line Stroke for this axis
MajorTickLineStyle : Style
Gets or sets the Major Tick Line Style (TargetType Line), applied to all major ticks on this axis
MinimalZoomConstrain : IComparable
Gets or sets the MinimalZoomConstrain of the Axis. This is used to set minimum distance between Min and Max of the VisibleRange
MinorGridLineStyle : Style
Gets or sets the Minor Grid Line Style (TargetType Line), applied to all minor gridlines drawn by this axis
MinorLineStroke : Brush
Gets or sets the Minoe Line Stroke for this axis
MinorTickLineStyle : Style
Gets or sets the Minor Tick Line Style (TargetType Line), applied to all major ticks on this axis
ModifierAxisCanvas : IAnnotationCanvas
Gets the modifier axis canvas, which is used by the CursorModifier to overlay cursor labels and by AxisMarkerAnnotations
Orientation : Orientation
Gets or sets the Axis Orientation, e.g. Horizontal (XAxis) or Vertical (YAxis)
ParentSurface : IUltrachartSurface
Gets or sets the ParentSurface that this Axis is associated with
Services : IServiceContainer
Gets the ServiceContainer which provides access to services throughout Ultrachart. ServiceContainers are created one per UltrachartSurface instance, and shared between peripheral components such as AxisBase, BaseRenderableSeries, ChartModifierBase instances. For a full list of available services, see the remarks on ServiceContainer
TextFormatting : string
Gets or sets the Text Formatting String for Axis Tick Labels on this axis
TickProvider : ITickProvider
Gets or sets a ITickProvider instance on current axis, which is used to compute the data-values of Axis Gridlines, Ticks and Labels.
TickTextBrush : Brush
Gets or sets the tick text brush applied to text labels
VerticalAlignment : VerticalAlignment
Gets or sets the vertical alignment characteristics that are applied to a FrameworkElement when it is composed in a parent object such as a panel or items control.
返回值: A vertical alignment setting. The default is Stretch.
Visibility : Visibility
Gets or sets the visibility of the Axis
VisibleRangeLimit : IRange
Gets or sets the VisibleRangeLimit of the Axis. This will be used to clip the axis during ZoomExtents and AutoRange operations
VisibleRangeLimitMode : RangeClipMode
Gets or setts the VisibleRangeLimitMode of the Axis. This property defines which parts of VisibleRangeLimit will be used by axis
方法
AnimateVisibleRangeTo(IRange, TimeSpan)
Animates the VisibleRange of the current axis to the end-range, with the specified duration
- range
- The range to animate to
- duration
- The duration to animate
AssertDataType(Type)
Asserts the type passed in is supported by the current axis implementation
- dataType
CalculateYRange(RenderPassInfo) : IRange
Gets the aligned VisibleRange of the axis, with optional ZoomToFit flag. If ZoomToFit is true, it will return the DataRange plus any GrowBy applied to the axis
返回值: The VisibleRange of the axis
CaptureMouse() : bool
Captures the mouse for this Axis
Clear()
Clears the axis of tick-marks and labels
FormatCursorText(IComparable, bool) : string
String formats text for the cursor, using the CursorTextFormatting property as a formatting string
- value
- The data value to format
- hitTest
- Cursor hit test.
返回值: The string formatted data value
FormatText(IComparable, string) : string
String formats the text, using the TextFormatting property as a formatting string
- value
- The data value to format
- format
- A composite format string
返回值: The string formatted data value
FormatText(IComparable) : string
String formats the text, using the TextFormatting property as a formatting string
- value
- The data value to format
返回值: The string formatted data value
GetAxisOffset() : double
Returns the offset of the Axis
GetCoordinate(IComparable) : double
Given the Data Value, returns the x or y pixel coordinate at that value on the Axis
- value
- The DataValue as input
返回值: The pixel coordinate on this Axis corresponding to the input DataValue
GetCurrentCoordinateCalculator() : ICoordinateCalculator<double>
Gets the current ICoordinateCalculator for this Axis, based on current Visible Range and axis type
GetCurrentInteractivityHelper() : IAxisInteractivityHelper
Gets the current IAxisInteractivityHelper for this Axis
GetDataValue(double) : IComparable
Given the x or y pixel coordinate, returns the data value at that coordinate
- pixelCoordinate
- The x or y pixel coordinate as input
返回值: The data value on this Axis corresponding to the input x or y pixel coordinate
GetDefaultNonZeroRange() : IRange
Returns an default non zero IRange, called internally by Ultrachart to reset the VisibleRange of an axis to an undefined state
GetPointRange() : IntegerRange
Gets the integer indices of the X-Data array that are currently in range.
返回值: The indices to the X-Data that are currently in range
GetUndefinedRange() : IRange
Returns an undefined IRange, called internally by Ultrachart to reset the VisibleRange of an axis to an undefined state
GetWindowedYRange(IDictionary<string, IRange>) : IRange
Called by the UltrachartSurface internally. Returns the max range only for that axis (by the data-series on it), based on "windowed" = "displayed in current viewport" uses GrowBy()
- xRanges
- Calculates the max range based on corresponding x ranges
HitTest(Point) : AxisInfo
Performs a HitTest on this axis. Given the input mouse point, returns an AxisInfo struct containing the Value and FormattedValue closest to that point
- atPoint
- The mouse x,y point
返回值: The AxisInfo struct containing the value and formatted value closest to the mouse point
OnBeginRenderPass(RenderPassInfo, IPointSeries)
Called at the start of a render pass, passing in the root IPointSeries which will define the categories
- renderPassInfo
- firstPointSeries
- the root IPointSeries which will define the categories
ReleaseMouseCapture()
Releases the mouse for this Axis
Scroll(double, ClipMode, TimeSpan)
Scrolls current VisibleRange by the specified number of pixels with the specified animation duration
- pixelsToScroll
- Scroll N pixels from the current visible range
- clipMode
- Defines how scrolling behaves when you reach the edge of the Axis extents. e.g. ClipMode.ClipAtExtents prevents panning outside of the Axis, ClipMode.None allows panning outside
- duration
- The duration of animation when zooming to extents
Scroll(double, ClipMode)
Scrolls current VisibleRange by the specified number of pixels
- pixelsToScroll
- Scroll N pixels from the current visible range
- clipMode
- Defines how scrolling behaves when you reach the edge of the Axis extents. e.g. ClipMode.ClipAtExtents prevents panning outside of the Axis, ClipMode.None allows panning outside
ScrollByDataPoints(int, TimeSpan)
Translates current VisibleRange by the specified number of datapoints with the specified animation duration
- pointAmount
- Amount of points that the start visible range is scrolled by
- duration
- The duration of animation when zooming to extents
ScrollByDataPoints(int)
Translates current VisibleRange by the specified number of datapoints
- pointAmount
- Amount of data points that the start visible range is scrolled by
ScrollTo(IRange, double)
From the starting IRange, scrolls to a new range by the specified number of pixels
- startVisibleRange
- The start visible range
- pixelsToScroll
- Scroll N pixels from the start visible range
ScrollToWithLimit(IRange, double, IRange)
From the starting IRange, scrolls to a new range by the specified number of pixels, with the specified range limit
- startVisibleRange
- The start visible range
- pixelsToScroll
- Scroll N pixels from the start visible range
- rangeLimit
- The range limit.
ValidateAxis()
Called by the UltrachartSurface internally to validate current axis during render pass
Zoom(double, double, TimeSpan)
Performs zoom on current IAxis, using as a coordinate of new range start and as a coordinate of new range end
- fromCoord
- The coordinate of new range start in pixels
- toCoord
- The coordinate of new range end in pixels
- duration
- The duration of animation when zooming to extents
Zoom(double, double)
Performs zoom on current IAxis, using as a coordinate of new range start and as a coordinate of new range end
- fromCoord
- The coordinate of new range start in pixels
- toCoord
- The coordinate of new range end in pixels
事件
DataRangeChanged : EventHandler<EventArgs>
Raised when data range is changed
VisibleRangeChanged : EventHandler<VisibleRangeChangedEventArgs>
Raised when the VisibleRange is changed