Class Drilldown

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

    public class Drilldown
    extends Optionable
    Options for drill down, the concept of inspecting increasingly high resolution data through clicking on chart items like columns or pie slices.

    All the options in this class support DynamicalAttribute.

    Author:
    jumperchen, RaymondChao
    See Also:
    Serialized Form
    • Constructor Detail

      • Drilldown

        public Drilldown()
    • Method Detail

      • getActiveAxisLabelStyle

        public <K,​V> Map<K,​V> getActiveAxisLabelStyle()
        Returns additional styles to apply to the X axis label for a point that has drilldown data. By default it is underlined and blue to invite to interaction. Defaults to:
         cursor: pointer; color: #0d233a; fontWeight: bold; textDecoration: underline;
         
        Type Parameters:
        K - type for the key

        if style was set using setActiveAxisLabelStyle(String), type will be String

        if style was set using setActiveAxisLabelStyle(Map), type will be the same as the type from the key of the map

        if style was not set, default style will be applied, and type will be String

        V - type for the value

        if style was set using setActiveAxisLabelStyle(String), type will be String

        if style was set using setActiveAxisLabelStyle(Map), type will be the same as the type from the key of the map

        if style was not set, default style will be applied, and type will be String

      • setActiveAxisLabelStyle

        public <K,​V> void setActiveAxisLabelStyle​(Map<K,​V> labelStyle)
        Sets additional styles to apply to the X axis label for a point that has drilldown data. By default it is underlined and blue to invite to interaction.

        This method allows complex styling like:

         
         Map<String, Object> styles = new HashMap<String, Object>();
         styles.put("fill", "#E8E8EA");
         styles.put("stroke", "#6E6E78");
         styles.put("stroke-width", "1");
         styles.put("r", "0");
         Map<String, Object> states = new HashMap<String, Object>();
         Map<String, String> hover = new HashMap<String, String>();
         hover.put("fill", "#F4F4F6");
         hover.put("stroke", "#6E6E78");
         hover.put("stroke-width", "1");
         hover.put("r", "0");
         states.put("hover", hover);
         styles.put("states", states);
         Map<String, String> style = new HashMap<String, String>();
         style.put("color", "#4D5663");
         style.put("fontSize", "12px");
         style.put("fontFamily", "'Arial'");
         style.put("fontWeight", "normal");
         style.put("padding", "10px");
         styles.put("style", style);
         
        which will generate the final results like:
        
         {
             "fill": "#E8E8EA",
             "stroke": "#6E6E78",
             "stroke-width": "1",
             "r": "0",
             "states":
             {
                 "hover":
                 {
                     "fill": "#F4F4F6",
                     "stroke": "#6E6E78",
                     "stroke-width": "1",
                     "r": "0"
                 }
             },
             "style":
             {
                 "color": "#4D5663",
                 "fontSize": "12px",
                 "fontFamily": "'Arial'",
                 "fontWeight": "normal",
                 "padding": "10px"
             }
         }
         
        Type Parameters:
        K - Type for the key, usually String
        V - Type for the value, usually String. For nested maps, use Object or any other type.
        Parameters:
        labelStyle - the labelStyle object
      • setActiveAxisLabelStyle

        public void setActiveAxisLabelStyle​(String activeAxisLabelStyle)
        Sets additional styles to apply to the X axis label for a point that has drilldown data. By default it is underlined and blue to invite to interaction.

        This method allows simple settings like

        
         label.setStyle("fontWeight: 'bold'; color: 'white'; textShadow: '0px 1px 2px black'");
         

        In the format of CSS key:value, and ";" separating multiple key:value pairs, if you have more a complex CSS styling, we recommend using setActiveAxisLabelStyle(Map)

        Parameters:
        activeAxisLabelStyle - one or many CSS key:value pairs in a single line string format
      • getActiveDataLabelStyle

        public <K,​V> Map<K,​V> getActiveDataLabelStyle()
        Returns additional styles to apply to the data label of a point that has drilldown data. By default it is underlined and blue to invite to interaction. Defaults to:
         cursor: pointer; color: #0d233a; fontWeight: bold; textDecoration: underline;
         
        Type Parameters:
        K - type for the key

        if style was set using setActiveDataLabelStyle(String), type will be String

        if style was set using setActiveDataLabelStyle(Map), type will be the same as the type from the key of the map

        if style was not set, default style will be applied, and type will be String

        V - type for the value

        if style was set using setActiveDataLabelStyle(String), type will be String

        if style was set using setActiveDataLabelStyle(Map), type will be the same as the type from the key of the map

        if style was not set, default style will be applied, and type will be String

      • setActiveDataLabelStyle

        public void setActiveDataLabelStyle​(String activeDataLabelStyle)
        Sets additional styles to apply to the data label of a point that has drilldown data. By default it is underlined and blue to invite to interaction.

        This method allows simple settings like

        
         label.setStyle("fontWeight: 'bold'; color: 'white'; textShadow: '0px 1px 2px black'");
         

        In the format of CSS key:value, and ";" separating multiple key:value pairs, if you have more a complex CSS styling, we recommend using setActiveDataLabelStyle(Map)

        Parameters:
        activeDataLabelStyle - one or many CSS key:value pairs in a single line string format
      • setActiveDataLabelStyle

        public <K,​V> void setActiveDataLabelStyle​(Map<K,​V> activeDataLabelStyle)
        Sets additional styles to apply to the data label of a point that has drilldown data. By default it is underlined and blue to invite to interaction.

        This method allows complex styling like:

         
         Map<String, Object> styles = new HashMap<String, Object>();
         styles.put("fill", "#E8E8EA");
         styles.put("stroke", "#6E6E78");
         styles.put("stroke-width", "1");
         styles.put("r", "0");
         Map<String, Object> states = new HashMap<String, Object>();
         Map<String, String> hover = new HashMap<String, String>();
         hover.put("fill", "#F4F4F6");
         hover.put("stroke", "#6E6E78");
         hover.put("stroke-width", "1");
         hover.put("r", "0");
         states.put("hover", hover);
         styles.put("states", states);
         Map<String, String> style = new HashMap<String, String>();
         style.put("color", "#4D5663");
         style.put("fontSize", "12px");
         style.put("fontFamily", "'Arial'");
         style.put("fontWeight", "normal");
         style.put("padding", "10px");
         styles.put("style", style);
         
        which will generate the final results like:
        
         {
             "fill": "#E8E8EA",
             "stroke": "#6E6E78",
             "stroke-width": "1",
             "r": "0",
             "states":
             {
                 "hover":
                 {
                     "fill": "#F4F4F6",
                     "stroke": "#6E6E78",
                     "stroke-width": "1",
                     "r": "0"
                 }
             },
             "style":
             {
                 "color": "#4D5663",
                 "fontSize": "12px",
                 "fontFamily": "'Arial'",
                 "fontWeight": "normal",
                 "padding": "10px"
             }
         }
         
        Type Parameters:
        K - Type for the key, usually String
        V - Type for the value, usually String. For nested maps, use Object or any other type.
        Parameters:
        activeDataLabelStyle - the style object
      • getAnimation

        public Animation getAnimation()
        Returns the overall animation for all drilldown updating.

        Default: an instance of Animation

      • isAnimation

        public boolean isAnimation()
        Returns whether enable the animation

        Default: true

      • setAnimation

        public void setAnimation​(boolean animation)
        Sets the animation for all drilldown animations. Animation of a drilldown occurs when drilling between a column point and a column series, or a pie slice and a full pie series. Drilldown can still be used between series and points of different types, but animation will not occur.

        The animation can either be set as a boolean or a configuration object. See setAnimation(Animation). If true, it will use the 'swing' jQuery easing and a duration of 500 ms. If used as an Animation object, the following properties are supported:

        duration
        The duration of the animation in milliseconds.
        easing
        When using jQuery as the general framework, the easing can be set to linear or swing. More easing functions are available with the use of jQuery plug-ins, most notably the jQuery UI suite. See the jQuery docs. When using MooTools as the general framework, use the property name transition instead of easing.

        See Also:
        setAnimation(Animation), Animation
      • setAnimation

        public void setAnimation​(Animation animation)
        Sets the animation for all drilldown animations. Animation of a drilldown occurs when drilling between a column point and a column series, or a pie slice and a full pie series. Drilldown can still be used between series and points of different types, but animation will not occur.

        Properties are supported:

        duration
        The duration of the animation in milliseconds.
        easing
        When using jQuery as the general framework, the easing can be set to linear or swing. More easing functions are available with the use of jQuery plug-ins, most notably the jQuery UI suite. See the jQuery docs. When using MooTools as the general framework, use the property name transition instead of easing.

        See Also:
        setAnimation(boolean), Animation
      • getBreadcrumbs

        public Breadcrumbs getBreadcrumbs()
        Returns options for the breadcrumbs, the navigation at the top leading the way up through the drilldown levels. If null, create a new one.
        Since:
        10.2.1.0
      • setBreadcrumbs

        public void setBreadcrumbs​(Breadcrumbs breadcrumbs)
        Sets options for the breadcrumbs, the navigation at the top leading the way up through the drilldown levels.
        Since:
        10.2.1.0
      • getSeries

        public List<Series> getSeries()
        Returns an array of series configurations for the drill down. Each series configuration uses the same syntax as Series. These drilldown series are hidden by default. The drilldown series is linked to the parent series' point by its Series.setId(String).
      • setSeries

        public void setSeries​(List<Series> series)
        Sets an array of series configurations for the drill down. Each series configuration uses the same syntax as Series. These drilldown series are hidden by default. The drilldown series is linked to the parent series' point by its Series.setId(String).
      • setSeries

        public void setSeries​(Series... series)
        Sets an array of series configurations for the drill down. Each series configuration uses the same syntax as Series. These drilldown series are hidden by default. The drilldown series is linked to the parent series' point by its Series.setId(String).
        See Also:
        setSeries(List)