Package org.zkoss.chart
Class Break
- java.lang.Object
-
- org.zkoss.chart.Optionable
-
- org.zkoss.chart.Break
-
- All Implemented Interfaces:
Serializable
,OptionDataListener
,org.zkoss.json.JSONAware
public class Break extends Optionable
Represents a break in the axis. The sections defined will be left out and all the points shifted closer to each other.- Author:
- Christopher
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.zkoss.chart.Optionable
NOT_NULL_VALUE, options
-
-
Constructor Summary
Constructors Constructor Description Break()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Number
getBreakSize()
A number indicating how much space should be left between the start and the end of the break.Number
getFrom()
The point where the break starts.Number
getRepeat()
Defines an interval after which the break appears again.Number
getTo()
The point where the break ends.void
setBreakSize(Number breakSize)
Set the break size.void
setFrom(Number from)
Set the starting value of this breakvoid
setRepeat(Number Repeat)
Set the repeat value for this break.void
setTo(Number to)
Set the ending value of this break-
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
-
getBreakSize
public Number getBreakSize()
A number indicating how much space should be left between the start and the end of the break. The break size is given in axis units, so for instance on a datetime axis, a break size of 3600000 would indicate the equivalent of an hour. Defaults to 0.- Returns:
- the break value
-
setBreakSize
public void setBreakSize(Number breakSize)
Set the break size.- Parameters:
breakSize
-- See Also:
getBreakSize()
-
getFrom
public Number getFrom()
The point where the break starts.- Returns:
- the starting value of this break
-
setFrom
public void setFrom(Number from)
Set the starting value of this break- Parameters:
from
-
-
getRepeat
public Number getRepeat()
Defines an interval after which the break appears again. By default the breaks do not repeat.If repeat value is greater than 0, the next break will appear at
from
+ repeat, and so on.For example: a break with from = 5, to = 10, and repeat = 10. The next break will appear at from = 15 and to = 20, and so on so forth.
Defaults to 0.
- Returns:
- the repeat value
-
setRepeat
public void setRepeat(Number Repeat)
Set the repeat value for this break.- Parameters:
Repeat
-
-
getTo
public Number getTo()
The point where the break ends.- Returns:
- the ending value of this break
-
setTo
public void setTo(Number to)
Set the ending value of this break- Parameters:
to
-
-
-