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
方法
CreateDataContext(IComparable) : ITickLabelViewModel
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
FormatCursorLabel(IComparable, bool) : string
Formats a label for the cursor, from the specified data-value passed in
- dataValue
- The data-value to format
- hitTest
- Cursor hit test.
返回值: The formatted cursor label string
FormatLabel(IComparable) : string
Formats a label for the axis from the specified data-value passed in
- dataValue
- The data-value to format
返回值: The formatted label string
Init(IAxis)
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
OnBeginAxisDraw()
Called at the start of an axis render pass, before any labels are formatted for the current draw operation
UpdateDataContext(ITickLabelViewModel, IComparable) : ITickLabelViewModel
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