public class MeterDataset extends Dataset
MINIMUM_VALUE
).setValue(double)
) method.Modifier and Type | Field and Description |
---|---|
static IsColor |
DEFAULT_EMPTY_VALUE_COLOR
Default empty color, rgb(234, 234, 234).
|
static double |
DEFAULT_MAXIMUM_VALUE
Default maximum value is 100.0.
|
static IsColor |
DEFAULT_VALUE_COLOR
Default value color, rgb(140, 214, 16).
|
static double |
MINIMUM_VALUE
Minimum value is 0.0.
|
Constructor and Description |
---|
MeterDataset(double max)
Creates a dataset setting the maximum value of dataset.
|
MeterDataset(double max,
IsDefaultOptions defaultValues)
Creates a dataset setting the maximum value of dataset and defaults value.
|
Modifier and Type | Method and Description |
---|---|
protected void |
applyGradient(Key key,
List<CanvasGradient> canvasGradientsList)
Stores the canvas gradients into dataset object by property name passed as key.
|
protected void |
applyPattern(Key key,
List<CanvasPattern> canvasPatternsList)
Stores the canvas patterns into dataset object by property name passed as key.
|
IsColor |
getColor()
Returns the fill color for value.
|
String |
getColorAsString()
Returns the fill color for value.
|
IsColor |
getEmptyColor()
Returns the fill color for empty sector.
|
String |
getEmptyColorAsString()
Returns the fill color for empty sector.
|
double |
getMax()
Returns the maximum value of chart.
|
double |
getValue()
Returns the value of the chart.
|
void |
setColor(IsColor valueColor)
Sets the fill color for value.
|
void |
setColor(String valueColor)
Sets the fill color for value.
|
void |
setData(double... values)
Throws an exception because not available.
|
void |
setData(List<Double> values)
Throws an exception because not available.
|
void |
setEmptyColor(IsColor emptyValueColor)
Sets the fill color for empty sector.
|
void |
setEmptyColor(String emptyValueColor)
Sets the fill color for empty sector.
|
void |
setHidden(boolean hidden)
Sets if the dataset will appear or not.
|
void |
setType(Type type)
Sets the type of dataset based on type of chart.
|
void |
setValue(double value) |
getBackgroundColorCallback, getBorderColorCallback, getBorderWidthCallback, getData, getData, getDataset, getDataType, getDefaultBackgroundColorAsString, getDefaultBorderColorAsString, getDefaultBorderWidth, getDefaultValues, getId, getLabel, getOptions, getType, hasOptions, isHidden, setBackgroundColor, setBorderColor, setBorderWidth, setLabel, setOptions
checkValue, 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 static final IsColor DEFAULT_VALUE_COLOR
public static final IsColor DEFAULT_EMPTY_VALUE_COLOR
public static final double DEFAULT_MAXIMUM_VALUE
public static final double MINIMUM_VALUE
public MeterDataset(double max)
max
- maximum value of dataset.public MeterDataset(double max, IsDefaultOptions defaultValues)
max
- maximum value of dataset.defaultValues
- default optionspublic void setColor(IsColor valueColor)
valueColor
- the fill color for value.public void setColor(String valueColor)
valueColor
- the fill color for value.public String getColorAsString()
public IsColor getColor()
public void setEmptyColor(IsColor emptyValueColor)
emptyValueColor
- the fill color for empty sector.public void setEmptyColor(String emptyValueColor)
emptyValueColor
- the fill color for empty sector.public String getEmptyColorAsString()
public IsColor getEmptyColor()
public final double getMax()
public final double getValue()
public void setValue(double value)
value
- the value to setpublic void setType(Type type)
Dataset
public final void setHidden(boolean hidden)
Dataset
public final void setData(double... values)
protected final void applyPattern(Key key, List<CanvasPattern> canvasPatternsList)
Dataset
applyPattern
in class Dataset
key
- key property name to use to store canvas patterns into dataset object.canvasPatternsList
- list of canvas patternsprotected final void applyGradient(Key key, List<CanvasGradient> canvasGradientsList)
Dataset
applyGradient
in class Dataset
key
- key property name to use to store canvas gradients into dataset object.canvasGradientsList
- list of canvas gradients