Class PointGrouping
- java.lang.Object
-
- org.zkoss.chart.Optionable
-
- org.zkoss.chart.PointGrouping
-
- All Implemented Interfaces:
Serializable,OptionDataListener,org.zkoss.json.JSONAware
public class PointGrouping extends Optionable
Options for grouping data points together when sonifying. This allows for the visual presentation to contain more points than what is being played. If not enabled, all visible / uncropped points are played.- Since:
- 11.2.0.0
- Author:
- Jamson Chan
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.zkoss.chart.Optionable
NOT_NULL_VALUE, options
-
-
Constructor Summary
Constructors Constructor Description PointGrouping()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAlgorithm()Returns The grouping algorithm, deciding which points to keep when grouping a set of points together.NumbergetGroupTimespan()Returns the size of each group in milliseconds.StringgetProp()Returns the data property for each point to compare when deciding which points to keep in the group.booleanisEnabled()Returns whether or not to group pointsvoidsetAlgorithm(String algorithm)Sets The grouping algorithm, deciding which points to keep when grouping a set of points together.voidsetEnabled(Boolean enabled)Sets whether or not to group pointsvoidsetGroupTimespan(Number groupTimespan)Sets the size of each group in milliseconds.voidsetProp(String prop)Sets the data property for each point to compare when deciding which points to keep in the group.-
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
-
getAlgorithm
public String getAlgorithm()
Returns The grouping algorithm, deciding which points to keep when grouping a set of points together. By default "minmax" is used, which keeps both the minimum and maximum points.The other algorithms will either keep the first point in the group (time wise), last point, middle point, or both the first and the last point.
The timing of the resulting point(s) is then adjusted to play evenly, regardless of its original position within the group.
Default:
"minmax"
-
setAlgorithm
public void setAlgorithm(String algorithm)
Sets The grouping algorithm, deciding which points to keep when grouping a set of points together. By default "minmax" is used, which keeps both the minimum and maximum points.The other algorithms will either keep the first point in the group (time wise), last point, middle point, or both the first and the last point.
The timing of the resulting point(s) is then adjusted to play evenly, regardless of its original position within the group.
-
isEnabled
public boolean isEnabled()
Returns whether or not to group pointsDefault:
true
-
setEnabled
public void setEnabled(Boolean enabled)
Sets whether or not to group points
-
getGroupTimespan
public Number getGroupTimespan()
Returns the size of each group in milliseconds. Audio events closer than this are grouped together.Default:
15
-
setGroupTimespan
public void setGroupTimespan(Number groupTimespan)
Sets the size of each group in milliseconds. Audio events closer than this are grouped together.
-
getProp
public String getProp()
Returns the data property for each point to compare when deciding which points to keep in the group.By default it is "y", which means that if the "minmax" algorithm is used, the two points the group with the lowest and highest y value will be kept, and the others not played.
Default:
"y"
-
setProp
public void setProp(String prop)
Sets the data property for each point to compare when deciding which points to keep in the group.By default it is "y", which means that if the "minmax" algorithm is used, the two points the group with the lowest and highest y value will be kept, and the others not played.
-
-