Package org.zkoss.chart
Class Responsive.Rule
- java.lang.Object
-
- org.zkoss.chart.Optionable
-
- org.zkoss.chart.Responsive.Rule
-
- All Implemented Interfaces:
Serializable
,OptionDataListener
,org.zkoss.json.JSONAware
- Enclosing class:
- Responsive
public static class Responsive.Rule extends Optionable
A rule for responsive settings.- Since:
- 7.2.1.0
- Author:
- rudyhuang
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.zkoss.chart.Optionable
NOT_NULL_VALUE, options
-
-
Constructor Summary
Constructors Constructor Description Rule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PlotData
getChartOptions()
Returns a full set of chart options to apply as overrides to the general chart options, if any.Responsive.Condition
getCondition()
Returns the condition the rule applies.void
setChartOptions(PlotData chartOptions)
Sets a full set of chart options to apply as overrides to the general chart options.void
setCondition(Responsive.Condition condition)
Sets the condition the rule applies.-
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
-
getChartOptions
public PlotData getChartOptions()
Returns a full set of chart options to apply as overrides to the general chart options, if any. Otherwise, create a new one. The chart options are applied when the given rule is active.
-
setChartOptions
public void setChartOptions(PlotData chartOptions)
Sets a full set of chart options to apply as overrides to the general chart options. The chart options are applied when the given rule is active. A special case is configuration objects that take arrays, for example xAxis, yAxis or series. For these collections, an id option is used to map the new option set to an existing object. If an existing object of the same id is not found, the item of the same index updated. So for example, setting chartOptions with two series items without an id, will cause the existing chart's two series to be updated with respective options.
-
getCondition
public Responsive.Condition getCondition()
Returns the condition the rule applies.
-
setCondition
public void setCondition(Responsive.Condition condition)
Sets the condition the rule applies.
-
-