Class 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
    • Constructor Detail

      • TreeMapChart

        public TreeMapChart()
        Builds the object.
    • Method Detail

      • getOptions

        public TreeMapOptions getOptions()
        Description copied from interface: IsChart
        Returns the options of chart.
        Specified by:
        getOptions in interface IsChart
        Returns:
        the options of chart.
      • applyConfiguration

        protected final void applyConfiguration()
        Description copied from class: AbstractChart
        Called before any drawing or reconfiguration in order that the chart which implements it can override options
        Overrides:
        applyConfiguration in class AbstractChart
      • getMaximumDatasetsCount

        protected int getMaximumDatasetsCount()
        Description copied from class: AbstractChart
        Returns the maximum amount of datasets that the chart can manage.
        Overrides:
        getMaximumDatasetsCount in class AbstractChart
        Returns:
        the maximum amount of datasets that the chart can manage.
      • checkDataset

        protected boolean checkDataset​(Dataset dataset)
        Description copied from class: AbstractChart
        Returns true if the dataset can be managed by a this chart type.
        Specified by:
        checkDataset in class AbstractChart
        Parameters:
        dataset - dataset to check
        Returns:
        true if the dataset can be managed by a this chart type
      • register

        public static void register()
        Registers the TREEMAP controller in CHART.JS.