Class DefaultChartTypedDatasets
- java.lang.Object
-
- org.pepstock.charba.client.defaults.chart.DefaultChartTypedDatasets
-
- All Implemented Interfaces:
IsDefaultAnimationContainer
,IsDefaultAnimationTransition
,IsDefaultBarDatasets
,IsDefaultTypedDataset
public final class DefaultChartTypedDatasets extends Object implements IsDefaultTypedDataset
Default values for DATASETS element for a specificType
.- Author:
- Andrea "Stock" Stocchero
-
-
Constructor Summary
Constructors Constructor Description DefaultChartTypedDatasets(IsDefaultTypedDataset dataset)
Creates the object by typed data set option element instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IsDefaultAnimation
getAnimation()
Returns the animation element.IsDefaultAnimations
getAnimations()
Returns the animations collection element.double
getBarPercentage()
Returns the 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.int
getBarThickness()
Returns the width of each bar in pixels.
If set to 'flex', it computes "optimal" sample widths that globally arrange bars side by side.
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.double
getCategoryPercentage()
Returns the percent (0-1) of the available width each category should be within the sample width.int
getMaxBarThickness()
Returns the maximum bar thickness.int
getMinBarLength()
Returns a minimum length in pixels.IsDefaultTransitions
getTransitions()
Returns the animation transition element.boolean
isGrouped()
Whentrue
, all the data sets at same index value will be placed next to each other centering on that index value.
Whenfalse
, each bar is placed on its actual index-axis value.boolean
isShowLine()
Returns if the line is not drawn for this dataset.
-
-
-
Constructor Detail
-
DefaultChartTypedDatasets
public DefaultChartTypedDatasets(IsDefaultTypedDataset dataset)
Creates the object by typed data set option element instance.- Parameters:
dataset
- typed data set option element instance.
-
-
Method Detail
-
getAnimation
public IsDefaultAnimation getAnimation()
Description copied from interface:IsDefaultAnimationTransition
Returns the animation element.- Specified by:
getAnimation
in interfaceIsDefaultAnimationTransition
- Returns:
- the animation
-
getTransitions
public IsDefaultTransitions getTransitions()
Description copied from interface:IsDefaultAnimationContainer
Returns the animation transition element.- Specified by:
getTransitions
in interfaceIsDefaultAnimationContainer
- Returns:
- the animation transition
-
getAnimations
public IsDefaultAnimations getAnimations()
Description copied from interface:IsDefaultAnimationTransition
Returns the animations collection element.- Specified by:
getAnimations
in interfaceIsDefaultAnimationTransition
- Returns:
- the animations collection
-
getBarPercentage
public double getBarPercentage()
Description copied from interface:IsDefaultBarDatasets
Returns the 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.- Specified by:
getBarPercentage
in interfaceIsDefaultBarDatasets
- Returns:
- 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.
-
getCategoryPercentage
public double getCategoryPercentage()
Description copied from interface:IsDefaultBarDatasets
Returns the percent (0-1) of the available width each category should be within the sample width.- Specified by:
getCategoryPercentage
in interfaceIsDefaultBarDatasets
- Returns:
- the percent (0-1) of the available width each category should be within the sample width.
-
getBarThickness
public int getBarThickness()
Description copied from interface:IsDefaultBarDatasets
Returns the width of each bar in pixels.
If set to 'flex', it computes "optimal" sample widths that globally arrange bars side by side.
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.- Specified by:
getBarThickness
in interfaceIsDefaultBarDatasets
- Returns:
- 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.
-
getMaxBarThickness
public int getMaxBarThickness()
Description copied from interface:IsDefaultBarDatasets
Returns the maximum bar thickness.- Specified by:
getMaxBarThickness
in interfaceIsDefaultBarDatasets
- Returns:
- the maximum bar thickness.
-
getMinBarLength
public int getMinBarLength()
Description copied from interface:IsDefaultBarDatasets
Returns a minimum length in pixels.- Specified by:
getMinBarLength
in interfaceIsDefaultBarDatasets
- Returns:
- a minimum length in pixels.
-
isGrouped
public boolean isGrouped()
Description copied from interface:IsDefaultBarDatasets
Whentrue
, all the data sets at same index value will be placed next to each other centering on that index value.
Whenfalse
, each bar is placed on its actual index-axis value.- Specified by:
isGrouped
in interfaceIsDefaultBarDatasets
- Returns:
- if
true
, all the data sets at same index value will be placed next to each other centering on that index value.
-
isShowLine
public boolean isShowLine()
Description copied from interface:IsDefaultTypedDataset
Returns if the line is not drawn for this dataset.- Specified by:
isShowLine
in interfaceIsDefaultTypedDataset
- Returns:
false
if the line is not drawn for this dataset.
-
-