public class ScaleItem extends BaseBoxNodeItem
Constructor and Description |
---|
ScaleItem(CallbacksEnvelop<NativeObject> envelop)
Creates the item using an envelop (from
callbacks package) of native java script object which contains all properties. |
Modifier and Type | Method and Description |
---|---|
AxisKind |
getAxis()
Which kind of axis this is.
Possible values are: ''x', 'y' or 'r'. |
double |
getBasePixel()
Returns the pixel for the minimum chart value.
The coordinate (0, 0) is at the upper-left corner of the canvas. |
double |
getBaseValue()
Returns the minimum chart value.
|
int |
getCharbaId()
Returns the unique id of scale.
|
IsChart |
getChart()
Returns the CHARBA chart instance.
|
double |
getDecimalForPixel(double pixel)
Used to get the data value from a given pixel.
This is the inverse of getPixelForValue. The coordinate (0, 0) is at the upper-left corner of the canvas. |
int |
getDrawingArea()
Returns the drawing area dimension of scale.
|
double |
getEnd()
Returns the end value of scale.
|
ScaleId |
getId()
Returns the id of scale
|
String |
getLabelForValue(double value)
Used to get the label to display in the tooltip for the given value.
|
double |
getLabelRotation()
Returns the label rotation ratio.
|
double |
getMax()
Returns the max value of scale.
|
Date |
getMaxAsDate()
Returns the max value of scale.
|
String |
getMaxAsString()
Returns the max value of scale.
|
double |
getMin()
Returns the minimum value of scale.
|
Date |
getMinAsDate()
Returns the minimum value of scale.
|
String |
getMinAsString()
Returns the minimum value of scale.
|
double |
getPixelForDateValue(Date value)
Returns the location of the given data point.
The coordinate (0, 0) is at the upper-left corner of the canvas. |
double |
getPixelForDateValue(Date value,
double index)
Returns the location of the given data point.
Value can either be an index or a numerical value. The coordinate (0, 0) is at the upper-left corner of the canvas. |
double |
getPixelForDecimal(double decimal)
Utility for getting the pixel location of a percentage of scale.
The coordinate (0, 0) is at the upper-left corner of the canvas. |
double |
getPixelForStringValue(String value)
Returns the location of the given data point.
The coordinate (0, 0) is at the upper-left corner of the canvas. |
double |
getPixelForStringValue(String value,
double index)
Returns the location of the given data point.
The coordinate (0, 0) is at the upper-left corner of the canvas. |
double |
getPixelForTick(double index)
Returns the location of the tick at the given index.
The coordinate (0, 0) is at the upper-left corner of the canvas. |
double |
getPixelForValue(double value)
Returns the location of the given data point.
The coordinate (0, 0) is at the upper-left corner of the canvas. |
double |
getPixelForValue(double value,
double index)
Returns the location of the given data point.
Value can either be an index or a numerical value. The coordinate (0, 0) is at the upper-left corner of the canvas. |
List<String> |
getPointLabels()
Returns the list of point labels of scale.
|
String |
getPositionAsString()
Returns the position of node as string.
|
double |
getStart()
Returns the start value of scale.
|
List<ScaleTickItem> |
getTicks()
Returns the list of ticks.
|
AxisType |
getType()
Returns the type of scale
|
ScaleValueItem |
getValueAtEvent(BaseNativeEvent event)
Returns the value on the axis related to an event position.
|
ScaleValueItem |
getValueAtPixel(double position)
Returns the value on the axis related to a position, passed as pixels.
|
double |
getValueForPixel(double pixel)
Used to get the data value from a given pixel.
This is the inverse of getPixelForValue. The coordinate (0, 0) is at the upper-left corner of the canvas. |
int |
getXCenter()
Returns the X center of scale.
|
int |
getYCenter()
Returns the Y center of scale.
|
getMaxHeight, getMaxWidth, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getPosition, getWeight, isActive, isFullSize
getBottom, getHeight, getLeft, getRight, getTop, getWidth, isInside
checkDefaultValuesArgument, 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, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isConsistent
public ScaleItem(CallbacksEnvelop<NativeObject> envelop)
callbacks
package) of native java script object which contains all properties.envelop
- envelop of native java script object which contains all properties.public final IsChart getChart()
public final ScaleId getId()
public final int getCharbaId()
public final AxisKind getAxis()
public final AxisType getType()
public final double getMax()
public final double getMin()
public final String getMaxAsString()
public final String getMinAsString()
public final Date getMaxAsDate()
null
.public final Date getMinAsDate()
null
.public final List<ScaleTickItem> getTicks()
public final double getLabelRotation()
public final double getStart()
public final double getEnd()
public final int getXCenter()
public final int getYCenter()
public final int getDrawingArea()
public final List<String> getPointLabels()
public final String getPositionAsString()
Position
enumeration, like
for RadialAxis
.public final ScaleValueItem getValueAtEvent(BaseNativeEvent event)
event
- event instance used to get the value from the scalepublic final ScaleValueItem getValueAtPixel(double position)
position
- position in pixel used to get the value from the scalepublic final double getDecimalForPixel(double pixel)
pixel
- pixel valuepublic final double getPixelForDecimal(double decimal)
decimal
- number value to usepublic final double getPixelForTick(double index)
index
- tick index to usepublic final String getLabelForValue(double value)
value
- value of the datapublic final double getPixelForStringValue(String value)
value
- value of the datapublic final double getPixelForStringValue(String value, double index)
value
- value of the data as stringindex
- index of the datapublic final double getPixelForDateValue(Date value)
value
- value of the datapublic final double getPixelForDateValue(Date value, double index)
value
- value of the data as dateindex
- index of the datapublic final double getPixelForValue(double value)
value
- value of the datapublic final double getPixelForValue(double value, double index)
value
- value of the dataindex
- index of the datapublic final double getValueForPixel(double pixel)
pixel
- pixel valuepublic final double getBaseValue()
public final double getBasePixel()