Class CartesianAxis<T extends org.pepstock.charba.client.configuration.CartesianTick>
- java.lang.Object
- 
- org.pepstock.charba.client.configuration.Axis
- 
- org.pepstock.charba.client.configuration.CartesianAxis<T>
 
 
- 
- Type Parameters:
- T- type of tick to apply to axis
 - Direct Known Subclasses:
- CartesianCategoryAxis,- CartesianLinearAxis,- CartesianLogarithmicAxis,- CartesianTimeAxis
 
 public abstract class CartesianAxis<T extends org.pepstock.charba.client.configuration.CartesianTick> extends Axis Axes are an integral part of a chart. They are used to determine how data maps to a pixel value on the chart.
 In a cartesian chart, there is 1 or more X axis and 1 or more Y axis to map points onto the 2 dimensional canvas.
 These axes are know as 'cartesian axes'.
 Axes that follow a cartesian grid are known as 'Cartesian Axes'.
 Cartesian axes are used for line, bar, and bubble charts.
 Four cartesian axes are included by default.
 - linear
- logarithmic
- category
- time
 - Author:
- Andrea "Stock" Stocchero
 
- 
- 
Constructor SummaryConstructors Modifier Constructor Description protectedCartesianAxis(IsChart chart, ScaleId id, AxisType type, AxisKind kind)Builds the object storing the chart instance and cartesian axis type.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description BoundsgetBounds()Returns the property controls the scale boundary strategy (bypassed by min/max time options).BoundsCallbackgetBoundsCallback()Returns the user callback that sets the property controls the scale boundary strategy (bypassed by min/max time options).IsChartgetChart()Returns the chart instanceprotected TgetConfiguration()Returns the configuration element.GridgetGrid()Returns the grid elementScaleOffsetCallbackgetOffsetCallback()Returns the user callback that sets the added extra space to the both edges and the axis is scaled to fit in the chart area.AxisPositiongetPosition()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'.ScalePositionCallbackgetPositionCallback()Returns the user callback that sets the axis position on the chart.StringgetStack()Returns the stack group.
 Axes at the same position with same stack are stacked.StackCallbackgetStackCallback()Returns the user callback that sets the stack group.StackedCallbackgetStackedCallback()Returns the user callback that sets if the axis are stacked or not.doublegetStackWeight()Returns the weight of the scale in stack group.
 Used to determine the amount of allocated space for the scale within the group.ScaleWeightCallbackgetStackWeightCallback()Returns the user callback that sets the weight of the scale in stack group.abstract TgetTicks()Returns the ticks elementCartesianScaleTitlegetTitle()Returns the scale title elementbooleanisOffset()If true, extra space is added to the both edges and the axis is scaled to fit in the chart area.
 This is set totruein the bar chart by default.booleanisSingleStacked()Returns if you might want to stack positive and negative values together.booleanisStacked()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 fromorg.pepstock.charba.clientpackage.voidmerge(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.voidsetBounds(BoundsCallback boundsCallback)Sets the user callback that sets the property controls the scale boundary strategy (bypassed by min/max time options).voidsetBounds(NativeCallback boundsCallback)Sets the user callback that sets the property controls the scale boundary strategy (bypassed by min/max time options).voidsetBounds(Bounds bounds)Sets the property controls the scale boundary strategy (bypassed by min/max time options).protected voidsetConfiguration(T configuration)voidsetOffset(boolean offset)If true, extra space is added to the both edges and the axis is scaled to fit in the chart area.
 This is set totruein the bar chart by default.voidsetOffset(NativeCallback offsetCallback)Sets the user callback that sets the added extra space to the both edges and the axis is scaled to fit in the chart area.voidsetOffset(ScaleOffsetCallback offsetCallback)Sets the user callback that sets the added extra space to the both edges and the axis is scaled to fit in the chart area.voidsetPosition(NativeCallback positionCallback)Sets the user callback that sets the axis position on the chart.voidsetPosition(ScalePositionCallback positionCallback)Sets the user callback that sets the axis position on the chart.voidsetPosition(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'.voidsetSingleStacked(boolean stacked)Sets if you might want to stack positive and negative values together.voidsetStack(String stack)Sets the stack group.
 Axes at the same position with same stack are stacked.voidsetStack(NativeCallback stackCallback)Sets the user callback that sets the stack group.voidsetStack(StackCallback stackCallback)Sets the user callback that sets the stack group.voidsetStacked(boolean stacked)Sets if the axis are stacked or not.voidsetStacked(NativeCallback stackedCallback)Sets the user callback that sets if the axis are stacked or not.voidsetStacked(StackedCallback stackedCallback)Sets the user callback that sets if the axis are stacked or not.voidsetStackWeight(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.voidsetStackWeight(NativeCallback stackWeightCallback)Sets the user callback that sets the weight of the scale in stack group.voidsetStackWeight(ScaleWeightCallback stackWeightCallback)Sets the user callback that sets the weight of the scale in stack group.StringtoJSON()Returns the JSON representation of the object.- 
Methods inherited from class org.pepstock.charba.client.configuration.AxisgetAlignToPixelsCallback, getAxis, getAxisBuildTicksCallback, getAxisCalculateLabelRotationCallback, getAxisDataLimitsCallback, getAxisDimensionsCallback, getAxisFitCallback, getAxisTickToLabelConversionCallback, getAxisUpdateCallback, getBackgroundColor, getBackgroundColorAsString, getBackgroundColorCallback, getCharbaId, getDisplay, getDisplayCallback, getId, getReverseCallback, getType, getWeight, getWeightCallback, isAlignToPixels, isReverse, setAlignToPixels, setAlignToPixels, setAlignToPixels, setAxisBuildTicksCallback, setAxisCalculateLabelRotationCallback, setAxisDataLimitsCallback, setAxisDimensionsCallback, setAxisFitCallback, setAxisTickToLabelConversionCallback, setAxisUpdateCallback, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundColor, setDisplay, setDisplay, setDisplay, setDisplay, setReverse, setReverse, setReverse, setWeight, setWeight, setWeight
 
- 
 
- 
- 
- 
Method Detail- 
getTitlepublic CartesianScaleTitle getTitle() Returns the scale title element- Returns:
- the scale title element
 
 - 
getTickspublic abstract T getTicks() Returns the ticks element- Returns:
- the ticks
 
 - 
getGridpublic Grid getGrid() Returns the grid element- Returns:
- the grid
 
 - 
setStackedpublic void setStacked(boolean stacked) Sets if the axis are stacked or not.- Parameters:
- stacked- if the axis are stacked or not.
 
 - 
isStackedpublic boolean isStacked() Gets if the axis are stacked or not.- Returns:
- if the axis are stacked or not.
 
 - 
setSingleStackedpublic void setSingleStacked(boolean stacked) Sets if you might want to stack positive and negative values together.- Parameters:
- stacked- if you might want to stack positive and negative values together
 
 - 
isSingleStackedpublic boolean isSingleStacked() Returns if you might want to stack positive and negative values together.- Returns:
- if you might want to stack positive and negative values together
 
 - 
setOffsetpublic void setOffset(boolean offset) If true, extra space is added to the both edges and the axis is scaled to fit in the chart area.
 This is set totruein the bar chart by default.- Parameters:
- offset- extra space of axis
 
 - 
isOffsetpublic boolean isOffset() If true, extra space is added to the both edges and the axis is scaled to fit in the chart area.
 This is set totruein the bar chart by default.- Returns:
- extra space of axis.
 
 - 
setPositionpublic 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'.- Parameters:
- position- position of axis
 
 - 
getPositionpublic 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'.- Returns:
- position of axis.
 
 - 
setBoundspublic void setBounds(Bounds bounds) Sets the property controls the scale boundary strategy (bypassed by min/max time options).- Parameters:
- bounds- property controls the scale boundary strategy (bypassed by min/max time options).
 
 - 
getBoundspublic Bounds getBounds() Returns the property controls the scale boundary strategy (bypassed by min/max time options).- Returns:
- property controls the scale boundary strategy (bypassed by min/max time options).
 
 - 
setStackpublic void setStack(String stack) Sets the stack group.
 Axes at the same position with same stack are stacked.- Parameters:
- stack- the stack group.
 Axes at the same position with same stack are stacked
 
 - 
getStackpublic String getStack() Returns the stack group.
 Axes at the same position with same stack are stacked.- Returns:
- the stack group.
 Axes at the same position with same stack are stacked
 
 - 
setStackWeightpublic 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.- Parameters:
- stackWeight- the weight of the scale in stack group.
 Used to determine the amount of allocated space for the scale within the group.
 
 - 
getStackWeightpublic 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.- Returns:
- the weight of the scale in stack group.
 Used to determine the amount of allocated space for the scale within the group
 
 - 
getPositionCallbackpublic ScalePositionCallback getPositionCallback() Returns the user callback that sets the axis position on the chart.- Returns:
- the user callback that sets the axis position on the chart
 
 - 
setPositionpublic void setPosition(ScalePositionCallback positionCallback) Sets the user callback that sets the axis position on the chart.- Parameters:
- positionCallback- the user callback that sets the axis position on the chart
 
 - 
setPositionpublic void setPosition(NativeCallback positionCallback) Sets the user callback that sets the axis position on the chart.- Parameters:
- positionCallback- that sets the axis position on the chart
 
 - 
getOffsetCallbackpublic ScaleOffsetCallback getOffsetCallback() Returns the user callback that sets the added extra space to the both edges and the axis is scaled to fit in the chart area.- Returns:
- the user callback that sets the added extra space to the both edges and the axis is scaled to fit in the chart area.
 
 - 
setOffsetpublic void setOffset(ScaleOffsetCallback offsetCallback) Sets the user callback that sets the added extra space to the both edges and the axis is scaled to fit in the chart area.- Parameters:
- offsetCallback- the user callback that sets the added extra space to the both edges and the axis is scaled to fit in the chart area.
 
 - 
setOffsetpublic void setOffset(NativeCallback offsetCallback) Sets the user callback that sets the added extra space to the both edges and the axis is scaled to fit in the chart area.- Parameters:
- offsetCallback- that sets the added extra space to the both edges and the axis is scaled to fit in the chart area.
 
 - 
getBoundsCallbackpublic BoundsCallback getBoundsCallback() Returns the user callback that sets the property controls the scale boundary strategy (bypassed by min/max time options).- Returns:
- the user callback that sets the property controls the scale boundary strategy (bypassed by min/max time options).
 
 - 
setBoundspublic void setBounds(BoundsCallback boundsCallback) Sets the user callback that sets the property controls the scale boundary strategy (bypassed by min/max time options).- Parameters:
- boundsCallback- the user callback that sets the property controls the scale boundary strategy (bypassed by min/max time options).
 
 - 
setBoundspublic void setBounds(NativeCallback boundsCallback) Sets the user callback that sets the property controls the scale boundary strategy (bypassed by min/max time options).- Parameters:
- boundsCallback- that sets the property controls the scale boundary strategy (bypassed by min/max time options).
 
 - 
getStackedCallbackpublic StackedCallback getStackedCallback() Returns the user callback that sets if the axis are stacked or not.- Returns:
- the user callback that sets if the axis are stacked or not.
 
 - 
setStackedpublic void setStacked(StackedCallback stackedCallback) Sets the user callback that sets if the axis are stacked or not.- Parameters:
- stackedCallback- the user callback that sets if the axis are stacked or not.
 
 - 
setStackedpublic void setStacked(NativeCallback stackedCallback) Sets the user callback that sets if the axis are stacked or not.- Parameters:
- stackedCallback- that sets if the axis are stacked or not.
 
 - 
getStackWeightCallbackpublic ScaleWeightCallback getStackWeightCallback() Returns the user callback that sets the weight of the scale in stack group.- Returns:
- the user callback that sets the weight of the scale in stack group.
 
 - 
setStackWeightpublic void setStackWeight(ScaleWeightCallback stackWeightCallback) Sets the user callback that sets the weight of the scale in stack group.- Parameters:
- stackWeightCallback- the user callback that sets the weight of the scale in stack group.
 
 - 
setStackWeightpublic void setStackWeight(NativeCallback stackWeightCallback) Sets the user callback that sets the weight of the scale in stack group.- Parameters:
- stackWeightCallback- that sets the weight of the scale in stack group.
 
 - 
getStackCallbackpublic StackCallback getStackCallback() Returns the user callback that sets the stack group.- Returns:
- the user callback that sets the stack group
 
 - 
setStackpublic void setStack(StackCallback stackCallback) Sets the user callback that sets the stack group.- Parameters:
- stackCallback- the user callback that sets the stack group
 
 - 
setStackpublic void setStack(NativeCallback stackCallback) Sets the user callback that sets the stack group.- Parameters:
- stackCallback- that sets the stack group
 
 - 
setConfigurationprotected final void setConfiguration(T configuration) - Parameters:
- configuration- the configuration to set
 
 - 
getConfigurationprotected final T getConfiguration() Returns the configuration element.- Returns:
- the configuration element.
 
 - 
mergepublic final 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.- Parameters:
- source- native object container to add
- property- property name
 
 - 
toJSONpublic final String toJSON() Returns the JSON representation of the object.- Returns:
- the JSON representation of the object.
 
 - 
loadNativeObjectpublic final ChartEnvelop<NativeObject> loadNativeObject(ChartEnvelop<NativeObject> envelop) Returns the native object instance inside an envelop.
 It can be called only fromorg.pepstock.charba.clientpackage.- Parameters:
- envelop- envelop instance which will contain the native object
- Returns:
- the envelop, passed as argument, loaded with the native object
 
 - 
getChartpublic final IsChart getChart() Returns the chart instance- Returns:
- the chart
 
 
- 
 
-