Class SankeyChart
- java.lang.Object
-
- org.pepstock.charba.client.events.HandlerManager
-
- org.pepstock.charba.client.AbstractChart
-
- org.pepstock.charba.client.sankey.SankeyChart
-
- All Implemented Interfaces:
HasAxes,IsChart,IsDatasetCreator<SankeyDataset>
public final class SankeyChart extends AbstractChart implements IsDatasetCreator<SankeyDataset>
Sankey charts are a type of flow diagram in which the width of the arrows is proportional to the flow rate.
Sankey diagrams emphasize the major transfers or flows within a system.
They help locate the most important contributions to a flow.
They often show conserved quantities within defined system boundaries.- Author:
- Andrea "Stock" Stocchero
-
-
Field Summary
Fields Modifier and Type Field Description static ControllerTypeCONTROLLER_TYPESankey controller type.static StringTYPEName of chart type "sankey"
-
Constructor Summary
Constructors Constructor Description SankeyChart()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 optionsbooleancheckAxis(Axis axis)Returnstrueif the axis can be managed by a this chart type.protected booleancheckDataset(Dataset dataset)Returnstrueif the dataset can be managed by a this chart type.protected intgetMaximumAxesCount()Returns the maximum amount of axes that the chart can manage.protected intgetMaximumDatasetsCount()Returns the maximum amount of datasets that the chart can manage.SankeyOptionsgetOptions()Returns the options of chart.SankeyDatasetnewDataset(boolean hidden)Creates a new dataset related to chart type.-
Methods inherited from class org.pepstock.charba.client.AbstractChart
addHandler, checkAxes, checkDatasets, clear, createAndSetTimer, destroy, draw, getActiveElements, getBaseType, getCanvas, getChartElement, getData, getDatasetAtEvent, getDatasetItem, getDefaultChartOptions, getDrawCount, getElementAtEvent, getElementAtEvent, getElementsAtEvent, getElementsAtEvent, getId, getInitialCursor, 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, 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 "sankey"- See Also:
- Constant Field Values
-
CONTROLLER_TYPE
public static final ControllerType CONTROLLER_TYPE
Sankey controller type.
-
-
Method Detail
-
getOptions
public SankeyOptions getOptions()
Description copied from interface:IsChartReturns the options of chart.- Specified by:
getOptionsin interfaceIsChart- Returns:
- the options of chart.
-
newDataset
public SankeyDataset newDataset(boolean hidden)
Description copied from interface:IsDatasetCreatorCreates a new dataset related to chart type.- Specified by:
newDatasetin interfaceIsDatasetCreator<SankeyDataset>- Parameters:
hidden- iftrue, it will be initially hidden.- Returns:
- a new dataset related to 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 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.
-
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
-
checkAxis
public boolean checkAxis(Axis axis)
Description copied from interface:HasAxesReturnstrueif the axis can be managed by a this chart type.
-
getMaximumAxesCount
protected final int getMaximumAxesCount()
Description copied from class:AbstractChartReturns the maximum amount of axes that the chart can manage.- Overrides:
getMaximumAxesCountin classAbstractChart- Returns:
- the maximum amount of axes that the chart can manage.
-
-