AxisBase
Provides base functionality for Axes throughout Ultrachart. Derived types include NumericAxis, which supports any numeric value, DateTimeAxis, which supports Date values. Axes may be styled, see the tutorials for more details
Inherits: ContentControl
Implements: IAxis, IAxisParams, IHitTestable, ISuspendable, IInvalidatableElement, IDrawable, INotifyPropertyChanged, IXmlSerializable
Constructors
protected AxisBase()
axisBase = AxisBase()
Initializes a new instance of the AxisBase class.
Properties
public IRange AnimatedVisibleRange { get; set; }
value = axisBase.AnimatedVisibleRange
axisBase.AnimatedVisibleRange = value
Gets or sets the animated VisibleRange of the Axis. When this property is set, the axis animates the VisibleRange to the new value over a duration of 500ms
public bool AutoAlignVisibleRange { get; set; }
value = axisBase.AutoAlignVisibleRange
axisBase.AutoAlignVisibleRange = value
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 False. Whenever the VisibleRange is set on the X-Axis, the Min and Max values will be aligned to data values in the XValues
public AutoRange AutoRange { get; set; }
value = axisBase.AutoRange
axisBase.AutoRange = value
Gets or sets AutoRange Mode
public bool AutoTicks { get; set; }
value = axisBase.AutoTicks
axisBase.AutoTicks = value
Gets or sets value, that indicates whether calculate ticks automatically. Default is True.
public AxisAlignment AxisAlignment { get; set; }
value = axisBase.AxisAlignment
axisBase.AxisAlignment = value
Gets or sets the AxisAlignment for this Axis. Default is Right.
public Color AxisBandsFill { get; set; }
value = axisBase.AxisBandsFill
axisBase.AxisBandsFill = value
Gets or sets the Fill of the Axis Bands. Also see DrawMajorBands to enable this behaviour
public AxisMode AxisMode { get; set; }
value = axisBase.AxisMode
axisBase.AxisMode = value
Gets or sets the AxisMode, e.g. Linear or Logarithmic, that this Axis operates in
public string AxisTitle { get; set; }
value = axisBase.AxisTitle
axisBase.AxisTitle = value
Gets or sets the Axis Title
public virtual double CurrentDatapointPixelSize { get; }
value = axisBase.CurrentDatapointPixelSize
Gets the current data-point size in pixels
public string CursorTextFormatting { get; set; }
value = axisBase.CursorTextFormatting
axisBase.CursorTextFormatting = value
Gets or sets the Text Formatting String for Labels on this cursor
public IRange DataRange { get; }
value = axisBase.DataRange
Gets the DataRange (full extents of the data) of the Axis.
public ILabelProvider DefaultLabelProvider { get; protected set; }
value = axisBase.DefaultLabelProvider
axisBase.DefaultLabelProvider = value
Gets the default ILabelProvider instance.
public bool DrawLabels { get; set; }
value = axisBase.DrawLabels
axisBase.DrawLabels = value
If True, draw labels for each major tick on the Axis, else skips this step
public bool DrawMajorBands { get; set; }
value = axisBase.DrawMajorBands
axisBase.DrawMajorBands = value
If True, draws Major Axis Bands (a filled area between major gridlines), else skips this step
public bool DrawMajorGridLines { get; set; }
value = axisBase.DrawMajorGridLines
axisBase.DrawMajorGridLines = value
If True, draws Major Grid Lines, else skips this step
public bool DrawMajorTicks { get; set; }
value = axisBase.DrawMajorTicks
axisBase.DrawMajorTicks = value
If True, draws Major Tick Lines, else skips this step
public bool DrawMinorGridLines { get; set; }
value = axisBase.DrawMinorGridLines
axisBase.DrawMinorGridLines = value
If True, draws Minor Grid Lines, else skips this step
public bool DrawMinorTicks { get; set; }
value = axisBase.DrawMinorTicks
axisBase.DrawMinorTicks = value
If True, draws Minor Tick Lines, else skips this step
public bool FlipCoordinates { get; set; }
value = axisBase.FlipCoordinates
axisBase.FlipCoordinates = value
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
protected IGridLinesPanel GridLinesPanel { get; }
value = axisBase.GridLinesPanel
Get the GridLinesPanel instance off the parent UltrachartSurface
public IRange<double> GrowBy { get; set; }
value = axisBase.GrowBy
axisBase.GrowBy = value
Gets or sets the GrowBy Factor. e.g. GrowBy(0.1, 0.2) will increase the axis extents by 10% (min) and 20% (max) outside of the data range
public bool HasDefaultVisibleRange { get; }
value = axisBase.HasDefaultVisibleRange
Gets whether the VisibleRange has default value
public bool HasValidVisibleRange { get; }
value = axisBase.HasValidVisibleRange
Gets whether the VisibleRange is valid, e.g. is not null, is not NaN and the difference between Max and Min is not zero
public string Id { get; set; }
value = axisBase.Id
axisBase.Id = value
Gets or sets the string Id of this axis. Used to associated IRenderableSeries and YAxisDragModifier
public bool IsAxisFlipped { get; }
value = axisBase.IsAxisFlipped
Gets whether the current axis is flipped (e.g. YAxis on the bottom or top, or XAxis on the left or right)
public virtual bool IsCategoryAxis { get; }
value = axisBase.IsCategoryAxis
Gets a value indicating whether this instance is a category axis.
public bool IsCenterAxis { get; set; }
value = axisBase.IsCenterAxis
axisBase.IsCenterAxis = value
Gets or sets whether current Axis should placed in the center of chart or not
public virtual bool IsHorizontalAxis { get; }
value = axisBase.IsHorizontalAxis
Gets whether the current axis is horizontal or not
public bool IsLabelCullingEnabled { get; set; }
value = axisBase.IsLabelCullingEnabled
axisBase.IsLabelCullingEnabled = value
Gets or sets a value indicating whether Label Culling is enabled (when labels overlap) on this AxisPanel instance
public virtual bool IsLogarithmicAxis { get; }
value = axisBase.IsLogarithmicAxis
Gets a value indicating whether this instance is a logarithmic axis.
public virtual bool IsPolarAxis { get; }
value = axisBase.IsPolarAxis
Gets a value indicating whether this instance is a polar axis.
public bool IsPrimaryAxis { get; set; }
value = axisBase.IsPrimaryAxis
axisBase.IsPrimaryAxis = value
Gets or sets whether current Axis is the main one in axis collection
public bool IsStaticAxis { get; set; }
value = axisBase.IsStaticAxis
axisBase.IsStaticAxis = value
Gets or sets whether current Axis is a static axis
public bool IsSuspended { get; }
value = axisBase.IsSuspended
Gets a value indicating whether updates for the target are currently suspended
public bool IsXAxis { get; private set; }
value = axisBase.IsXAxis
axisBase.IsXAxis = value
Gets whether the current axis is an X-Axis or not
public ILabelProvider LabelProvider { get; set; }
value = axisBase.LabelProvider
axisBase.LabelProvider = value
Gets or sets a ILabelProvider instance, which may be used to programmatically override the formatting of text and cursor labels. For examples, see the DefaultLabelProvider and TradeChartAxisLabelProvider
public IComparable MajorDelta { get; set; }
value = axisBase.MajorDelta
axisBase.MajorDelta = value
Gets or sets the Major Delta
public Style MajorGridLineStyle { get; set; }
value = axisBase.MajorGridLineStyle
axisBase.MajorGridLineStyle = value
Gets or sets the Major Grid Line Style (TargetType Line), applied to all major gridlines drawn by this axis
public Brush MajorLineStroke { get; set; }
value = axisBase.MajorLineStroke
axisBase.MajorLineStroke = value
Gets or sets the Major Line Stroke for this axis
public Style MajorTickLineStyle { get; set; }
value = axisBase.MajorTickLineStyle
axisBase.MajorTickLineStyle = value
Gets or sets the Major Tick Line Style (TargetType Line), applied to all major ticks on this axis
public int MaxAutoTicks { get; set; }
value = axisBase.MaxAutoTicks
axisBase.MaxAutoTicks = value
Gets or sets the max ticks.
public IComparable MinimalZoomConstrain { get; set; }
value = axisBase.MinimalZoomConstrain
axisBase.MinimalZoomConstrain = value
Gets or sets the MinimalZoomConstrain of the Axis. This is used to set minimum distance between Min and Max of the VisibleRange
public IComparable MinorDelta { get; set; }
value = axisBase.MinorDelta
axisBase.MinorDelta = value
Gets or sets the Minor Delta
public Style MinorGridLineStyle { get; set; }
value = axisBase.MinorGridLineStyle
axisBase.MinorGridLineStyle = value
Gets or sets the Minor Grid Line Style (TargetType Line), applied to all minor gridlines drawn by this axis
public Brush MinorLineStroke { get; set; }
value = axisBase.MinorLineStroke
axisBase.MinorLineStroke = value
Gets or sets the Minoe Line Stroke for this axis
public int MinorsPerMajor { get; set; }
value = axisBase.MinorsPerMajor
axisBase.MinorsPerMajor = value
Gets or sets the number of Minor Delta ticks per Major Tick
public Style MinorTickLineStyle { get; set; }
value = axisBase.MinorTickLineStyle
axisBase.MinorTickLineStyle = value
Gets or sets the Minor Tick Line Style (TargetType Line), applied to all major ticks on this axis
public IAnnotationCanvas ModifierAxisCanvas { get; }
value = axisBase.ModifierAxisCanvas
Gets the ModifierAxisCanvas, which may be used to overlay markers on the canvas
public Orientation Orientation { get; set; }
value = axisBase.Orientation
axisBase.Orientation = value
Gets or sets the Axis Orientation, e.g. Horizontal (XAxis) or Vertical (YAxis)
public IUltrachartSurface ParentSurface { get; set; }
value = axisBase.ParentSurface
axisBase.ParentSurface = value
Gets or sets the ParentSurface that this Axis is associated with
protected IRenderSurface RenderSurface { get; }
value = axisBase.RenderSurface
Get the RenderSurface instance off the parent UltrachartSurface
public UltrachartScrollbar Scrollbar { get; set; }
value = axisBase.Scrollbar
axisBase.Scrollbar = value
Gets or Sets Axis ScrollBar
public IServiceContainer Services { get; set; }
value = axisBase.Services
axisBase.Services = value
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
StockSharp#Xaml#Charting#Visuals#Axes#IAxis#IsXAxis
Gets whether the current axis is an X-Axis or not
StockSharp#Xaml#Charting#Visuals#IDrawable#Height
Gets or sets the suggested height of the element.
Returns: The height of the element, in device-independent units (1/96th inch per unit). The default value is NaN. This value must be equal to or greater than 0.0. See Remarks for upper bound information.
StockSharp#Xaml#Charting#Visuals#IDrawable#Width
Gets or sets the width of the element.
Returns: The width of the element, in device-independent units (1/96th inch per unit). The default value is NaN. This value must be equal to or greater than 0.0. See Remarks for upper bound information.
public double StrokeThickness { get; set; }
value = axisBase.StrokeThickness
axisBase.StrokeThickness = value
Gets or sets the stroke thickness.
public string TextFormatting { get; set; }
value = axisBase.TextFormatting
axisBase.TextFormatting = value
Gets or sets the Text Formatting String for Tick Labels on this axis
public ITickCoordinatesProvider TickCoordinatesProvider { get; set; }
value = axisBase.TickCoordinatesProvider
axisBase.TickCoordinatesProvider = value
Gets or sets a ITickCoordinatesProvider instance on current axis, which is used to transform the data-values received from the TickProvider instance to the coordinates for Axis Gridlines, Ticks and Labels drawing.
public Style TickLabelStyle { get; set; }
value = axisBase.TickLabelStyle
axisBase.TickLabelStyle = value
Gets or sets a style for the labels on this Axis.
public ITickProvider TickProvider { get; set; }
value = axisBase.TickProvider
axisBase.TickProvider = value
Gets or sets a ITickProvider instance on current axis, which is used to compute the data-values of Axis Gridlines, Ticks and Labels.
public Brush TickTextBrush { get; set; }
value = axisBase.TickTextBrush
axisBase.TickTextBrush = value
Gets or sets the tick text brush applied to text labels
public double TitleFontSize { get; set; }
value = axisBase.TitleFontSize
axisBase.TitleFontSize = value
Gets or sets the Axis Title Font Size
public FontWeight TitleFontWeight { get; set; }
value = axisBase.TitleFontWeight
axisBase.TitleFontWeight = value
Gets or sets the Axis Title Font Weight
public Style TitleStyle { get; set; }
value = axisBase.TitleStyle
axisBase.TitleStyle = value
Gets or sets the Style of the Axis Title
public IRange VisibleRange { get; set; }
value = axisBase.VisibleRange
axisBase.VisibleRange = value
Gets or sets the VisibleRange of the Axis.
public IRange VisibleRangeLimit { get; set; }
value = axisBase.VisibleRangeLimit
axisBase.VisibleRangeLimit = value
Gets or sets the VisibleRangeLimit of the Axis. This will be used to clip the axis during ZoomExtents and AutoRange operations
public RangeClipMode VisibleRangeLimitMode { get; set; }
value = axisBase.VisibleRangeLimitMode
axisBase.VisibleRangeLimitMode = value
Gets or setts the VisibleRangeLimitMode of the Axis. This property defines which parts of VisibleRangeLimit will be used by axis
Methods
public void AnimateVisibleRangeTo(IRange to, TimeSpan duration)
axisBase.AnimateVisibleRangeTo(to, duration)
Animates the visible range of the axis to the destination VisibleRange, over the specified Duration. Also see AnimatedVisibleRange property which has a default duration of 500ms
- to
- The end range
- duration
- The duration of the animation.
public virtual void AssertDataType(Type dataType)
axisBase.AssertDataType(dataType)
Asserts the type passed in is supported by the current axis implementation
- dataType
protected virtual void AssertRangeType(IRange range)
axisBase.AssertRangeType(range)
Asserts the IRange is of the correct type for this axis
- range
- The range to assert
protected virtual IRange CalculateDataRange()
result = axisBase.CalculateDataRange()
Calculates data range of current axis
protected abstract void CalculateDelta()
axisBase.CalculateDelta()
Calcuates the delta's for use in this render pass
protected virtual TickCoordinates CalculateTicks()
result = axisBase.CalculateTicks()
Overridden by derived types, called internal to calculate MinorTicks, MajorTicks before Axis drawing
public abstract IRange CalculateYRange(RenderPassInfo renderPassInfo)
result = axisBase.CalculateYRange(renderPassInfo)
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
- renderPassInfo
- Struct containing data for the current render pass
Returns: The VisibleRange of the axis
protected virtual void CoerceVisibleRange()
axisBase.CoerceVisibleRange()
When overridden in derived classes, changes value of the VisibleRange according to axis requirements before it is applied
protected virtual IRange CoerceZeroRange(IRange maximumRange)
result = axisBase.CoerceZeroRange(maximumRange)
Coerce if current range is zero range
- maximumRange
- Current maximum range
protected virtual IComparable ConvertTickToDataValue(IComparable value)
result = axisBase.ConvertTickToDataValue(value)
When overridden in a derived class, converts a tick value to a data value. For instance, this may be overridden in the CategoryDateTimeAxis to convert between indices and DateTimes
- value
public void DecrementSuspend()
axisBase.DecrementSuspend()
Called by IUpdateSuspender each time a target suspender is disposed. When the final target suspender has been disposed, ResumeUpdates is called
protected void DrawGridLine(IRenderContext2D renderContext, IPen2D linePen, XyDirection direction, float atPoint)
axisBase.DrawGridLine(renderContext, linePen, direction, atPoint)
Draws a single grid line on the RenderSurface, using the specified Style (TargetType Line), XyDirection and integer coordinate.
- renderContext
- The IRenderContext2D instance to draw to
- linePen
- The pen (TargetType IPen2D) to apply to the grid line
- direction
- The X or Y direction to draw the
- atPoint
- The integer coordinate to draw at. If direction is XDirection, the coodinate is an X-coordinate, else it is a Y-coordinate
protected virtual void DrawGridLines(IRenderContext2D renderContext, TickCoordinates tickCoords)
axisBase.DrawGridLines(renderContext, tickCoords)
Called internal to draw gridlines before Axis drawing
protected virtual void DrawTickLabels(AxisCanvas canvas, TickCoordinates tickCoords, float offset)
axisBase.DrawTickLabels(canvas, tickCoords, offset)
Draws the ticks and gridlines during a render pass
- canvas
- The canvas to draw labels on.
- tickCoords
- The tick coords containing all coordinates for ticks and gridlines.
- offset
public virtual string FormatCursorText(IComparable value, bool hitTest)
result = axisBase.FormatCursorText(value, hitTest)
String formats text for the cursor, using the CursorTextFormatting property as a formatting string
- value
- The data value to format
- hitTest
- Cursor hit test.
Returns: The string formatted data value
public virtual string FormatText(IComparable value, string format)
result = axisBase.FormatText(value, format)
String formats the text, using the TextFormatting property as a formatting string
- value
- The data value to format
- format
- A composite format string
Returns: The string formatted data value
public virtual string FormatText(IComparable value)
result = axisBase.FormatText(value)
String formats the text, using the TextFormatting property as a formatting string
- value
- The data value to format
Returns: The string formatted data value
public virtual double GetAxisOffset()
result = axisBase.GetAxisOffset()
Returns the offset of the axis relative to the RenderSurface. Is used for cases where axes are vertically or horizontally stacked.
public virtual AxisParams GetAxisParams()
result = axisBase.GetAxisParams()
Gets an AxisParams struct with info about the current axis setup
public Rect GetBoundsRelativeTo(IHitTestable relativeTo)
result = axisBase.GetBoundsRelativeTo(relativeTo)
Gets the bounds of the current HitTestable element relative to another HitTestable element
- relativeTo
- The relative to.
public virtual double GetCoordinate(IComparable value)
result = axisBase.GetCoordinate(value)
Given the Data Value, returns the x or y pixel coordinate at that value on the Axis. This operation is the opposite of Point)
- value
- The DataValue as input
Returns: The pixel coordinate on this Axis corresponding to the input DataValue
public virtual ICoordinateCalculator<double> GetCurrentCoordinateCalculator()
result = axisBase.GetCurrentCoordinateCalculator()
Gets the current ICoordinateCalculator for this Axis, based on current Visible Range and axis type
public IAxisInteractivityHelper GetCurrentInteractivityHelper()
result = axisBase.GetCurrentInteractivityHelper()
Returns the current IAxisInteractivityHelper, valid for the current render pass, which may be used to interact with the axis (Scroll, Zoom, Pan).
public virtual IComparable GetDataValue(double pixelCoordinate)
result = axisBase.GetDataValue(pixelCoordinate)
Transforms a pixel coordinate into a data value for this axis.
- pixelCoordinate
public abstract IRange GetDefaultNonZeroRange()
result = axisBase.GetDefaultNonZeroRange()
Returns an default non zero IRange, called internally by Ultrachart to reset the VisibleRange of an axis to an undefined state
protected abstract IDeltaCalculator GetDeltaCalculator()
result = axisBase.GetDeltaCalculator()
Returns an instance of an IDeltaCalculator which is used to compute the data-values of MajorDelta, MinorDelta. Overridden by derived types to allow calculations specific to that axis type.
Returns: An IDeltaCalculator instance
private decimal GetMajorTickIndex(double tick)
result = axisBase.GetMajorTickIndex(tick)
Returns major tick index e.g value 0 has index #0, 0 + MajorDelta - #1, 0 + 2*MajorDelta - #2 etc...
- tick
protected virtual uint GetMaxAutoTicks()
result = axisBase.GetMaxAutoTicks()
Calculates max auto ticks amount, which is >= 1
public virtual IRange GetMaximumRange()
result = axisBase.GetMaximumRange()
Gets the Maximum Range of the axis, which is equal to the DataRange including any GrowBy factor applied
protected virtual double GetOffsetForLabels()
result = axisBase.GetOffsetForLabels()
Returns an offset for the axis
public IntegerRange GetPointRange()
result = axisBase.GetPointRange()
Gets the integer indices of the X-Data array that are currently in range.
Returns: The indices to the X-Data that are currently in range
public XmlSchema GetSchema()
result = axisBase.GetSchema()
Returns an XmlSchema that describes the XML representation of the object that is produced by the WriteXml method and consumed by the ReadXml method
protected abstract List<Type> GetSupportedTypes()
result = axisBase.GetSupportedTypes()
Returns a list of types which current axis is designed to work with
public abstract IRange GetUndefinedRange()
result = axisBase.GetUndefinedRange()
Returns an undefined IRange, called internally by Ultrachart to reset the VisibleRange of an axis to an undefined state
public IRange GetWindowedYRange(IDictionary<string, IRange> xRanges)
result = axisBase.GetWindowedYRange(xRanges)
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
public virtual AxisInfo HitTest(Point atPoint)
result = axisBase.HitTest(atPoint)
Performs a hit test on the Axis, returning the Data Value at the specific x or y pixel coordinate. This operation is the opposite of IComparable)
- atPoint
- The pixel coordinate on this Axis corresponding to the input DataValue
Returns: An AxisInfo struct containing the datavalue and formatted data value at this coordinate
public virtual AxisInfo HitTest(IComparable dataValue)
result = axisBase.HitTest(dataValue)
Performs a HitTest operation on the AxisBase. The supplied is used to convert to AxisInfo struct, which contains information about the axis, as well as formatted values
- dataValue
- The data value.
Returns: The AxisInfo result
public void InvalidateElement()
axisBase.InvalidateElement()
Asynchronously requests that the element redraws itself plus children. Will be ignored if the element is ISuspendable and currently IsSuspended (within a SuspendUpdates/ResumeUpdates call)
protected static void InvalidateParent(DependencyObject d, DependencyPropertyChangedEventArgs e)
AxisBase.InvalidateParent(d, e)
Provides a DependencyProperty callback which invalidates the parent UltrachartSurface
- d
- e
public abstract bool IsOfValidType(IRange range)
result = axisBase.IsOfValidType(range)
Checks whether is not Null and is of valid type for this axis
- range
public bool IsPointWithinBounds(Point point)
result = axisBase.IsPointWithinBounds(point)
Returns true if the Point is within the bounds of the current HitTestable element
- point
- The point to test
Returns: true if the Point is within the bounds
public virtual bool IsValidRange(IRange range)
result = axisBase.IsValidRange(range)
Checks whether is valid visible range for this axis
- range
private bool IsVisibleRangeValid()
result = axisBase.IsVisibleRangeValid()
Checks if the VisibleRange is valid, e.g. is not null, is not NaN, the difference between Max and Min is positive
public override void OnApplyTemplate()
axisBase.OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes call OnApplyTemplate.
public virtual void OnBeginRenderPass(RenderPassInfo renderPassInfo, IPointSeries firstPointSeries)
axisBase.OnBeginRenderPass(renderPassInfo, firstPointSeries)
Called internally immediately before a render pass begins
public void OnDraw(IRenderContext2D renderContext, IRenderPassData renderPassData)
axisBase.OnDraw(renderContext, renderPassData)
Called when the instance is drawn
- renderContext
- The IRenderContext2D used for drawing
- renderPassData
- Contains arguments and parameters for this render pass
protected virtual void OnDrawAxis(TickCoordinates tickCoords)
axisBase.OnDrawAxis(tickCoords)
Called when the axis should redraw itself.
- tickCoords
protected virtual void OnPropertyChanged(string propertyName)
axisBase.OnPropertyChanged(propertyName)
Raises the PropertyChanged event, as part of INotifyPropertyChanged implementation
- propertyName
- Name of the property.
protected virtual void OnVisibleRangeChanged(VisibleRangeChangedEventArgs args)
axisBase.OnVisibleRangeChanged(args)
Raises the VisibleRangeChanged event
- args
- The VisibleRangeChangedEventArgs containing event data
public virtual void ReadXml(XmlReader reader)
axisBase.ReadXml(reader)
Generates AxisBase from its XML representation.
- reader
public void ResumeUpdates(IUpdateSuspender updateSuspender)
axisBase.ResumeUpdates(updateSuspender)
Resumes updates on the target, intended to be called by IUpdateSuspender
public void Scroll(double pixelsToScroll, ClipMode clipMode, TimeSpan duration)
axisBase.Scroll(pixelsToScroll, clipMode, duration)
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
public void Scroll(double pixelsToScroll, ClipMode clipMode)
axisBase.Scroll(pixelsToScroll, 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
public virtual void ScrollByDataPoints(int pointAmount, TimeSpan duration)
axisBase.ScrollByDataPoints(pointAmount, duration)
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
public void ScrollByDataPoints(int pointAmount)
axisBase.ScrollByDataPoints(pointAmount)
Translates current VisibleRange by the specified number of datapoints
- pointAmount
- Amount of data points that the start visible range is scrolled by
public virtual void ScrollTo(IRange startVisibleRange, double pixelsToScroll)
axisBase.ScrollTo(startVisibleRange, pixelsToScroll)
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
public virtual void ScrollToWithLimit(IRange startVisibleRange, double pixelsToScroll, IRange rangeLimit)
axisBase.ScrollToWithLimit(startVisibleRange, pixelsToScroll, rangeLimit)
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.
public void SetMouseCursor(Cursor cursor)
axisBase.SetMouseCursor(cursor)
Sets the cursor for this Axis
- cursor
- The Cursor instance
public IUpdateSuspender SuspendUpdates()
result = axisBase.SuspendUpdates()
Suspends drawing updates on the target until the returned object is disposed, when a final draw call will be issued
Returns: The disposable Update Suspender
public Point TranslatePoint(Point point, IHitTestable relativeTo)
result = axisBase.TranslatePoint(point, relativeTo)
Translates the point relative to the other hittestable element
- point
- The point.
- relativeTo
- The relative to.
private bool TryApplyVisibleRange(IRange newRange, IRange oldRange)
result = axisBase.TryApplyVisibleRange(newRange, oldRange)
When current VisibleRange is invalid, tries to replace it by , if both ranges are invalid, throws an exception
- newRange
- The range to apply
- oldRange
- The previous VisibleRange
Returns: The value, which indicates whether the VisibleRange is applied or no
public void ValidateAxis()
axisBase.ValidateAxis()
Called to check if the axis properties are valid for rendering. Will throw an exception if not
private void ValidateVisibleRange(IRange range)
axisBase.ValidateVisibleRange(range)
Throws appropriate exceptions if the VisibleRange has a wrong type, or VisibleRange.Min > VisibleRange.Max
public virtual void WriteXml(XmlWriter writer)
axisBase.WriteXml(writer)
Converts AxisBase into its XML representation.
- writer
public void Zoom(double fromCoord, double toCoord, TimeSpan duration)
axisBase.Zoom(fromCoord, toCoord, duration)
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
public void Zoom(double fromCoord, double toCoord)
axisBase.Zoom(fromCoord, toCoord)
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
public void ZoomBy(double minFraction, double maxFraction, TimeSpan duration)
axisBase.ZoomBy(minFraction, maxFraction, duration)
Performs zoom on current IAxis, using as a multiplier of range start and as a multiplier of range end
- minFraction
- The multiplier of range start
- maxFraction
- The multiplier of range end
- duration
- The duration of animation when zooming to extents
public void ZoomBy(double minFraction, double maxFraction)
axisBase.ZoomBy(minFraction, maxFraction)
Performs zoom on current IAxis, using as a multiplier of range start and as a multiplier of range end
- minFraction
- The multiplier of range start
- maxFraction
- The multiplier of range end
Events
public event EventHandler<EventArgs> DataRangeChanged
axisBase.DataRangeChanged += handler
Raised when data range is changed
public event PropertyChangedEventHandler PropertyChanged
axisBase.PropertyChanged += handler
Raised when properties are changed
public event EventHandler<VisibleRangeChangedEventArgs> VisibleRangeChanged
axisBase.VisibleRangeChanged += handler
Raised when the VisibleRange is changed
Fields
public static readonly DependencyProperty AnimatedVisibleRangeProperty
value = AxisBase.AnimatedVisibleRangeProperty
Defines the Animated VisibleRange DependencyProperty
public static readonly DependencyProperty AutoAlignVisibleRangeProperty
value = AxisBase.AutoAlignVisibleRangeProperty
Defines the AutoAlignVisibleRange DependencyProperty
public static readonly DependencyProperty AutoRangeProperty
value = AxisBase.AutoRangeProperty
Defines the AutoRange DependencyProperty
public static readonly DependencyProperty AutoTicksProperty
value = AxisBase.AutoTicksProperty
Defines the AutoTicks DependencyProperty
public static readonly DependencyProperty AxisAlignmentProperty
value = AxisBase.AxisAlignmentProperty
Defines the AxisAlignment DependencyProperty
public static readonly DependencyProperty AxisBandsFillProperty
value = AxisBase.AxisBandsFillProperty
Defines the AxisBandsFill DependencyProperty
public static readonly DependencyProperty AxisModeProperty
value = AxisBase.AxisModeProperty
Defines the AxisMode DependencyProperty
public static readonly DependencyProperty AxisTitleProperty
value = AxisBase.AxisTitleProperty
Defines the AxisTitle DependencyProperty
public static readonly DependencyProperty CursorTextFormattingProperty
value = AxisBase.CursorTextFormattingProperty
Defines the CursorTextFormatting DependencyProperty
public const string DefaultAxisId
value = AxisBase.DefaultAxisId
The Default Axis Id for new Axes
public static readonly DependencyProperty DefaultLabelProviderProperty
value = AxisBase.DefaultLabelProviderProperty
Defines the DefaultFormatter DependencyProperty
public static readonly DependencyProperty DrawLabelsProperty
value = AxisBase.DrawLabelsProperty
Defines the DrawLabels DependencyProperty
public static readonly DependencyProperty DrawMajorBandsProperty
value = AxisBase.DrawMajorBandsProperty
Defines the DrawMajorBands DependencyProperty
public static readonly DependencyProperty DrawMajorGridLinesProperty
value = AxisBase.DrawMajorGridLinesProperty
Defines the DrawMajorGridLines DependencyProperty
public static readonly DependencyProperty DrawMajorTicksProperty
value = AxisBase.DrawMajorTicksProperty
Defines the DrawMajorTicks DependencyProperty
public static readonly DependencyProperty DrawMinorGridLinesProperty
value = AxisBase.DrawMinorGridLinesProperty
Defines the DrawMinorGridLines DependencyProperty
public static readonly DependencyProperty DrawMinorTicksProperty
value = AxisBase.DrawMinorTicksProperty
Defines the DrawMinorTicks DependencyProperty
public static readonly DependencyProperty FlipCoordinatesProperty
value = AxisBase.FlipCoordinatesProperty
Defines the FlipCoordinates DependencyProperty
public static readonly DependencyProperty GrowByProperty
value = AxisBase.GrowByProperty
Defines the GrowBy DependencyProperty
public static readonly DependencyProperty IdProperty
value = AxisBase.IdProperty
Defines the Id DependencyProperty
public static readonly DependencyProperty IsCenterAxisProperty
value = AxisBase.IsCenterAxisProperty
Defines the IsCenterAxis DependencyProperty
public static readonly DependencyProperty IsLabelCullingEnabledProperty
value = AxisBase.IsLabelCullingEnabledProperty
The IsLabelCullingEnabled DependencyProperty
public static readonly DependencyProperty IsPrimaryAxisProperty
value = AxisBase.IsPrimaryAxisProperty
Defines the IsPrimaryAxis DependencyProperty
public static readonly DependencyProperty IsStaticAxisProperty
value = AxisBase.IsStaticAxisProperty
Defines the IsStaticAxis DependencyProperty
public static readonly DependencyProperty LabelProviderProperty
value = AxisBase.LabelProviderProperty
Defines the LabelFormatter DependencyProperty
public static readonly DependencyProperty MajorDeltaProperty
value = AxisBase.MajorDeltaProperty
Defines the MajorDelta DependencyProperty
public static readonly DependencyProperty MajorGridLineStyleProperty
value = AxisBase.MajorGridLineStyleProperty
Defines the MajorGridLineStyle DependencyProperty
public static readonly DependencyProperty MajorTickLineStyleProperty
value = AxisBase.MajorTickLineStyleProperty
Defines the MajorTickLineStyle DependencyProperty
public static readonly DependencyProperty MaxAutoTicksProperty
value = AxisBase.MaxAutoTicksProperty
Defines the MaxAutoTicks DependencyProperty
protected const int MinDistanceToBounds
value = AxisBase.MinDistanceToBounds
Defines the minimum distance to the edge of the chart to cull axis labels
public static readonly DependencyProperty MinimalZoomConstrainProperty
value = AxisBase.MinimalZoomConstrainProperty
Defines the MinimalZoomConstrain DependencyProperty
public static readonly DependencyProperty MinorDeltaProperty
value = AxisBase.MinorDeltaProperty
Defines the MinorDelta DependencyProperty
public static readonly DependencyProperty MinorGridLineStyleProperty
value = AxisBase.MinorGridLineStyleProperty
Defines the MinorGridLineStyle DependencyProperty
public static readonly DependencyProperty MinorsPerMajorProperty
value = AxisBase.MinorsPerMajorProperty
Defines the MinorDelta DependencyProperty
public static readonly DependencyProperty MinorTickLineStyleProperty
value = AxisBase.MinorTickLineStyleProperty
Defines the MinorTickLineStyle DependencyProperty
public static readonly DependencyProperty OrientationProperty
value = AxisBase.OrientationProperty
Defines the Orientation DependencyProperty
public static readonly DependencyProperty ScrollbarProperty
value = AxisBase.ScrollbarProperty
Defines the Axis ScrollBar
public static readonly DependencyProperty StrokeThicknessProperty
value = AxisBase.StrokeThicknessProperty
Defines the StrokeThickness DependencyProperty
public static readonly DependencyProperty TextFormattingProperty
value = AxisBase.TextFormattingProperty
Defines the TextFormatting DependencyProperty
public static readonly DependencyProperty TickCoordinatesProviderProperty
value = AxisBase.TickCoordinatesProviderProperty
Defines the TickCoordinatesProvider DependencyProperty
public static readonly DependencyProperty TickLabelStyleProperty
value = AxisBase.TickLabelStyleProperty
Defines the AutoTicks DependencyProperty
public static readonly DependencyProperty TickProviderProperty
value = AxisBase.TickProviderProperty
Defines the TickProvider DependencyProperty
public static readonly DependencyProperty TickTextBrushProperty
value = AxisBase.TickTextBrushProperty
Defines the TickTextBrush DependencyProperty
public static readonly DependencyProperty TitleFontSizeProperty
value = AxisBase.TitleFontSizeProperty
Defines the TitleFontWeight DependencyProperty
public static readonly DependencyProperty TitleFontWeightProperty
value = AxisBase.TitleFontWeightProperty
Defines the TitleFontWeight DependencyProperty
public static readonly DependencyProperty TitleStyleProperty
value = AxisBase.TitleStyleProperty
Defines the TitleStyle DependencyProperty
public static readonly DependencyProperty VisibleRangeLimitModeProperty
value = AxisBase.VisibleRangeLimitModeProperty
Defines the VisibleRangeLimitMode DependencyProperty
public static readonly DependencyProperty VisibleRangeLimitProperty
value = AxisBase.VisibleRangeLimitProperty
Defines the VisibleRangeLimit DependencyProperty
public static readonly DependencyProperty VisibleRangePointProperty
value = AxisBase.VisibleRangePointProperty
Defines the VisibleRangePoint DependencyProperty
public static readonly DependencyProperty VisibleRangeProperty
value = AxisBase.VisibleRangeProperty
Defines the VisibleRange DependencyProperty
protected const double ZeroRangeGrowBy
value = AxisBase.ZeroRangeGrowBy
Gets GrowBy Min and Max which applied to VisibleRange if VisibleRange.Min == VisibleRAnge.Max
protected ICoordinateCalculator<double> _currentCoordinateCalculator
value = axisBase._currentCoordinateCalculator
The current CoordinateCalculator for this render pass
protected IAxisInteractivityHelper _currentInteractivityHelper
value = axisBase._currentInteractivityHelper
The current InteractivityHelper for this render pass