ILabelProvider
Interface to define a LabelProvider. The LabelFormatter may be set or data-bound to the LabelProvider property, allowing programmatic overriding of axis labels. Create a class which implements ILabelProvider and return string values from the IComparable) and Boolean) methods
Methods
public ITickLabelViewModel CreateDataContext(IComparable dataValue)
result = iLabelProvider.CreateDataContext(dataValue)
Creates a ITickLabelViewModel instance, based on the data-value passed in. Invokes IComparable) to format the specified data-value passed in.
- dataValue
- The data-value to format
public string FormatCursorLabel(IComparable dataValue, bool hitTest)
result = iLabelProvider.FormatCursorLabel(dataValue, hitTest)
Formats a label for the cursor, from the specified data-value passed in
- dataValue
- The data-value to format
- hitTest
- Cursor hit test.
Returns: The formatted cursor label string
public string FormatLabel(IComparable dataValue)
result = iLabelProvider.FormatLabel(dataValue)
Formats a label for the axis from the specified data-value passed in
- dataValue
- The data-value to format
Returns: The formatted label string
public void Init(IAxis parentAxis)
iLabelProvider.Init(parentAxis)
Called when the label formatted is initialized as it is attached to the parent axis, with the parent axis instance
- parentAxis
- The parent IAxis instance
public void OnBeginAxisDraw()
iLabelProvider.OnBeginAxisDraw()
Called at the start of an axis render pass, before any labels are formatted for the current draw operation
public ITickLabelViewModel UpdateDataContext(ITickLabelViewModel labelDataContext, IComparable dataValue)
result = iLabelProvider.UpdateDataContext(labelDataContext, dataValue)
Updates existing ITickLabelViewModel, based on the data-value passed in. Invokes IComparable) to format the specified data-value passed in.
- labelDataContext
- The instance to update
- dataValue
- The data-value to format