Class Cluster

  • All Implemented Interfaces:
    Serializable, OptionDataListener, org.zkoss.json.JSONAware

    public class Cluster
    extends Optionable
    Options for marker clusters, the concept of sampling the data values into larger blocks in order to ease readability and increase performance of the JavaScript charts.

    Note: marker clusters module is not working with boost and draggable-points modules.

    All the options in this class support DynamicalAttribute.

    Since:
    10.2.1.0
    Author:
    jumperchen
    See Also:
    Serialized Form
    • Constructor Detail

      • Cluster

        public Cluster()
    • Method Detail

      • isAllowOverlap

        public boolean isAllowOverlap()
        Returns false to prevent cluster overlapping - this option works only when layoutAlgorithm.type = "grid".

        Default: true.

      • setAllowOverlap

        public void setAllowOverlap​(Boolean allowOverlap)
        Sets to false prevent cluster overlapping - this option works only when layoutAlgorithm.type = "grid".

        Default: true.

      • isAnimation

        public boolean isAnimation()
        Returns whether to enable or disable for the cluster marker animation.

        Default: true

      • getAnimation

        public Animation getAnimation()
        Returns whether to enable or disable for the cluster marker animation. The animation can also be set as a Animation object.

        Default: {"duration": 500}

      • setAnimation

        public void setAnimation​(boolean animation)
        Sets whether to enable or disable for the cluster marker animation.
        See Also:
        setAnimation(Animation), Animation
      • setAnimation

        public void setAnimation​(Animation animation)
        Sets whether to enable or disable for the cluster marker animation. The animation can also be set as a Animation object.

        Default: {"duration": 500}

        See Also:
        setAnimation(boolean), Animation
      • getDataLabels

        public DataLabels getDataLabels()
        Returns the cluster data labels.

        Default: an instance of DataLabels.

      • setDataLabels

        public void setDataLabels​(DataLabels dataLabels)
        Sets the cluster data labels.
        See Also:
        DataLabels
      • isDrillToCluster

        public boolean isDrillToCluster()
        Returns whether to zoom the plot area to the cluster points range when a cluster is clicked.

        Default: true.

      • setDrillToCluster

        public void setDrillToCluster​(boolean drillToCluster)
        Sets whether to zoom the plot area to the cluster points range when a cluster is clicked.

        Default: true.

      • isEnabled

        public boolean isEnabled()
        Returns whether to enable the marker-clusters module.

        Default: false.

      • setEnabled

        public void setEnabled​(boolean enabled)
        Sets whether to enable the marker-clusters module.

        Default: false.

      • getLayoutAlgorithm

        public ClusterLayoutAlgorithm getLayoutAlgorithm()
        Options for layout algorithm. Inside there are options to change the type of the algorithm, gridSize, distance or iterations.

        Default: an instance of ClusterLayoutAlgorithm

      • setLayoutAlgorithm

        public void setLayoutAlgorithm​(ClusterLayoutAlgorithm layoutAlgorithm)
        Options for layout algorithm. Inside there are options to change the type of the algorithm, gridSize, distance or iterations.

        Default: null

      • getMarker

        public Marker getMarker()
        Returns the cluster marker.

        Default: an instance of Marker

      • setMarker

        public void setMarker​(Marker marker)
        Sets the cluster marker
      • getMinimumClusterSize

        public Number getMinimumClusterSize()
        The minimum amount of points to be combined into a cluster. This value has to be greater or equal to 2.

        Defaults to 2.

      • setMinimumClusterSize

        public void setMinimumClusterSize​(Number minimumClusterSize)
        The minimum amount of points to be combined into a cluster. This value has to be greater or equal to 2.

        Defaults to 2.

      • getStates

        public States getStates()
        Returns a wrapper object for the cluster options in specific states.

        Default: an instance of States

      • setStates

        public void setStates​(States states)
        Sets a wrapper object for the cluster options in specific states.
      • getZones

        public List<Zone> getZones()
        An list defining zones within marker clusters.

        Default: null.

        See Also:
        Zone
      • setZones

        public void setZones​(List<Zone> zones)
        Set the zones within marker clusters.
        See Also:
        getZones(), Zone
      • setZones

        public void setZones​(Zone... zones)
        Set the zones within marker clusters.
        See Also:
        getZones(), Zone