Class AccessibilityPoint
- java.lang.Object
-
- org.zkoss.chart.Optionable
-
- org.zkoss.chart.AccessibilityPoint
-
- All Implemented Interfaces:
Serializable,OptionDataListener,org.zkoss.json.JSONAware
public class AccessibilityPoint extends Optionable
Options for descriptions of individual data points.- 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 AccessibilityPoint()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDateFormat()Returns the date format to use for points on datetime axes when describing them to screen reader users.org.zkoss.json.JavaScriptValuegetDateFormatter()Returns the formatter function to determine the date/time format used with points on datetime axes when describing them to screen reader users.StringgetDescriptionFormat()Returns the format to use for describing the data series group to assistiveorg.zkoss.json.JavaScriptValuegetDescriptionFormatter()Returns the formatter function to use instead of the default for point descriptions.NumbergetValueDecimals()Returns decimals to use for the values in the point descriptions.StringgetValueDescriptionFormat()Returns the format to use for describing the values of data points to assistive technology - including screen readers.StringgetValuePrefix()Returns the prefix to add to the values in the point descriptions.StringgetValueSuffix()Returns the suffix to add to the values in the point descriptions.booleanisDescribeNull()Returns whether or not to describe points with the value null to assistive technology, such as screen readers.voidsetDateFormat(String dateFormat)Sets the date format to use for points on datetime axes when describing them to screen reader users.voidsetDateFormatter(org.zkoss.json.JavaScriptValue dateFormatter)Sets the formatter function to determine the date/time format used with points on datetime axes when describing them to screen reader users.voidsetDescribeNull(boolean describeNull)Sets whether or not to describe points with the value null to assistive technology, such as screen readers.voidsetDescriptionFormat(String descriptionFormat)Sets the format to use for describing the data series group to assistivevoidsetDescriptionFormatter(org.zkoss.json.JavaScriptValue descriptionFormatter)Sets the formatter function to use instead of the default for point descriptions.voidsetValueDecimals(Number valueDecimals)Sets decimals to use for the values in the point descriptions.voidsetValueDescriptionFormat(String valueDescriptionFormat)Sets the format to use for describing the values of data points to assistive technology - including screen readers.voidsetValuePrefix(String valuePrefix)Sets the prefix to add to the values in the point descriptions.voidsetValueSuffix(String valueSuffix)Sets the suffix to add to the values in the point descriptions.-
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
-
getDateFormat
public String getDateFormat()
Returns the date format to use for points on datetime axes when describing them to screen reader users.Defaults to the same format as in tooltip.
-
setDateFormat
public void setDateFormat(String dateFormat)
Sets the date format to use for points on datetime axes when describing them to screen reader users.Defaults to the same format as in tooltip.
-
getDateFormatter
public org.zkoss.json.JavaScriptValue getDateFormatter()
Returns the formatter function to determine the date/time format used with points on datetime axes when describing them to screen reader users.Default:
null
-
setDateFormatter
public void setDateFormatter(org.zkoss.json.JavaScriptValue dateFormatter)
Sets the formatter function to determine the date/time format used with points on datetime axes when describing them to screen reader users.Receives one argument,
point, referring to the point to describe. Should return a date format string compatible withsetDateFormat(String).
-
isDescribeNull
public boolean isDescribeNull()
Returns whether or not to describe points with the value null to assistive technology, such as screen readers.Default:
true
-
setDescribeNull
public void setDescribeNull(boolean describeNull)
Sets whether or not to describe points with the value null to assistive technology, such as screen readers.
-
getDescriptionFormatter
public org.zkoss.json.JavaScriptValue getDescriptionFormatter()
Returns the formatter function to use instead of the default for point descriptions.
-
setDescriptionFormatter
public void setDescriptionFormatter(org.zkoss.json.JavaScriptValue descriptionFormatter)
Sets the formatter function to use instead of the default for point descriptions.Receives one argument,
point, referring to the point to describe. Should return a string with the description of the point for a screen reader user. If false is returned, the default formatter will be used for that point.Note: Prefer using
accessibility.point.valueDescriptionFormatinstead if possible, as default functionality such as describing annotations will be preserved.Default:
null
-
getDescriptionFormat
public String getDescriptionFormat()
Returns the format to use for describing the data series group to assistiveDefault:
null- Since:
- 11.2.0.0
-
setDescriptionFormat
public void setDescriptionFormat(String descriptionFormat)
Sets the format to use for describing the data series group to assistive- Since:
- 11.2.0.0
-
getValueDecimals
public Number getValueDecimals()
Returns decimals to use for the values in the point descriptions.Default:
null
-
setValueDecimals
public void setValueDecimals(Number valueDecimals)
Sets decimals to use for the values in the point descriptions. Usestooltip.valueDecimalsif not defined.
-
getValueDescriptionFormat
public String getValueDescriptionFormat()
Returns the format to use for describing the values of data points to assistive technology - including screen readers. The point context is available as{point}.Other available context variables include
{index},{value}, and{xDescription}.Additionally, the series name, annotation info, and description added in
point.accessibility.descriptionis added by default if relevant. To override this, use theaccessibility.point.descriptionFormatteroption.Default:
"{xDescription}{separator}{value}".
-
setValueDescriptionFormat
public void setValueDescriptionFormat(String valueDescriptionFormat)
Sets the format to use for describing the values of data points to assistive technology - including screen readers. The point context is available as{point}.Other available context variables include
{index},{value}, and{xDescription}.Additionally, the series name, annotation info, and description added in
point.accessibility.descriptionis added by default if relevant. To override this, use theaccessibility.point.descriptionFormatteroption.
-
getValuePrefix
public String getValuePrefix()
Returns the prefix to add to the values in the point descriptions. Usestooltip.valuePrefixif not defined.Default:
null
-
setValuePrefix
public void setValuePrefix(String valuePrefix)
Sets the prefix to add to the values in the point descriptions. Usestooltip.valuePrefixif not defined.Default:
null
-
getValueSuffix
public String getValueSuffix()
Returns the suffix to add to the values in the point descriptions. Usestooltip.valueSuffixif not defined.Default:
null
-
setValueSuffix
public void setValueSuffix(String valueSuffix)
Sets the suffix to add to the values in the point descriptions. Usestooltip.valueSuffixif not defined.Default:
null
-
-