Class TreeMapChart
- java.lang.Object
- 
- org.pepstock.charba.client.events.HandlerManager
- 
- org.pepstock.charba.client.AbstractChart
- 
- org.pepstock.charba.client.treemap.TreeMapChart
 
 
 
- 
- All Implemented Interfaces:
- HasAxes,- IsChart,- IsDatasetCreator<TreeMapDataset>
 
 public final class TreeMapChart extends AbstractChart implements IsDatasetCreator<TreeMapDataset> A treemap chart is used for displaying hierarchical data using nested rectangles.
 Treemaps display hierarchical (tree-structured) data as a set of nested rectangles.
 Each branch of the tree is given a rectangle, which is then tiled with smaller rectangles representing sub-branches.
 A leaf node's rectangle has an area proportional to a specified dimension of the data.
 When the color and size dimensions are correlated in some way with the tree structure, one can often easily see patterns that would be difficult to spot in other ways, such as whether a certain color is particularly relevant.
 A second advantage of treemaps is that, by construction, they make efficient use of space. As a result, they can legibly display thousands of items on the screen simultaneously.- Author:
- Andrea "Stock" Stocchero
 
- 
- 
Field SummaryFields Modifier and Type Field Description static ControllerTypeCONTROLLER_TYPETreeMap controller type.static StringTYPEName of chart type "treemap"- 
Fields inherited from class org.pepstock.charba.client.AbstractChartdatasetReferenceFactory
 
- 
 - 
Constructor SummaryConstructors Constructor Description TreeMapChart()Builds the object.
 - 
Method SummaryAll Methods Static 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.TreeMapOptionsgetOptions()Returns the options of chart.TreeMapDatasetnewDataset(boolean hidden)Creates a new dataset related to chart type.static voidregister()Registers the TREEMAP controller in CHART.JS.- 
Methods inherited from class org.pepstock.charba.client.AbstractChartaddHandler, checkAxes, checkDatasets, clear, createAndSetTimer, destroy, draw, getActiveElements, getBaseType, getCanvas, getChartElement, getData, getDatasetAtEvent, getDatasetItem, getDatasetReferenceFactory, getDefaultChartOptions, getDrawCount, getElementAtEvent, getElementAtEvent, getElementsAtEvent, getElementsAtEvent, getId, getInitialCursor, getMaximumAxesCount, getNode, getPlugins, getSortedVisibleDatasetItems, getSource, getTimer, getTooltipActiveElements, getType, getVisibleDatasetCount, getWholeOptions, hide, hide, isChartAttached, isDatasetVisible, isDataVisible, isDestroyOnDetach, isDrawOnAttach, isInitialized, isPluginEnabled, 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.HandlerManagerfireEvent, getHandlerCount, isEventHandled
 - 
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.IsChartfireEvent, getHandlerCount, isEventHandled, toBase64Image, toBase64Image, toBase64Image
 - 
Methods inherited from interface org.pepstock.charba.client.IsDatasetCreatornewDataset
 
- 
 
- 
- 
- 
Field Detail- 
TYPEpublic static final String TYPE Name of chart type "treemap"- See Also:
- Constant Field Values
 
 - 
CONTROLLER_TYPEpublic static final ControllerType CONTROLLER_TYPE TreeMap controller type.
 
- 
 - 
Method Detail- 
getOptionspublic TreeMapOptions getOptions() Description copied from interface:IsChartReturns the options of chart.- Specified by:
- getOptionsin interface- IsChart
- Returns:
- the options of chart.
 
 - 
newDatasetpublic TreeMapDataset newDataset(boolean hidden) Description copied from interface:IsDatasetCreatorCreates a new dataset related to chart type.- Specified by:
- newDatasetin interface- IsDatasetCreator<TreeMapDataset>
- Parameters:
- hidden- if- true, it will be initially hidden.
- Returns:
- a new dataset related to chart type.
 
 - 
applyConfigurationprotected 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 class- AbstractChart
 
 - 
getMaximumDatasetsCountprotected int getMaximumDatasetsCount() Description copied from class:AbstractChartReturns the maximum amount of datasets that the chart can manage.- Overrides:
- getMaximumDatasetsCountin class- AbstractChart
- Returns:
- the maximum amount of datasets that the chart can manage.
 
 - 
checkDatasetprotected boolean checkDataset(Dataset dataset) Description copied from class:AbstractChartReturnstrueif the dataset can be managed by a this chart type.- Specified by:
- checkDatasetin class- AbstractChart
- Parameters:
- dataset- dataset to check
- Returns:
- trueif the dataset can be managed by a this chart type
 
 - 
registerpublic static void register() Registers the TREEMAP controller in CHART.JS.
 
- 
 
-