Class AccessibilitySeries
- java.lang.Object
-
- org.zkoss.chart.Optionable
-
- org.zkoss.chart.AccessibilitySeries
-
- All Implemented Interfaces:
Serializable
,OptionDataListener
,org.zkoss.json.JSONAware
public class AccessibilitySeries extends Optionable
Accessibility options global to all data series. Individual series can also have specific accessibility options set.- Since:
- 10.2.1.0
- Author:
- jumperchen
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.zkoss.chart.Optionable
NOT_NULL_VALUE, options
-
-
Constructor Summary
Constructors Constructor Description AccessibilitySeries()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDescriptionFormat()
Returns the format to use for describing the data series group to assistive technology - including screen readers.org.zkoss.json.JavaScriptValue
getDescriptionFormatter()
Returns the formatter function to use instead of the default for series descriptions.Number
getPointDescriptionEnabledThreshold()
When a series contains more points than this, we no longer expose information about individual points to screen readers.boolean
isDescribeSingleSeries()
Returns whether or not to add series descriptions to charts with a single series.boolean
isPointDescriptionEnabledThreshold()
Returns whether to expose information about individual points to screen readers.void
setDescribeSingleSeries(boolean describeSingleSeries)
Sets whether or not to add series descriptions to charts with a single series.void
setDescriptionFormat(String descriptionFormat)
Sets the format to use for describing the data series group to assistive technology - including screen readers.void
setDescriptionFormatter(org.zkoss.json.JavaScriptValue descriptionFormatter)
Sets the formatter function to use instead of the default for series descriptions.void
setPointDescriptionEnabledThreshold(boolean pointDescriptionEnabledThreshold)
When a series contains more points than this, we no longer expose information about individual points to screen readers.void
setPointDescriptionEnabledThreshold(Number pointDescriptionEnabledThreshold)
When a series contains more points than this, we no longer expose information about individual points to screen readers.-
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
-
isDescribeSingleSeries
public boolean isDescribeSingleSeries()
Returns whether or not to add series descriptions to charts with a single series.Default:
false
-
setDescribeSingleSeries
public void setDescribeSingleSeries(boolean describeSingleSeries)
Sets whether or not to add series descriptions to charts with a single series.
-
getDescriptionFormat
public String getDescriptionFormat()
Returns the format to use for describing the data series group to assistive technology - including screen readers.Default:
"{seriesDescription}{authorDescription}{axisDescription}"
-
setDescriptionFormat
public void setDescriptionFormat(String descriptionFormat)
Sets the format to use for describing the data series group to assistive technology - including screen readers.The series context and its subproperties are available under the variable
{series}
, for example{series.name}
for the series name, and{series.points.length}
for the number of data points.The chart context and its subproperties are available under the variable
{chart}
, for example{chart.series.length}
for the number of series in the chart.{seriesDescription}
refers to the automatic description of the series type and number of points added by Highcharts by default.{authorDescription}
refers to the description added inseries.description
if one is present.{axisDescription}
refers to the description added if the chart has multiple X or Y axes.Note that if
series.descriptionFormatter
is declared it will take precedence, and this option will be overridden.Default:
"{seriesDescription}{authorDescription}{axisDescription}"
-
getDescriptionFormatter
public org.zkoss.json.JavaScriptValue getDescriptionFormatter()
Returns the formatter function to use instead of the default for series descriptions.Default:
null
-
setDescriptionFormatter
public void setDescriptionFormatter(org.zkoss.json.JavaScriptValue descriptionFormatter)
Sets the formatter function to use instead of the default for series descriptions. Receives one argument,series
, referring to the series to describe. Should return a string with the description of the series for a screen reader user. If false is returned, the default formatter will be used for that series.
-
isPointDescriptionEnabledThreshold
public boolean isPointDescriptionEnabledThreshold()
Returns whether to expose information about individual points to screen readers.Sets to false to disable.
Default:
true
-
setPointDescriptionEnabledThreshold
public void setPointDescriptionEnabledThreshold(boolean pointDescriptionEnabledThreshold)
When a series contains more points than this, we no longer expose information about individual points to screen readers.Sets to false to disable.
Default:
true
-
getPointDescriptionEnabledThreshold
public Number getPointDescriptionEnabledThreshold()
When a series contains more points than this, we no longer expose information about individual points to screen readers.Default:
200
-
setPointDescriptionEnabledThreshold
public void setPointDescriptionEnabledThreshold(Number pointDescriptionEnabledThreshold)
When a series contains more points than this, we no longer expose information about individual points to screen readers.Default:
200
-
-