Class ScaleContext
- java.lang.Object
- 
- org.pepstock.charba.client.commons.NativeObjectContainer
- 
- org.pepstock.charba.client.callbacks.ChartContext
- 
- org.pepstock.charba.client.callbacks.ScaleContext
 
 
 
- 
 public final class ScaleContext extends ChartContext The SCALE option context is used to give contextual information when resolving options.
 The context object contains the following properties:
 - index: index of the associated data
- scale: scale instance which contains the element to configure
- tick: tick item instance which contains data to be consumed configuring the element (only for ticks)
- label: label item to manage by callback (only for point label context)
 - Author:
- Andrea "Stock" Stocchero
 
- 
- 
Constructor SummaryConstructors Constructor Description ScaleContext(Axis axis, NativeObject nativeObject)Creates the object with an envelop of the native object instance to be wrapped.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancheckIfPropertyIsValid(Key property)Checks if the key passed as argument is a key already used for other context properties.AxisgetAxis()Returns the axis instance where the callback must be invoked.intgetIndex()Returns the index of the tick.StringgetLabel()Returns the label that is shown on the perimeter of the scale.ScaleItemgetScale()Returns the scale instance which contains the element to configure.ScaleTickItemgetTick()Returns the tick item instance which contains data to be consumed configuring the element.- 
Methods inherited from class org.pepstock.charba.client.callbacks.ChartContextgetAttribute, getAttribute, getAttribute, getAttribute, getAttributes, getChart, getType, hasAttributes, isConsistent, setAttribute, setAttribute, setAttribute, setAttribute, setAttributes
 - 
Methods inherited from class org.pepstock.charba.client.commons.NativeObjectContainercheckDefaultValuesArgument, empty, getArrayValue, getElement, getIncrementalId, getNativeChart, getNativeEvent, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, isType, keys, loadNativeObject, remove, remove, setArrayValue, setArrayValue, setArrayValue, setElement, setEmptyValue, setNewIncrementalId, setNewIncrementalId, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
 
- 
 
- 
- 
- 
Constructor Detail- 
ScaleContextpublic ScaleContext(Axis axis, NativeObject nativeObject) Creates the object with an envelop of the native object instance to be wrapped.- Parameters:
- axis- axis instance where the callback must be invoked
- nativeObject- native object instance to be wrapped.
 
 
- 
 - 
Method Detail- 
getAxispublic final Axis getAxis() Returns the axis instance where the callback must be invoked.- Returns:
- the axis instance where the callback must be invoked
 
 - 
getIndexpublic int getIndex() Returns the index of the tick.- Returns:
- the index of the tick.
 
 - 
getScalepublic ScaleItem getScale() Returns the scale instance which contains the element to configure.- Returns:
- the scale instance which contains the element to configure
 
 - 
getTickpublic ScaleTickItem getTick() Returns the tick item instance which contains data to be consumed configuring the element.- Returns:
- the tick item instance which contains data to be consumed configuring the element
 
 - 
getLabelpublic String getLabel() Returns the label that is shown on the perimeter of the scale. Only forRadialPointLabelscallback.- Returns:
- the label that is shown on the perimeter of the scale. Only for RadialPointLabelscallback.
 
 - 
checkIfPropertyIsValidprotected boolean checkIfPropertyIsValid(Key property) Description copied from class:ChartContextChecks if the key passed as argument is a key already used for other context properties.- Overrides:
- checkIfPropertyIsValidin class- ChartContext
- Parameters:
- property- property to use to store a custom attribute
- Returns:
- trueif the property can be used to store an attribute.
 
 
- 
 
-