Class LangAccessibility
- java.lang.Object
-
- org.zkoss.chart.Optionable
-
- org.zkoss.chart.LangAccessibility
-
- All Implemented Interfaces:
Serializable,OptionDataListener,org.zkoss.json.JSONAware
public class LangAccessibility extends Optionable
Configure the accessibility strings in the chart.Requires the accessibility module to be loaded. For example,
Library.setProperty("org.zkoss.chart.modules.accessibility", "true");For more dynamic control over the accessibility functionality, see
AccessibilityPoint.getDescriptionFormatter(),AccessibilitySeries.getDescriptionFormatter(), andScreenReaderSection.getBeforeChartFormatter().- 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 LangAccessibility()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LangAnnounceNewDatagetAnnounceNewData()Returns default announcement for new data in charts.LangAxisgetAxis()Returns axis description format strings.StringgetChartContainerLabel()Default:"{title}. Highcharts interactive chart."LangChartTypesgetChartTypes()Returns Chart type description strings.StringgetCredits()Default:"Chart credits: {creditsStr}"StringgetDefaultChartTitle()Default:"Chart"StringgetDrillUpButton()Default:"{buttonText}"LangExportinggetExporting()Returns exporting menu format strings for accessibility module.StringgetGraphicContainerLabel()Returns a label on the container wrapping the SVG.LangLegendgetLegend()Returns language options for accessibility of the legend.LangRangeSelectorgetRangeSelector()Returns range selector language options for accessibility.LangScreenReaderSectiongetScreenReaderSection()Returns language options for the screen reader information sections added before and after the charts.LangSeriesgetSeries()Returns lang configuration for different series types.LangSeriesTypeDescriptionsgetSeriesTypeDescriptions()Returns the descriptions of lesser known series types.LangSonificationgetSonification()Returns language options for sonification.StringgetSvgContainerLabel()Default:"Interactive chart"StringgetSvgContainerTitle()Returns the title element text for the chart SVG element.LangTablegetTable()Returns accessibility language options for the data table.StringgetThousandsSep()Returns thousands separator to use when formatting numbers for screen readers.LangZoomgetZoom()Returns chart and map zoom accessibility language options.voidsetAnnounceNewData(LangAnnounceNewData announceNewData)Sets default announcement for new data in charts.voidsetAxis(LangAxis axis)Sets axis description format strings.voidsetChartContainerLabel(String chartContainerLabel)voidsetChartTypes(LangChartTypes chartTypes)Sets Chart type description strings.voidsetCredits(String credits)voidsetDefaultChartTitle(String defaultChartTitle)voidsetDrillUpButton(String drillUpButton)voidsetExporting(LangExporting exporting)Sets exporting menu format strings for accessibility module.voidsetGraphicContainerLabel(String graphicContainerLabel)Sets a label on the container wrapping the SVG.voidsetLegend(LangLegend legend)Sets language options for accessibility of the legend.voidsetRangeSelector(LangRangeSelector rangeSelector)Sets range selector language options for accessibility.voidsetScreenReaderSection(LangScreenReaderSection screenReaderSection)Sets language options for the screen reader information sections added before and after the charts.voidsetSeries(LangSeries series)Sets lang configuration for different series types.voidsetSeriesTypeDescriptions(LangSeriesTypeDescriptions seriesTypeDescriptions)Sets descriptions of lesser known series types.voidsetSonification(LangSonification sonification)Sets language options for sonification.voidsetSvgContainerLabel(String svgContainerLabel)voidsetSvgContainerTitle(String svgContainerTitle)Sets the title element text for the chart SVG element.voidsetTable(LangTable table)Sets accessibility language options for the data table.voidsetThousandsSep(String thousandsSep)Sets thousands separator to use when formatting numbers for screen readers.voidsetZoom(LangZoom zoom)Sets chart and map zoom accessibility language options.-
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
-
getAnnounceNewData
public LangAnnounceNewData getAnnounceNewData()
Returns default announcement for new data in charts. If null, create a new one.Default: an instance of
LangAnnounceNewData
-
setAnnounceNewData
public void setAnnounceNewData(LangAnnounceNewData announceNewData)
Sets default announcement for new data in charts.
-
getAxis
public LangAxis getAxis()
Returns axis description format strings. If null, create a new one.
-
setAxis
public void setAxis(LangAxis axis)
Sets axis description format strings.- Parameters:
axis-
-
getChartContainerLabel
public String getChartContainerLabel()
Default:
"{title}. Highcharts interactive chart."
-
setChartContainerLabel
public void setChartContainerLabel(String chartContainerLabel)
-
getChartTypes
public LangChartTypes getChartTypes()
Returns Chart type description strings. This is added to the chart information region. If null, create a new one.
-
setChartTypes
public void setChartTypes(LangChartTypes chartTypes)
Sets Chart type description strings. This is added to the chart information region.If there is only a single series type used in the chart, we use the format string for the series type, or default if missing. There is one format string for cases where there is only a single series in the chart, and one for multiple series of the same type.
-
getCredits
public String getCredits()
Default:
"Chart credits: {creditsStr}"
-
setCredits
public void setCredits(String credits)
-
getDefaultChartTitle
public String getDefaultChartTitle()
Default:
"Chart"
-
setDefaultChartTitle
public void setDefaultChartTitle(String defaultChartTitle)
-
getDrillUpButton
public String getDrillUpButton()
Default:
"{buttonText}"
-
setDrillUpButton
public void setDrillUpButton(String drillUpButton)
-
getExporting
public LangExporting getExporting()
Returns exporting menu format strings for accessibility module. If null, create a new one.
-
setExporting
public void setExporting(LangExporting exporting)
Sets exporting menu format strings for accessibility module.
-
getGraphicContainerLabel
public String getGraphicContainerLabel()
Returns a label on the container wrapping the SVG.Default:
""
-
setGraphicContainerLabel
public void setGraphicContainerLabel(String graphicContainerLabel)
Sets a label on the container wrapping the SVG.
-
getLegend
public LangLegend getLegend()
Returns language options for accessibility of the legend. If null, create a new one.
-
setLegend
public void setLegend(LangLegend legend)
Sets language options for accessibility of the legend.
-
getRangeSelector
public LangRangeSelector getRangeSelector()
Returns range selector language options for accessibility. If null, create a new one.
-
setRangeSelector
public void setRangeSelector(LangRangeSelector rangeSelector)
Sets range selector language options for accessibility.
-
getScreenReaderSection
public LangScreenReaderSection getScreenReaderSection()
Returns language options for the screen reader information sections added before and after the charts. If null, create a new one.
-
setScreenReaderSection
public void setScreenReaderSection(LangScreenReaderSection screenReaderSection)
Sets language options for the screen reader information sections added before and after the charts.
-
getSeries
public LangSeries getSeries()
Returns lang configuration for different series types. If null, create a new one.
-
setSeries
public void setSeries(LangSeries series)
Sets lang configuration for different series types.
-
getSeriesTypeDescriptions
public LangSeriesTypeDescriptions getSeriesTypeDescriptions()
Returns the descriptions of lesser known series types. If null, create a new one.
-
setSeriesTypeDescriptions
public void setSeriesTypeDescriptions(LangSeriesTypeDescriptions seriesTypeDescriptions)
Sets descriptions of lesser known series types.
-
getSonification
public LangSonification getSonification()
Returns language options for sonification. If null, create a new one.
-
setSonification
public void setSonification(LangSonification sonification)
Sets language options for sonification.
-
getSvgContainerLabel
public String getSvgContainerLabel()
Default:
"Interactive chart"
-
setSvgContainerLabel
public void setSvgContainerLabel(String svgContainerLabel)
-
getSvgContainerTitle
public String getSvgContainerTitle()
Returns the title element text for the chart SVG element. Leave this empty to disable adding the title element. Browsers will display this content when hovering over elements in the chart. Assistive technology may use this element to label the chart.Default:
""
-
setSvgContainerTitle
public void setSvgContainerTitle(String svgContainerTitle)
Sets the title element text for the chart SVG element. Leave this empty to disable adding the title element. Browsers will display this content when hovering over elements in the chart. Assistive technology may use this element to label the chart.
-
getTable
public LangTable getTable()
Returns accessibility language options for the data table. If null, create a new one.
-
setTable
public void setTable(LangTable table)
Sets accessibility language options for the data table.
-
getThousandsSep
public String getThousandsSep()
Returns thousands separator to use when formatting numbers for screen readers.Note that many screen readers will not handle space as a thousands separator, and will consider "11 700" as two numbers.
Default:
""
-
setThousandsSep
public void setThousandsSep(String thousandsSep)
Sets thousands separator to use when formatting numbers for screen readers.Note that many screen readers will not handle space as a thousands separator, and will consider "11 700" as two numbers.
Sets to null to use the separator defined in
Lang.getThousandsSep().
-
getZoom
public LangZoom getZoom()
Returns chart and map zoom accessibility language options. If null, create a new one.
-
setZoom
public void setZoom(LangZoom zoom)
Sets chart and map zoom accessibility language options.
-
-