public final class GaugeDataset extends MeterDataset
MeterDataset.MINIMUM_VALUE
).MeterDataset.setValue(double)
) method instead of
Dataset.setData(double...)
) one.DEFAULT_EMPTY_VALUE_COLOR, DEFAULT_MAXIMUM_VALUE, DEFAULT_VALUE_COLOR, MINIMUM_VALUE
Constructor and Description |
---|
GaugeDataset(double max)
Creates a dataset for gauge with maximum value of data.
|
GaugeDataset(double max,
IsDefaultOptions defaultValues)
Creates a dataset setting the maximum value of dataset and defaults value.
|
Modifier and Type | Method and Description |
---|---|
org.pepstock.charba.client.impl.charts.IsThreshold |
getCurrent()
Returns the current threshold.
|
List<Threshold> |
getThresholds()
Gets all thresholds by an unmodifiable list.
|
boolean |
isPercentageThreshold()
Returns
true if percentage threshold is used, otherwise false . |
void |
setColor(IsColor valueColor)
Sets the fill color for value.
|
void |
setColor(String valueColor)
Sets the fill color for value.
|
void |
setPercentageThreshold(boolean percentageThreshold)
Sets
true if percentage threshold is used, otherwise false . |
void |
setThresholds(Threshold... newThresholds)
Sets all thresholds to use for this gauge.
|
void |
setValue(double value) |
applyGradient, applyPattern, getColor, getColorAsString, getEmptyColor, getEmptyColorAsString, getMax, getValue, setData, setData, setEmptyColor, setEmptyColor, setHidden, setType
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 GaugeDataset(double max)
max
- maximum value of data.public GaugeDataset(double max, IsDefaultOptions defaultValues)
max
- maximum value of dataset.defaultValues
- default optionspublic void setColor(IsColor valueColor)
MeterDataset
setColor
in class MeterDataset
valueColor
- the fill color for value.public void setColor(String valueColor)
MeterDataset
setColor
in class MeterDataset
valueColor
- the fill color for value.public org.pepstock.charba.client.impl.charts.IsThreshold getCurrent()
public boolean isPercentageThreshold()
true
if percentage threshold is used, otherwise false
.true
if percentage threshold is used, otherwise false
public void setPercentageThreshold(boolean percentageThreshold)
true
if percentage threshold is used, otherwise false
.percentageThreshold
- true
if percentage threshold is used, otherwise false
public void setThresholds(Threshold... newThresholds)
newThresholds
- thresholds array.public List<Threshold> getThresholds()
public void setValue(double value)
setValue
in class MeterDataset
value
- the value to set