T
- type of tick to apply to axispublic abstract class CartesianAxis<T extends org.pepstock.charba.client.configuration.CartesianTick> extends Axis
Modifier | Constructor and Description |
---|---|
protected |
CartesianAxis(IsChart chart,
ScaleId id,
AxisType type,
AxisKind kind)
Builds the object storing the chart instance and cartesian axis type.
|
Modifier and Type | Method and Description |
---|---|
Bounds |
getBounds()
Returns the property controls the scale boundary strategy (bypassed by min/max time options).
|
IsChart |
getChart()
Returns the chart instance
|
protected T |
getConfiguration()
Returns the configuration element.
|
Grid |
getGrid()
Returns the grid element
|
AxisPosition |
getPosition()
An axis can either be positioned at the edge of the chart, at the center of the chart area, or dynamically with respect to a data value.
To position the axis at the edge of the chart, set the position option to one of: 'top', 'left', 'bottom', 'right'. To position the axis at the center of the chart area, set the position option to 'center'. |
String |
getStack()
Returns the stack group.
Axes at the same position with same stack are stacked. |
double |
getStackWeight()
Returns the weight of the scale in stack group.
Used to determine the amount of allocated space for the scale within the group. |
abstract T |
getTicks()
Returns the ticks element
|
CartesianScaleTitle |
getTitle()
Returns the scale title element
|
boolean |
isOffset()
If true, extra space is added to the both edges and the axis is scaled to fit in the the chart area.
This is set to true in the bar chart by default. |
boolean |
isSingleStacked()
Returns if you might want to stack positive and negative values together.
|
boolean |
isStacked()
Gets if the axis are stacked or not.
|
ChartEnvelop<NativeObject> |
loadNativeObject(ChartEnvelop<NativeObject> envelop)
Returns the native object instance inside an envelop.
It can be called only from org.pepstock.charba.client package. |
void |
merge(NativeObjectContainer source,
String property)
Merge a native object in the this one with a specific property name.
This is used by plugins implementation (native java script ones) when they are not using the standard way to add plugin configuration in the options of chart. |
void |
setBounds(Bounds bounds)
Sets the property controls the scale boundary strategy (bypassed by min/max time options).
|
protected void |
setConfiguration(T configuration) |
void |
setOffset(boolean offset)
If true, extra space is added to the both edges and the axis is scaled to fit in the the chart area.
This is set to true in the bar chart by default. |
void |
setPosition(AxisPosition position)
An axis can either be positioned at the edge of the chart, at the center of the chart area, or dynamically with respect to a data value.
To position the axis at the edge of the chart, set the position option to one of: 'top', 'left', 'bottom', 'right'. To position the axis at the center of the chart area, set the position option to 'center'. |
void |
setSingleStacked(boolean stacked)
Sets if you might want to stack positive and negative values together.
|
void |
setStack(String stack)
Sets the stack group.
Axes at the same position with same stack are stacked. |
void |
setStacked(boolean stacked)
Sets if the axis are stacked or not.
|
void |
setStackWeight(double stackWeight)
Sets the weight of the scale in stack group.
Used to determine the amount of allocated space for the scale within the group. |
String |
toJSON()
Returns the JSON representation of the object.
|
getAxis, getAxisBuildTicksCallback, getAxisCalculateLabelRotationCallback, getAxisDataLimitsCallback, getAxisDimensionsCallback, getAxisFitCallback, getAxisTickToLabelConversionCallback, getAxisUpdateCallback, getBackgroundColor, getBackgroundColorAsString, getCharbaId, getDisplay, getId, getType, getWeight, isAlignToPixels, isReverse, setAlignToPixels, setAxisBuildTicksCallback, setAxisCalculateLabelRotationCallback, setAxisDataLimitsCallback, setAxisDimensionsCallback, setAxisFitCallback, setAxisTickToLabelConversionCallback, setAxisUpdateCallback, setBackgroundColor, setBackgroundColor, setDisplay, setDisplay, setReverse, setWeight
public CartesianScaleTitle getTitle()
public abstract T getTicks()
public Grid getGrid()
public void setStacked(boolean stacked)
stacked
- if the axis are stacked or not.public boolean isStacked()
public void setSingleStacked(boolean stacked)
stacked
- if you might want to stack positive and negative values togetherpublic boolean isSingleStacked()
public void setOffset(boolean offset)
true
in the bar chart by default.offset
- extra space of axispublic boolean isOffset()
true
in the bar chart by default.public void setPosition(AxisPosition position)
position
- position of axispublic AxisPosition getPosition()
public void setBounds(Bounds bounds)
bounds
- property controls the scale boundary strategy (bypassed by min/max time options).public Bounds getBounds()
public void setStack(String stack)
stack
- the stack group.public String getStack()
public void setStackWeight(double stackWeight)
stackWeight
- the weight of the scale in stack group.public double getStackWeight()
protected final void setConfiguration(T configuration)
configuration
- the configuration to setprotected final T getConfiguration()
public final void merge(NativeObjectContainer source, String property)
source
- native object container to addproperty
- property namepublic final String toJSON()
public final ChartEnvelop<NativeObject> loadNativeObject(ChartEnvelop<NativeObject> envelop)
org.pepstock.charba.client
package.envelop
- envelop instance which will contain the native objectpublic final IsChart getChart()