AxisMarkerAnnotation
The AxisMarkerAnnotation provides an axis label which is data-bound to its Y-value. Used to place a marker on the Y-Axis it can give feedback about the latest value of a series, or important points in a series.
Inherits: AnchorPointAnnotation
Constructors
public AxisMarkerAnnotation()
axisMarkerAnnotation = AxisMarkerAnnotation()
Initializes a new instance of the AxisMarkerAnnotation class.
Properties
public IAxis Axis { get; }
value = axisMarkerAnnotation.Axis
Gets IAxis intance where AxisMarkerAnnotation is placed
public AxisInfo AxisInfo { get; private set; }
value = axisMarkerAnnotation.AxisInfo
axisMarkerAnnotation.AxisInfo = value
Gets AxisInfo for current MarkerValue Used internally as DataContext for PointerTemplate and LabelTemplate
public string FormattedValue { get; set; }
value = axisMarkerAnnotation.FormattedValue
axisMarkerAnnotation.FormattedValue = value
Gets or sets the Formatted Value of the Axis Marker. By default this is data-bound to Y1
public DataTemplate LabelTemplate { get; set; }
value = axisMarkerAnnotation.LabelTemplate
axisMarkerAnnotation.LabelTemplate = value
Gets or sets label template of AxisMarkerAnnotation
public double MarkerPointWidth { get; set; }
value = axisMarkerAnnotation.MarkerPointWidth
axisMarkerAnnotation.MarkerPointWidth = value
Gets or sets the Marker tip width, this is the width of the point of the marker in pixels. Default value is 8. Change this property if the marker looks squashed!
public DataTemplate PointerTemplate { get; set; }
value = axisMarkerAnnotation.PointerTemplate
axisMarkerAnnotation.PointerTemplate = value
Gets or sets pointer template of AxisMarkerAnnotation
Methods
protected override Cursor GetSelectedCursor()
result = axisMarkerAnnotation.GetSelectedCursor()
Gets the Cursor to use for the annotation when selected
public override bool IsPointWithinBounds(Point point)
result = axisMarkerAnnotation.IsPointWithinBounds(point)
Returns true if the Point is within the bounds of the current IHitTestable element
- point
- The point to test
Returns: true if the Point is within the bounds
public override void OnApplyTemplate()
axisMarkerAnnotation.OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate.
protected override void OnAxisAlignmentChanged(IAxis axis, AxisAlignment oldAlignment)
axisMarkerAnnotation.OnAxisAlignmentChanged(axis, oldAlignment)
Virtual method to override if you wish to be notified that the AxisAlignment has changed
- axis
- oldAlignment
protected override double ToCoordinate(IComparable dataValue, double canvasMeasurement, ICoordinateCalculator<double> coordCalc, XyDirection direction)
result = axisMarkerAnnotation.ToCoordinate(dataValue, canvasMeasurement, coordCalc, direction)
Converts a Data-Value to Pixel Coordinate
- dataValue
- The Data-Value to convert
- canvasMeasurement
- The size of the canvas in the X or Y direction
- coordCalc
- The current ICoordinateCalculatorCoordinate Calculator
- direction
- The X or Y direction for the transformation
public override void Update(ICoordinateCalculator<double> xCoordinateCalculator, ICoordinateCalculator<double> yCoordinateCalculator)
axisMarkerAnnotation.Update(xCoordinateCalculator, yCoordinateCalculator)
Updates the coordinate calculators and refreshes the annotation position on the parent UltrachartSurface
- xCoordinateCalculator
- The XAxis ICoordinateCalculator
- yCoordinateCalculator
- The YAxis ICoordinateCalculator
Fields
protected internal static readonly DependencyProperty AxisInfoProperty
value = AxisMarkerAnnotation.AxisInfoProperty
Defines the AxisInfo DependencyProperty
public static readonly DependencyProperty FormattedValueProperty
value = AxisMarkerAnnotation.FormattedValueProperty
Defines the FormattedValue DependencyProperty
public static readonly DependencyProperty LabelTemplateProperty
value = AxisMarkerAnnotation.LabelTemplateProperty
Defines the LabelTemplate DependencyProperty
public static readonly DependencyProperty MarkerPointWidthProperty
value = AxisMarkerAnnotation.MarkerPointWidthProperty
Defines the MarkerPointWidth DependencyProperty
public static readonly DependencyProperty PointerTemplateProperty
value = AxisMarkerAnnotation.PointerTemplateProperty
Defines the PointerTemplate DependencyProperty