Adding accessibility text for charts

To add accessibility text for charts, add the following code snippet in the JS listener for the workspace that contain the chart widgets:

CWEH.registerHandler('<Chart Widget Id>', CFEC.WIDGET_RENDERED, function() { FusionCharts.Accessibility.setAlternateTexts( { '<Chart ID>': { 'chart': 'This is a {chartType} chart with static colors', 'plot': 'On date {label}, the revenue is {value}.' } }); } //CWEH = Canvas Widget Event Handler //CFEC = Canvas Form Event Constant //Chart Widget Id / Widget ID = Chart app ID //Chart ID = <VIEW_ID>_<WIDGET_ID>_CHART

The default accessibility texts for the single-series and multi-series charts, and gauges is shown in the following code snippet:

//Single-series charts { 'chart': 'This is a {chartType} chart showing {xAxisName} and {yAxisName}. ', 'plot': '{label} value is {value}. Plot {plotIndex} of {totalPlots}.' } //Multi-series charts { 'chart': 'This is a {chartType} chart. {xAxisName} is plotted on x axis and {yAxisName} is plotted on y axis.', 'plot': '{seriesName} for the {label} is {value}. Plot {plotIndex} of {totalPlots}. Series {seriesIndex} of {totalSeries}.' } //Gauges { 'chart': 'This is a {chartType} chart showing {xAxisName} and {yAxisName}', 'plot': '{label} value is {value}. Plot {plotIndex} of {totalPlots}.' }

Â