Class TreeMapDataset

    • Field Detail

      • DATAPOINTS_FACTORY

        public static final org.pepstock.charba.client.treemap.TreeMapDataset.DataPointFactory DATAPOINTS_FACTORY
        Factory to create TreeMapDataPoints.
      • DEFAULT_BORDER_WIDTH

        public static final int DEFAULT_BORDER_WIDTH
        Default border width, 0.
        See Also:
        Constant Field Values
      • DEFAULT_SPACING

        public static final double DEFAULT_SPACING
        Default spacing, 0.5.
        See Also:
        Constant Field Values
      • DEFAULT_RTL

        public static final boolean DEFAULT_RTL
        Default right-to-left, false.
        See Also:
        Constant Field Values
    • Constructor Detail

      • TreeMapDataset

        public TreeMapDataset()
        Creates a data set.
        It uses the global options has default.
      • TreeMapDataset

        public TreeMapDataset​(IsDefaultOptions defaultValues)
        Creates a data set setting the defaults value.
        Parameters:
        defaultValues - default options
    • Method Detail

      • getDefaultBorderWidth

        protected int getDefaultBorderWidth()
        Description copied from class: Dataset
        Returns the default border width value based on type of chart.
        Overrides:
        getDefaultBorderWidth in class Dataset
        Returns:
        the default border width value based on type of chart.
      • getDividers

        public Dividers getDividers()
        Returns the dividers object.
        Returns:
        the dividers object.
      • getCaptions

        public Captions getCaptions()
        Returns the captions object.
        Returns:
        the captions object.
      • getLabels

        public Labels getLabels()
        Returns the labels object.
        Returns:
        the labels object.
      • getDataPoints

        public List<TreeMapDataPoint> getDataPoints()
        Returns the treemap data property of a dataset for a chart is specified as an array of treemap data points
        Returns:
        a list of treemap data points or an empty list of data points.
      • setTree

        public void setTree​(double... values)
        Sets the tree data property of a data set for a chart is specified as an array of numbers.
        Parameters:
        values - an array of numbers
      • setTree

        public void setTree​(List<Double> values)
        Sets the tree data property of a data set for a chart is specified as a list of numbers.
        Parameters:
        values - list of numbers.
      • getTree

        public List<Double> getTree()
        Returns the tree data property of a data set for a chart is specified as a list of numbers.
        Returns:
        list of numbers.
      • getTree

        public List<Double> getTree​(boolean binding)
        Returns the tree data property of a data set for a chart is specified as an list of numbers.
        Parameters:
        binding - if true binds the new array list in the container
        Returns:
        list of numbers
      • setTreeObjects

        public <T extends NativeObjectContainer> void setTreeObjects​(T[] values)
        Sets the tree data property of a data set for a chart is specified as an array of objects.
        Type Parameters:
        T - type of tree objects
        Parameters:
        values - an array of objects
      • setTreeObjetcs

        public <T extends NativeObjectContainer> void setTreeObjetcs​(List<T> values)
        Sets the tree data property of a data set for a chart is specified as a list of objects.
        Type Parameters:
        T - type of tree objects
        Parameters:
        values - list of objects.
      • getTreeObjects

        public <T extends NativeObjectContainerList<T> getTreeObjects​(NativeObjectContainerFactory<T> factory)
        Returns the tree data property of a data set for a chart is specified as a list of objects.
        Type Parameters:
        T - type of tree objects
        Parameters:
        factory - instance of factory to create the native object
        Returns:
        list of objects.
      • getTreeObjects

        public <T extends NativeObjectContainerList<T> getTreeObjects​(NativeObjectContainerFactory<T> factory,
                                                                        boolean binding)
        Returns the tree data property of a data set for a chart is specified as an list of objects.
        Type Parameters:
        T - type of tree objects
        Parameters:
        factory - instance of factory to create the native object
        binding - if true binds the new array list in the container
        Returns:
        list of objects
      • setKey

        public void setKey​(String key)
        Sets the key of the object to use to get data value from a tree object.
        It's needed ONLY when tree data is set by a list of objects.
        Parameters:
        key - the key of the object to use to get data value from a tree object
      • setKey

        public void setKey​(Key key)
        Sets the key of the object to use to get data value from a tree object.
        It's needed ONLY when tree data is set by a list of objects.
        Parameters:
        key - the key of the object to use to get data value from a tree object
      • getKeyAsString

        public String getKeyAsString()
        Returns the key of the object to use to get data value from a tree object.
        It's needed ONLY when tree data is set by a list of objects.
        Returns:
        the key of the object to use to get data value from a tree object
      • getKey

        public Key getKey()
        Returns the key of the object to use to get data value from a tree object.
        It's needed ONLY when tree data is set by a list of objects.
        Returns:
        the key of the object to use to get data value from a tree object
      • setGroups

        public void setGroups​(String... groups)
        Sets the keys of the object to use to group the values from a tree object.
        It's needed ONLY when tree data is set by a list of objects.
        Parameters:
        groups - the keys of the object to use to group the values from a tree object
      • setGroups

        public void setGroups​(Key... groups)
        Sets the keys of the object to use to group the values from a tree object.
        It's needed ONLY when tree data is set by a list of objects.
        Parameters:
        groups - the keys of the object to use to group the values from a tree object
      • setGroups

        public void setGroups​(Set<Key> groups)
        Sets the keys of the object to use to group the values from a tree object.
        It's needed ONLY when tree data is set by a list of objects.
        Parameters:
        groups - the keys of the object to use to group the values from a tree object
      • getGroupsAsString

        public Set<String> getGroupsAsString()
        Returns the keys of the object to use to group the values from a tree object.
        It's needed ONLY when tree data is set by a list of objects.
        Returns:
        the keys of the object to use to group the values from a tree object
      • getGroups

        public Set<Key> getGroups()
        Returns the keys of the object to use to group the values from a tree object.
        It's needed ONLY when tree data is set by a list of objects.
        Returns:
        the keys of the object to use to group the values from a tree object
      • setSpacing

        public void setSpacing​(double spacing)
        Sets the fixed spacing among rectangles.
        Parameters:
        spacing - the fixed spacing among rectangles
      • getSpacing

        public double getSpacing()
        Returns the fixed spacing among rectangles.
        Returns:
        the fixed spacing among rectangles
      • setRtl

        public void setRtl​(boolean rtl)
        Sets true for rendering the rectangles from right to left.
        Parameters:
        rtl - true for rendering the rectangles from right to left
      • isRtl

        public boolean isRtl()
        Returns true for rendering the rectangles from right to left.
        Returns:
        true for rendering the rectangles from right to left.
      • setData

        public void setData​(double... values)
        Throws an exception because not available.
        Overrides:
        setData in class Dataset
        Parameters:
        values - ignored because will throw an exception
      • setData

        public void setData​(List<Double> values)
        Throws an exception because not available.
        Overrides:
        setData in class Dataset
        Parameters:
        values - ignored because will throw an exception
      • getData

        public List<Double> getData​(boolean binding)
        Throws an exception because not available.
        Overrides:
        getData in class Dataset
        Parameters:
        binding - ignored because will throw an exception
        Returns:
        nothing because will throw an exception