public final class BarCategoryAxis extends CartesianCategoryAxis
Constructor and Description |
---|
BarCategoryAxis(AbstractChart<?,?> chart)
Builds the object storing the chart instance.
|
Modifier and Type | Method and Description |
---|---|
double |
getBarPercentage()
Returns the percent (0-1) of the available width each bar should be within the category width.
|
int |
getBarThickness()
Returns the width of each bar in pixels.
|
CartesianAxisType |
getCartesianType() |
double |
getCategoryPercentage()
Returns the percent (0-1) of the available width each category should be within the sample width.
|
GridLines |
getGrideLines() |
java.lang.String |
getId()
The ID is used to link datasets and scale axes together.
This is especially needed if multi-axes charts are used. |
int |
getMaxBarThickness()
Returns the maximum bar thickness.
|
Position |
getPosition()
Position of the axis in the chart.
|
CartesianScaleLabel |
getScaleLabel() |
T |
getTicks() |
boolean |
isOffset()
If true, extra space is added to the both edges and the axis is scaled to fit into the chart area.
|
boolean |
isStacked() |
void |
setBarPercentage(double barPercentage)
Sets the percent (0-1) of the available width each bar should be within the category width.
|
void |
setBarThickness(int barThickness)
Sets the width of each bar in pixels.
|
void |
setCategoryPercentage(double categoryPercentage)
Sets the percent (0-1) of the available width each category should be within the sample width.
|
void |
setId(java.lang.String id)
The ID is used to link datasets and scale axes together.
This is especially needed if multi-axes charts are used. |
void |
setMaxBarThickness(int maxBarThickness)
Sets the maximum bar thickness, to ensure that bars are not sized thicker than this
|
void |
setOffset(boolean offset)
If true, extra space is added to the both edges and the axis is scaled to fit into the chart area.
|
void |
setPosition(Position position)
Position of the axis in the chart.
|
void |
setStacked(boolean stacked)
Sets if the axis are stacked or not.
|
getBuildTicksCallback, getCalculateTickRotationCallback, getDataLimitsCallback, getDimensionsCallback, getFitCallback, getScale, getTickToLabelConversionCallback, getType, getUpdateCallback, getWeight, isDisplay, onAfterBuildTicks, onAfterCalculateTickRotation, onAfterDataLimits, onAfterFit, onAfterSetDimensions, onAfterTickToLabelConversion, onAfterUpdate, onBeforeBuildTicks, onBeforeCalculateTickRotation, onBeforeDataLimits, onBeforeFit, onBeforeSetDimensions, onBeforeTickToLabelConversion, onBeforeUpdate, setBuildTicksCallback, setCalculateTickRotationCallback, setDataLimitsCallback, setDimensionsCallback, setDisplay, setFitCallback, setTickToLabelConversionCallback, setType, setUpdateCallback, setWeight
getChart
checkAndGetDoubleValues, checkAndGetEnumValues, checkAndGetIntegerValues, checkAndGetStringValues, checkAndSetDoubleValues, checkAndSetEnumValues, checkAndSetIntegerValues, checkAndSetStringValues, getDoubleArray, getIntegerArray, getJavaScriptObject, getObjectArray, getStringArray, getValue, getValue, getValue, getValue, getValue, getValue, getValue, has, has, hasToBeRegistered, isEmpty, keys, remove, remove, removeIfExists, setDoubleArray, setEnumValueArray, setIntegerArray, setObjectArray, setStringArray, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, toString, type
public BarCategoryAxis(AbstractChart<?,?> chart)
chart
- chart instancepublic void setBarPercentage(double barPercentage)
barPercentage
- percent (0-1) of the available width each bar should be within the category width. 1.0 will take the
whole category width and put the bars right next to each other.public double getBarPercentage()
public void setCategoryPercentage(double categoryPercentage)
categoryPercentage
- percent (0-1) of the available width each category should be within the sample width.public double getCategoryPercentage()
public void setBarThickness(int barThickness)
barThickness
- width of each bar in pixels. If not set, the base sample widths are calculated automatically so that
they take the full available widths without overlap. Then, the bars are sized using barPercentage and
categoryPercentage.public int getBarThickness()
public void setMaxBarThickness(int maxBarThickness)
maxBarThickness
- the maximum bar thickness.public int getMaxBarThickness()
public CartesianScaleLabel getScaleLabel()
CartesianScaleLabel
public T getTicks()
Tick
public CartesianAxisType getCartesianType()
CartesianAxisType
public void setStacked(boolean stacked)
stacked
- if the axis are stacked or not.public boolean isStacked()
public void setOffset(boolean offset)
offset
- extra space of axispublic boolean isOffset()
public void setId(java.lang.String id)
id
- The ID is used to link datasets and scale axes togetherpublic java.lang.String getId()
public void setPosition(Position position)
position
- position of axisPosition