public class Scale extends AbstractModel<Options,IsDefaultScale> implements IsDefaultScale
Modifier | Constructor and Description |
---|---|
|
Scale(IsDefaultScale defaultValues)
Creates the object only with default provider.
|
protected |
Scale(IsDefaultScale defaultValues,
NativeObject nativeObject)
Creates the object only with default provider and native object.
|
Modifier and Type | Method and Description |
---|---|
AngleLines |
getAngleLines()
Returns the angle lines element.
|
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.
|
ScaleBounds |
getBounds()
Returns the property controls the scale boundary strategy (bypassed by min/max time options).
|
double |
getCategoryPercentage()
Returns the percent (0-1) of the available width each category should be within the sample width.
|
ScaleDistribution |
getDistribution()
Returns the property controls the data distribution along the scale.
|
GridLines |
getGrideLines()
Returns the grid lines element.
|
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.
|
PointLabels |
getPointLabels()
Returns the point labels element.
|
Position |
getPosition()
Position of the axis in the chart.
|
ScaleLabel |
getScaleLabel()
Returns the scale label element.
|
Ticks |
getTicks()
Returns the ticks element.
|
Time |
getTime()
Returns the time element.
|
AxisType |
getType()
Returns the type of axis.
|
int |
getWeight()
The weight used to sort the axis.
|
boolean |
isDisplay()
If
true , shows the axis. |
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()
Returns if the axis are stacked or not.
|
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 |
setBounds(ScaleBounds bounds)
Sets the property controls the scale boundary strategy (bypassed by min/max time options).
|
void |
setCategoryPercentage(double categoryPercentage)
Sets the percent (0-1) of the available width each category should be within the sample width.
|
void |
setDisplay(boolean display)
If
true , shows the axis. |
void |
setDistribution(ScaleDistribution distribution)
Sets property controls the data distribution along the scale.
|
void |
setId(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.
|
void |
setType(AxisType type)
Type of scale being employed.
|
void |
setWeight(int weight)
The weight used to sort the axis.
|
checkAndAddToParent, getChildKey, getDefaultValues, getParent, setCallbackToModel, setEventToModel
getArrayValue, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, keys, remove, remove, removeIfExists, setArrayValue, setArrayValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
public Scale(IsDefaultScale defaultValues)
defaultValues
- default provider instance.protected Scale(IsDefaultScale defaultValues, NativeObject nativeObject)
defaultValues
- default provider instance.nativeObject
- native object to store properties.public final ScaleLabel getScaleLabel()
getScaleLabel
in interface IsDefaultScale
public final Ticks getTicks()
getTicks
in interface IsDefaultScale
public final GridLines getGrideLines()
getGrideLines
in interface IsDefaultScale
public final AngleLines getAngleLines()
getAngleLines
in interface IsDefaultScale
public final PointLabels getPointLabels()
getPointLabels
in interface IsDefaultScale
public final Time getTime()
getTime
in interface IsDefaultScale
public final void setId(String id)
id
- The ID is used to link datasets and scale axes togetherpublic final String getId()
UndefinedValues.STRING
if not setpublic final void setStacked(boolean stacked)
stacked
- if the axis are stacked or not.public final boolean isStacked()
isStacked
in interface IsDefaultScale
public final void setType(AxisType type)
type
- type of axispublic final AxisType getType()
getType
in interface IsDefaultScale
public final void setWeight(int weight)
weight
- weight of axispublic final int getWeight()
getWeight
in interface IsDefaultScale
public final void setDisplay(boolean display)
true
, shows the axis.display
- if true
, shows the axes.public final boolean isDisplay()
true
, shows the axis.isDisplay
in interface IsDefaultScale
true
, shows the axis.public final void setOffset(boolean offset)
true
, extra space is added to the both edges and the axis is scaled to fit into the chart area.offset
- extra space of axispublic final boolean isOffset()
true
, extra space is added to the both edges and the axis is scaled to fit into the chart area.isOffset
in interface IsDefaultScale
public final void setPosition(Position position)
position
- position of axispublic final Position getPosition()
getPosition
in interface IsDefaultScale
public final 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 final double getBarPercentage()
getBarPercentage
in interface IsDefaultScale
public final void setCategoryPercentage(double categoryPercentage)
categoryPercentage
- percent (0-1) of the available width each category should be within the sample width.public final double getCategoryPercentage()
getCategoryPercentage
in interface IsDefaultScale
public final 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 final int getBarThickness()
getBarThickness
in interface IsDefaultScale
public final void setMaxBarThickness(int maxBarThickness)
maxBarThickness
- the maximum bar thickness.public final int getMaxBarThickness()
getMaxBarThickness
in interface IsDefaultScale
public final void setDistribution(ScaleDistribution distribution)
distribution
- property controls the data distribution along the scale.public final ScaleDistribution getDistribution()
getDistribution
in interface IsDefaultScale
public final void setBounds(ScaleBounds bounds)
bounds
- property controls the scale boundary strategy (bypassed by min/max time options).public final ScaleBounds getBounds()
getBounds
in interface IsDefaultScale