Class GaugeChart
- java.lang.Object
-
- org.pepstock.charba.client.events.HandlerManager
-
- org.pepstock.charba.client.AbstractChart
-
- org.pepstock.charba.client.impl.charts.GaugeChart
-
- All Implemented Interfaces:
HasAxes,IsChart,IsDatasetCreator<GaugeDataset>
public final class GaugeChart extends AbstractChart
GAUGE chart implementation.- Author:
- Andrea "Stock" Stocchero
-
-
Field Summary
Fields Modifier and Type Field Description static ControllerTypeCONTROLLER_TYPEMETER controller typestatic doubleDEFAULT_MAXDefault of maximum value of data in the a dataset (percentage based), 100.0.static StringTYPEName of chart type "charbagauge" for gauge
-
Constructor Summary
Constructors Constructor Description GaugeChart()Builds the object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidapplyConfiguration()Called before any drawing or reconfiguration in order that the chart which implements it can override optionsprotected booleancheckDataset(Dataset dataset)Returnstrueif the dataset can be managed by a this chart type.protected intgetMaximumDatasetsCount()Returns the maximum amount of datasets that the chart can manage.GaugeOptionsgetOptions()Returns the options of chart.GaugeDatasetnewDataset(boolean hidden)Creates a new dataset related to chart type.GaugeDatasetnewDataset(double max)Returns a data set with a maximum value.-
Methods inherited from class org.pepstock.charba.client.AbstractChart
addHandler, checkAxes, checkDatasets, clear, createAndSetTimer, destroy, draw, getActiveElements, getBaseType, getCanvas, getChartElement, getData, getDatasetAtEvent, getDatasetItem, getDefaultChartOptions, getElementAtEvent, getElementsAtEvent, getId, getInitialCursor, getMaximumAxesCount, getNode, getPlugins, getSource, getTimer, getTooltipActiveElements, getType, getVisibleDatasetCount, getWholeOptions, hide, hide, isChartAttached, isDatasetVisible, isDataVisible, isDestroyOnDetach, isDrawOnAttach, isInitialized, onAttach, onDetach, reconfigure, reconfigure, reconfigure, removeCanvasPreventDefault, render, reset, resetActiveElements, resetTooltipActiveElements, resize, resize, setActiveElements, setActiveElements, setDatasetVisibility, setDestroyOnDetach, setDrawOnAttach, setTooltipActiveElements, setTooltipActiveElements, show, show, stop, toBase64Image, toggleDataVisibility, update, update, update
-
Methods inherited from class org.pepstock.charba.client.events.HandlerManager
fireEvent, getHandlerCount, isEventHandled
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.pepstock.charba.client.IsChart
fireEvent, getHandlerCount, isEventHandled, toBase64Image, toBase64Image, toBase64Image
-
Methods inherited from interface org.pepstock.charba.client.IsDatasetCreator
newDataset
-
-
-
-
Field Detail
-
TYPE
public static final String TYPE
Name of chart type "charbagauge" for gauge- See Also:
- Constant Field Values
-
CONTROLLER_TYPE
public static final ControllerType CONTROLLER_TYPE
METER controller type
-
DEFAULT_MAX
public static final double DEFAULT_MAX
Default of maximum value of data in the a dataset (percentage based), 100.0.- See Also:
- Constant Field Values
-
-
Method Detail
-
getOptions
public GaugeOptions getOptions()
Description copied from interface:IsChartReturns the options of chart.- Returns:
- the options of chart.
-
newDataset
public GaugeDataset newDataset(boolean hidden)
Description copied from interface:IsDatasetCreatorCreates a new dataset related to chart type.- Parameters:
hidden- iftrue, it will be initially hidden.- Returns:
- a new dataset related to chart type.
-
newDataset
public GaugeDataset newDataset(double max)
Returns a data set with a maximum value.- Parameters:
max- maximum value of data set- Returns:
- data set instance
-
checkDataset
protected boolean checkDataset(Dataset dataset)
Description copied from class:AbstractChartReturnstrueif the dataset can be managed by a this chart type.- Specified by:
checkDatasetin classAbstractChart- Parameters:
dataset- dataset to check- Returns:
trueif the dataset can be managed by a this chart type
-
applyConfiguration
protected final void applyConfiguration()
Description copied from class:AbstractChartCalled before any drawing or reconfiguration in order that the chart which implements it can override options- Overrides:
applyConfigurationin classAbstractChart
-
getMaximumDatasetsCount
protected final int getMaximumDatasetsCount()
Description copied from class:AbstractChartReturns the maximum amount of datasets that the chart can manage.- Overrides:
getMaximumDatasetsCountin classAbstractChart- Returns:
- the maximum amount of datasets that the chart can manage.
-
-