Class DefaultTypedDataset
- java.lang.Object
-
- org.pepstock.charba.client.defaults.globals.DefaultTypedDataset
-
- All Implemented Interfaces:
IsDefaultAnimationContainer
,IsDefaultAnimationTransition
,IsDefaultBarDatasets
,IsDefaultTypedDataset
public final class DefaultTypedDataset extends Object implements IsDefaultTypedDataset
CHART.JS default values for DATASETS element.- Author:
- Andrea "Stock" Stocchero
-
-
Field Summary
Fields Modifier and Type Field Description static int
FLEX_BAR_THICKNESS
If set to 'flex', the base sample widths are calculated automatically based on the previous and following samples so that they take the full available widths without overlap.
Then, bars are sized using barPercentage and categoryPercentage.
There is no gap when the percentage options are 1.
This mode generates bars with different widths when data are not evenly spaced,Integer.MIN_VALUE
.static String
FLEX_BAR_THICKNESS_VALUE
The value to set to have the base sample widths are calculated automatically based on the previous and following samples so that they take the full available widths without overlap.
Then, bars are sized using barPercentage and categoryPercentage.
There is no gap when the percentage options are 1.
This mode generates bars with different widths when data are not evenly spaced, "flex".
-
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.
-
-
-
Field Detail
-
FLEX_BAR_THICKNESS
public static final int FLEX_BAR_THICKNESS
If set to 'flex', the base sample widths are calculated automatically based on the previous and following samples so that they take the full available widths without overlap.
Then, bars are sized using barPercentage and categoryPercentage.
There is no gap when the percentage options are 1.
This mode generates bars with different widths when data are not evenly spaced,Integer.MIN_VALUE
.- See Also:
- Constant Field Values
-
FLEX_BAR_THICKNESS_VALUE
public static final String FLEX_BAR_THICKNESS_VALUE
The value to set to have the base sample widths are calculated automatically based on the previous and following samples so that they take the full available widths without overlap.
Then, bars are sized using barPercentage and categoryPercentage.
There is no gap when the percentage options are 1.
This mode generates bars with different widths when data are not evenly spaced, "flex".- See Also:
- Constant Field Values
-
-
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.
-
-