Class Drilldown
- java.lang.Object
-
- org.zkoss.chart.Optionable
-
- org.zkoss.chart.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
-
-
Field Summary
-
Fields inherited from class org.zkoss.chart.Optionable
NOT_NULL_VALUE, options
-
-
Constructor Summary
Constructors Constructor Description Drilldown()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <K,V>
Map<K,V>getActiveAxisLabelStyle()
Returns additional styles to apply to the X axis label for a point that has drilldown data.<K,V>
Map<K,V>getActiveDataLabelStyle()
Returns additional styles to apply to the data label of a point that has drilldown data.Animation
getAnimation()
Returns the overall animation for all drilldown updating.Breadcrumbs
getBreadcrumbs()
Returns options for the breadcrumbs, the navigation at the top leading the way up through the drilldown levels.DrillUpButton
getDrillUpButton()
Returns options for the drill up button that appears when drilling down on a series.List<Series>
getSeries()
Returns an array of series configurations for the drill down.boolean
isAnimation()
Returns whether enable the animationvoid
setActiveAxisLabelStyle(String activeAxisLabelStyle)
Sets additional styles to apply to the X axis label for a point that has drilldown data.<K,V>
voidsetActiveAxisLabelStyle(Map<K,V> labelStyle)
Sets additional styles to apply to the X axis label for a point that has drilldown data.void
setActiveDataLabelStyle(String activeDataLabelStyle)
Sets additional styles to apply to the data label of a point that has drilldown data.<K,V>
voidsetActiveDataLabelStyle(Map<K,V> activeDataLabelStyle)
Sets additional styles to apply to the data label of a point that has drilldown data.void
setAnimation(boolean animation)
Sets the animation for all drilldown animations.void
setAnimation(Animation animation)
Sets the animation for all drilldown animations.void
setBreadcrumbs(Breadcrumbs breadcrumbs)
Sets options for the breadcrumbs, the navigation at the top leading the way up through the drilldown levels.void
setDrillUpButton(DrillUpButton drillUpButton)
Sets options for the drill up button that appears when drilling down on a series.void
setSeries(List<Series> series)
Sets an array of series configurations for the drill down.void
setSeries(Series... series)
Sets an array of series configurations for the drill down.-
Methods inherited from class org.zkoss.chart.Optionable
addExtraAttr, addOptionDataListener, clearOptonDataListener, clone, containsKey, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, getAttr, getAttr, getClientState, getExtraAttr, merge, onChange, removeExtraAttr, removeKey, removeOptionDataListener, setAttr, setAttr, setAttr, setAttr, toJSONString, toString
-
-
-
-
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 keyif style was set using
setActiveAxisLabelStyle(String)
, type will be Stringif style was set using
setActiveAxisLabelStyle(Map)
, type will be the same as the type from the key of the mapif style was not set, default style will be applied, and type will be String
V
- type for the valueif style was set using
setActiveAxisLabelStyle(String)
, type will be Stringif style was set using
setActiveAxisLabelStyle(Map)
, type will be the same as the type from the key of the mapif 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);
{ "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 StringV
- 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 keyif style was set using
setActiveDataLabelStyle(String)
, type will be Stringif style was set using
setActiveDataLabelStyle(Map)
, type will be the same as the type from the key of the mapif style was not set, default style will be applied, and type will be String
V
- type for the valueif style was set using
setActiveDataLabelStyle(String)
, type will be Stringif style was set using
setActiveDataLabelStyle(Map)
, type will be the same as the type from the key of the mapif 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);
{ "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 StringV
- 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 animationDefault: 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)
. Iftrue
, 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
orswing
. 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 nametransition
instead ofeasing
.
- 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
orswing
. 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 nametransition
instead ofeasing
.
- 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
-
getDrillUpButton
public DrillUpButton getDrillUpButton()
Returns options for the drill up button that appears when drilling down on a series. The text for the button is defined inLang.getDrillUpText()
.- See Also:
DrillUpButton
-
setDrillUpButton
public void setDrillUpButton(DrillUpButton drillUpButton)
Sets options for the drill up button that appears when drilling down on a series. The text for the button is defined inLang.setDrillUpText(String)
.- See Also:
DrillUpButton
-
getSeries
public List<Series> getSeries()
Returns an array of series configurations for the drill down. Each series configuration uses the same syntax asSeries
. These drilldown series are hidden by default. The drilldown series is linked to the parent series' point by itsSeries.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 asSeries
. These drilldown series are hidden by default. The drilldown series is linked to the parent series' point by itsSeries.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 asSeries
. These drilldown series are hidden by default. The drilldown series is linked to the parent series' point by itsSeries.setId(String)
.- See Also:
setSeries(List)
-
-