Package org.pepstock.charba.client
Enum ChartType
- java.lang.Object
-
- java.lang.Enum<ChartType>
-
- org.pepstock.charba.client.ChartType
-
- All Implemented Interfaces:
Serializable
,Comparable<ChartType>
,Key
,Type
public enum ChartType extends Enum<ChartType> implements Type
Enumerates all out-of-the-box types of a chart.- Author:
- Andrea "Stock" Stocchero
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BAR
A bar chart provides a way of showing data values represented as vertical bars.BUBBLE
A bubble chart is used to display three dimensions of data at the same time.DOUGHNUT
Doughnut chart is probably the most commonly used chart.LINE
A line chart is a way of plotting data points on a line.PIE
Pie chart is probably the most commonly used chart.POLAR_AREA
Polar area charts are similar to pie charts, but each segment has the same angle - the radius of the segment differs depending on the value.RADAR
A radar chart is a way of showing multiple data points and the variation between them.SCATTER
Scatter charts are based on basic line charts with the x axis changed to a linear axis.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ScaleType
scaleType()
Returns the scale type of the chart.String
value()
Returns the name value of propertystatic ChartType
valueOf(String name)
Returns the enum constant of this type with the specified name.static ChartType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
LINE
public static final ChartType LINE
A line chart is a way of plotting data points on a line. Often, it is used to show trend data, or the comparison of two data sets.
-
BAR
public static final ChartType BAR
A bar chart provides a way of showing data values represented as vertical bars. It is sometimes used to show trend data, and the comparison of multiple data sets side by side.
-
PIE
public static final ChartType PIE
Pie chart is probably the most commonly used chart. It is divided in the segments, the arc of each segment shows the proportional value of each piece of data. It is excellent at showing the relational proportions between data. Pie and doughnut charts are effectively the same class in Chart.js, but have one different default value - their cutoutPercentage. This equates what percentage of the inner should be cut out. This defaults to 0 for pie charts, and 50 for doughnuts.
-
DOUGHNUT
public static final ChartType DOUGHNUT
Doughnut chart is probably the most commonly used chart. It is divided in the segments, the arc of each segment shows the proportional value of each piece of data. It is excellent at showing the relational proportions between data. Pie and doughnut charts are effectively the same class in Chart.js, but have one different default value - their cutoutPercentage. This equates what percentage of the inner should be cut out. This defaults to 0 for pie charts, and 50 for doughnuts.
-
RADAR
public static final ChartType RADAR
A radar chart is a way of showing multiple data points and the variation between them. They are often useful for comparing the points of two or more different data sets.
-
POLAR_AREA
public static final ChartType POLAR_AREA
Polar area charts are similar to pie charts, but each segment has the same angle - the radius of the segment differs depending on the value. This type of chart is often useful when we want to show a comparison data similar to a pie chart, but also show a scale of values for context.
-
SCATTER
public static final ChartType SCATTER
Scatter charts are based on basic line charts with the x axis changed to a linear axis. To use a scatter chart, data must be passed as objects containing X and Y properties.
-
BUBBLE
public static final ChartType BUBBLE
A bubble chart is used to display three dimensions of data at the same time. The location of the bubble is determined by the first two dimensions and the corresponding horizontal and vertical axes. The third dimension is represented by the size of the individual bubbles.
-
-
Method Detail
-
values
public static ChartType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ChartType c : ChartType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ChartType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
scaleType
public ScaleType scaleType()
Description copied from interface:Type
Returns the scale type of the chart.
-
-