Class CategoryLabelProviderBase<T>
Defines a base class for label provider used by category axes.
Inheritance
Inherited Members
Namespace:
Assembly: .dll
Syntax
public abstract class CategoryLabelProviderBase<T> extends labelProviders.FormatterLabelProviderBase<T> implements labelProviders.ICategoryLabelProvider, changeListener.IChartListener
Type Parameters
| Name | Description |
|---|---|
| T |
Constructors
CategoryLabelProviderBase(Class<T> axisType, labelProviders.ILabelFormatter<T> labelFormatter)
Creates a new instance of CategoryLabelProviderBase class.
Declaration
protected CategoryLabelProviderBase(Class<T> axisType, labelProviders.ILabelFormatter<T> labelFormatter)
Parameters
| Type | Name | Description |
|---|---|---|
| Class<T> | axisType | The supported axis type. |
| ILabelFormatter<T> | labelFormatter | The ILabelFormatter used by this label provider. |
Methods
attachTo(IServiceContainer services)
Declaration
public void attachTo(IServiceContainer services)
Parameters
| Type | Name | Description |
|---|---|---|
| IServiceContainer | services |
Overrides
detach()
Declaration
public void detach()
Overrides
formatCursorLabel(double doubleValue)
Formats a label for the cursor, from the specified data-value passed in
Declaration
public CharSequence formatCursorLabel(double doubleValue)
Parameters
| Type | Name | Description |
|---|---|---|
| double | doubleValue |
Returns
| Type | Description |
|---|---|
| CharSequence |
Overrides
formatLabel(double doubleValue)
Formats a label for the axis from the specified data-value passed in
Declaration
public CharSequence formatLabel(double doubleValue)
Parameters
| Type | Name | Description |
|---|---|---|
| double | doubleValue |
Returns
| Type | Description |
|---|---|
| CharSequence |
Overrides
getBarTimeFrame()
Gets the Bar Time Frame in seconds. This is the number of seconds that each data-point represents on the CategoryDateAxis and is required for proper rendering.
Declaration
public final double getBarTimeFrame()
Returns
| Type | Description |
|---|---|
| double |
getBaseDataSeries(T axis, RenderableSeriesCollection renderableSeries)
Find base data series associated with current axis which will be used for transformation indices to data values and vice versa
Declaration
protected dataSeries.IXDataSeriesValues<?,?> getBaseDataSeries(T axis, RenderableSeriesCollection renderableSeries)
Parameters
| Type | Name | Description |
|---|---|---|
| T | axis | The associated axis |
| RenderableSeriesCollection | renderableSeries | The renderable series collection to look for base data series in |
Returns
| Type | Description |
|---|---|
| IXDataSeriesValues<?,?> | The base data series which will be used for transformation indices to data values and vice versa |
onCollectionChanged(int propertyId, CollectionChangedEventArgs<?> args)
Caleed when collection associated with specified id changes
Declaration
public void onCollectionChanged(int propertyId, CollectionChangedEventArgs<?> args)
Parameters
| Type | Name | Description |
|---|---|---|
| int | propertyId | |
| CollectionChangedEventArgs<?> | args |
onPropertyChanged(int propertyId)
Called when property with specified id changes
Declaration
public void onPropertyChanged(int propertyId)
Parameters
| Type | Name | Description |
|---|---|---|
| int | propertyId |
transformDataToIndex(double dataValue)
Transforms a data value to the nearest data point index.
Declaration
public final int transformDataToIndex(double dataValue)
Parameters
| Type | Name | Description |
|---|---|---|
| double | dataValue |
Returns
| Type | Description |
|---|---|
| int |
transformDataToIndex(double dataValue, SearchMode mode)
Transforms a data value to the corresponding data point index using the specified search mode.
Declaration
public final int transformDataToIndex(double dataValue, SearchMode mode)
Parameters
| Type | Name | Description |
|---|---|---|
| double | dataValue | |
| SearchMode | mode |
Returns
| Type | Description |
|---|---|
| int |
transformDataToIndexInternal(double dataValue, SearchMode mode, ISciList<?> xValues, boolean isXValuesSorted)
Finds index of the data-value in the point-series using corresponding SearchMode
Declaration
protected int transformDataToIndexInternal(double dataValue, SearchMode mode, ISciList<?> xValues, boolean isXValuesSorted)
Parameters
| Type | Name | Description |
|---|---|---|
| double | dataValue | Value to which this transformation will be applied. |
| SearchMode | mode | The SearchMode, which will be used to search in ISciList |
| ISciList<?> | xValues | The x values collection. |
| boolean | isXValuesSorted | Is x values collection sorted in ascending order. |
Returns
| Type | Description |
|---|---|
| int | Index of the dataValue in the xValues collection. |
transformIndexToData(int index)
Transforms an index of a data point to the corresponding data value.
Declaration
public final double transformIndexToData(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index |
Returns
| Type | Description |
|---|---|
| double |
transformIndexToDataInternal(int index, ISciList<?> xValues)
Finds the dataValue based on it's index in the corresponding xValues collection.
Declaration
protected double transformIndexToDataInternal(int index, ISciList<?> xValues)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | Index of the sought dataValue. |
| ISciList<?> | xValues | The x values collection. |
Returns
| Type | Description |
|---|---|
| double | The dataValue based on it's index in the corresponding xValues collection. |
update()
Updates provider with new data
Declaration
public void update()
Overrides
updateBarTimeFrame(T axis, ISciList<?> xValues)
Updates this label provider with new data
Declaration
protected abstract double updateBarTimeFrame(T axis, ISciList<?> xValues)
Parameters
| Type | Name | Description |
|---|---|---|
| T | axis | The parent axis |
| ISciList<?> | xValues | The xValues used by this label provider |
Returns
| Type | Description |
|---|---|
| double | The new bar time frame in seconds |