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 String
getDateFormat()
Returns the date format to use for points on datetime axes when describing them to screen reader users.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.String
getDescriptionFormat()
Returns the format to use for describing the data series group to assistiveorg.zkoss.json.JavaScriptValue
getDescriptionFormatter()
Returns the formatter function to use instead of the default for point descriptions.Number
getValueDecimals()
Returns decimals to use for the values in the point descriptions.String
getValueDescriptionFormat()
Returns the format to use for describing the values of data points to assistive technology - including screen readers.String
getValuePrefix()
Returns the prefix to add to the values in the point descriptions.String
getValueSuffix()
Returns the suffix to add to the values in the point descriptions.boolean
isDescribeNull()
Returns whether or not to describe points with the value null to assistive technology, such as screen readers.void
setDateFormat(String dateFormat)
Sets the date format to use for points on datetime axes when describing them to screen reader users.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.void
setDescribeNull(boolean describeNull)
Sets whether or not to describe points with the value null to assistive technology, such as screen readers.void
setDescriptionFormat(String descriptionFormat)
Sets the format to use for describing the data series group to assistivevoid
setDescriptionFormatter(org.zkoss.json.JavaScriptValue descriptionFormatter)
Sets the formatter function to use instead of the default for point descriptions.void
setValueDecimals(Number valueDecimals)
Sets decimals to use for the values in the point descriptions.void
setValueDescriptionFormat(String valueDescriptionFormat)
Sets the format to use for describing the values of data points to assistive technology - including screen readers.void
setValuePrefix(String valuePrefix)
Sets the prefix to add to the values in the point descriptions.void
setValueSuffix(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.valueDescriptionFormat
instead 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.valueDecimals
if 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.description
is added by default if relevant. To override this, use theaccessibility.point.descriptionFormatter
option.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.description
is added by default if relevant. To override this, use theaccessibility.point.descriptionFormatter
option.
-
getValuePrefix
public String getValuePrefix()
Returns the prefix to add to the values in the point descriptions. Usestooltip.valuePrefix
if not defined.Default:
null
-
setValuePrefix
public void setValuePrefix(String valuePrefix)
Sets the prefix to add to the values in the point descriptions. Usestooltip.valuePrefix
if not defined.Default:
null
-
getValueSuffix
public String getValueSuffix()
Returns the suffix to add to the values in the point descriptions. Usestooltip.valueSuffix
if not defined.Default:
null
-
setValueSuffix
public void setValueSuffix(String valueSuffix)
Sets the suffix to add to the values in the point descriptions. Usestooltip.valueSuffix
if not defined.Default:
null
-
-