Class GaugeDataset
- java.lang.Object
- 
- org.pepstock.charba.client.commons.NativeObjectContainer
- 
- org.pepstock.charba.client.commons.AbstractNode
- 
- org.pepstock.charba.client.data.Dataset
- 
- org.pepstock.charba.client.impl.charts.MeterDataset
- 
- org.pepstock.charba.client.impl.charts.GaugeDataset
 
 
 
 
 
- 
- All Implemented Interfaces:
- HasCallbackScope,- HasDataset,- IsDefaultAnimationContainer,- IsDefaultAnimationTransition,- HasAnimationOptions
 
 public final class GaugeDataset extends MeterDataset The Gauge chart allows a number of properties to be specified for each dataset. These are used to set display properties for a specific dataset.
 Is equals of Meter dataset.
 The minimum value of data is 0 (seeMeterDataset.MINIMUM_VALUE).
 To set the data, is mandatory to useMeterDataset.setValue(double)) method instead ofDataset.setData(double...)) one.- Author:
- Andrea "Stock" Stocchero
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class org.pepstock.charba.client.data.DatasetDataset.CanvasObjectProperty, Dataset.CommonProperty
 
- 
 - 
Field Summary- 
Fields inherited from class org.pepstock.charba.client.impl.charts.MeterDatasetDEFAULT_EMPTY_VALUE_COLOR, DEFAULT_MAXIMUM_VALUE, DEFAULT_VALUE_COLOR, MINIMUM_VALUE
 - 
Fields inherited from class org.pepstock.charba.client.data.DatasetDEFAULT_HIDDEN, DEFAULT_NORMALIZED, DEFAULT_PARSING
 
- 
 - 
Constructor SummaryConstructors Constructor 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.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description ThresholdgetCurrent()Returns the current threshold.List<Threshold>getThresholds()Gets all thresholds by an unmodifiable list.booleanisPercentageThreshold()Returnstrueif percentage threshold is used, otherwisefalse.voidsetColor(String valueColor)Sets the fill color for value.voidsetColor(IsColor valueColor)Sets the fill color for value.voidsetMax(double max)Sets the maximum value of chart.voidsetPercentageThreshold(boolean percentageThreshold)Setstrueif percentage threshold is used, otherwisefalse.voidsetThresholds(Threshold... newThresholds)Sets all thresholds to use for this gauge.voidsetValue(double value)- 
Methods inherited from class org.pepstock.charba.client.impl.charts.MeterDatasetgetBorderColor, getBorderColorAsString, getBorderRadius, getBorderRadiusAsObject, getBorderWidth, getColor, getColorAsString, getDescriptionLabel, getEmptyColor, getEmptyColorAsString, getMax, getValue, getValueLabel, setBackgroundColor, setBackgroundColor, setBorderColor, setBorderColor, setBorderColor, setBorderColor, setBorderRadius, setBorderRadius, setBorderWidth, setData, setData, setEmptyColor, setEmptyColor, setHoverBackgroundColor, setHoverBackgroundColor, setHoverBorderColor, setHoverBorderColor
 - 
Methods inherited from class org.pepstock.charba.client.data.DatasetcreateContext, getAnimationContainer, getBackgroundColorCallback, getBorderColorCallback, getClip, getClipAsObject, getData, getData, getDataCount, getDataset, getDataType, getDefaultBackgroundColorAsString, getDefaultBorderColorAsString, getDefaultBorderWidth, getDefaultHoverBackgroundColorAsString, getDefaultHoverBorderColorAsString, getDefaultHoverBorderWidth, getDefaultValues, getHoverBackgroundColorCallback, getHoverBorderColorCallback, getId, getLabel, getOptions, getOptions, getScope, getType, getTypedDataset, hasOptions, invokeColorCallback, isClip, isHidden, isNormalized, isParsing, removeOptions, setClip, setClip, setClip, setHidden, setLabel, setNormalized, setOptions, setOptions, setParsing
 - 
Methods inherited from class org.pepstock.charba.client.commons.AbstractNodecheckAndAddToParent, getChildKey, getParentNode, getRootNode, getUpdateListener, retrieveRoot, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setElementAndAddToParent, setInternalCallbackToModel, setInternalCallbackToModel, setUpdateListener, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent
 - 
Methods inherited from class org.pepstock.charba.client.commons.NativeObjectContainercheckAndGetColor, checkDefaultValuesArgument, empty, getArrayValue, getElement, getIncrementalId, getNativeChart, getNativeEvent, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, isType, keys, loadNativeObject, remove, remove, setArrayValue, setArrayValue, setArrayValue, setElement, setEmptyValue, setNewIncrementalId, setNewIncrementalId, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.pepstock.charba.client.options.HasAnimationOptionsgetAnimation, getAnimations, getTransitions, isAnimationEnabled, setAnimationEnabled
 
- 
 
- 
- 
- 
Constructor Detail- 
GaugeDatasetpublic GaugeDataset(double max) Creates a dataset for gauge with maximum value of data. It uses the global options has default.- Parameters:
- max- maximum value of data.
 
 - 
GaugeDatasetpublic GaugeDataset(double max, IsDefaultOptions defaultValues)Creates a dataset setting the maximum value of dataset and defaults value.- Parameters:
- max- maximum value of dataset.
- defaultValues- default options
 
 
- 
 - 
Method Detail- 
setColorpublic void setColor(IsColor valueColor) Description copied from class:MeterDatasetSets the fill color for value.- Overrides:
- setColorin class- MeterDataset
- Parameters:
- valueColor- the fill color for value.
 
 - 
setColorpublic void setColor(String valueColor) Description copied from class:MeterDatasetSets the fill color for value.- Overrides:
- setColorin class- MeterDataset
- Parameters:
- valueColor- the fill color for value.
 
 - 
setMaxpublic void setMax(double max) Description copied from class:MeterDatasetSets the maximum value of chart.- Overrides:
- setMaxin class- MeterDataset
- Parameters:
- max- the maximum value of chart.
 
 - 
getCurrentpublic Threshold getCurrent() Returns the current threshold.- Returns:
- the current
 
 - 
isPercentageThresholdpublic boolean isPercentageThreshold() Returnstrueif percentage threshold is used, otherwisefalse.- Returns:
- trueif percentage threshold is used, otherwise- false
 
 - 
setPercentageThresholdpublic void setPercentageThreshold(boolean percentageThreshold) Setstrueif percentage threshold is used, otherwisefalse.- Parameters:
- percentageThreshold-- trueif percentage threshold is used, otherwise- false
 
 - 
setThresholdspublic void setThresholds(Threshold... newThresholds) Sets all thresholds to use for this gauge.- Parameters:
- newThresholds- thresholds array.
 
 - 
getThresholdspublic List<Threshold> getThresholds() Gets all thresholds by an unmodifiable list.- Returns:
- all thresholds by an unmodifiable list
 
 - 
setValuepublic void setValue(double value) - Overrides:
- setValuein class- MeterDataset
- Parameters:
- value- the value to set
 
 
- 
 
-