Class Accessibility

java.lang.Object
com.vaadin.flow.component.charts.model.AbstractConfigurationObject
com.vaadin.flow.component.charts.model.Accessibility
All Implemented Interfaces:
Serializable

public class Accessibility extends AbstractConfigurationObject

Options for configuring accessibility for the chart. Requires the accessibility module to be loaded. For a description of the module and information on its features, see Highcharts Accessibility.

Since:
6.0.1
See Also:
  • Constructor Details

    • Accessibility

      public Accessibility()
    • Accessibility

      public Accessibility(Boolean enabled)
  • Method Details

    • getDescribeSingleSeries

      public Boolean getDescribeSingleSeries()
      See Also:
    • setDescribeSingleSeries

      public void setDescribeSingleSeries(Boolean describeSingleSeries)
      Whether or not to add series descriptions to charts with a single series.

      Defaults to: false

    • getEnabled

      public Boolean getEnabled()
      See Also:
    • setEnabled

      public void setEnabled(Boolean enabled)
      Enable accessibility features for the chart.

      Defaults to: true

    • getKeyboardNavigation

      public KeyboardNavigation getKeyboardNavigation()
      See Also:
    • setKeyboardNavigation

      public void setKeyboardNavigation(KeyboardNavigation keyboardNavigation)
      Options for keyboard navigation.
    • getOnTableAnchorClick

      public String getOnTableAnchorClick()
    • setOnTableAnchorClick

      public void setOnTableAnchorClick(String _fn_onTableAnchorClick)
      Sets the JavaScript function of the onTableAnchorClick option, as the source code of the function.

      The browser compiles the function from this string, which a Content Security Policy without unsafe-eval blocks: in the strict CSP mode, sending a chart configuration that has a function throws a ContentSecurityPolicyViolationException.

      Setting a function this way clears a function set with setOnTableAnchorClickFunction(ChartFunction), which works without compiling JavaScript in the browser.

      Parameters:
      _fn_onTableAnchorClick - the source code of the JavaScript function
    • getOnTableAnchorClickFunction

      public ChartFunction getOnTableAnchorClickFunction()
      See Also:
    • setOnTableAnchorClickFunction

      public void setOnTableAnchorClickFunction(ChartFunction onTableAnchorClick)
      Sets the function of the onTableAnchorClick option, declared in a JsDefinition interface. The browser runs the function from the frontend bundle, so it works under a Content Security Policy without unsafe-eval.

      Setting a function this way clears a function set with setOnTableAnchorClick(String).

      A chart exported to SVG with SVGGenerator does not have the function. Neither does a chart state saved or restored with ChartAiController.

      Parameters:
      onTableAnchorClick - the function, or null to remove it
      Since:
      25.4
    • getPointDateFormat

      public String getPointDateFormat()
      See Also:
    • setPointDateFormat

      public void setPointDateFormat(String pointDateFormat)

      Date format to use for points on datetime axes when describing them to screen reader users.

      Defaults to the same format as in tooltip.

      For an overview of the replacement codes, see dateFormat.

    • getPointDateFormatter

      public String getPointDateFormatter()
    • setPointDateFormatter

      public void setPointDateFormatter(String _fn_pointDateFormatter)
      Sets the JavaScript function of the pointDateFormatter option, as the source code of the function.

      The browser compiles the function from this string, which a Content Security Policy without unsafe-eval blocks: in the strict CSP mode, sending a chart configuration that has a function throws a ContentSecurityPolicyViolationException. Where a format string is enough, use setPointDateFormat(String), which needs no JavaScript.

      Setting a function this way clears a function set with setPointDateFormatterFunction(ChartFunction), which works without compiling JavaScript in the browser.

      Parameters:
      _fn_pointDateFormatter - the source code of the JavaScript function
    • getPointDateFormatterFunction

      public ChartFunction getPointDateFormatterFunction()
      See Also:
    • setPointDateFormatterFunction

      public void setPointDateFormatterFunction(ChartFunction pointDateFormatter)
      Sets the function of the pointDateFormatter option, declared in a JsDefinition interface. The browser runs the function from the frontend bundle, so it works under a Content Security Policy without unsafe-eval.

      Setting a function this way clears a function set with setPointDateFormatter(String).

      A chart exported to SVG with SVGGenerator does not have the function. Neither does a chart state saved or restored with ChartAiController.

      Parameters:
      pointDateFormatter - the function, or null to remove it
      Since:
      25.4
    • getPointDescriptionFormatter

      public String getPointDescriptionFormatter()
    • setPointDescriptionFormatter

      public void setPointDescriptionFormatter(String _fn_pointDescriptionFormatter)
      Sets the JavaScript function of the pointDescriptionFormatter option, as the source code of the function.

      The browser compiles the function from this string, which a Content Security Policy without unsafe-eval blocks: in the strict CSP mode, sending a chart configuration that has a function throws a ContentSecurityPolicyViolationException.

      Setting a function this way clears a function set with setPointDescriptionFormatterFunction(ChartFunction), which works without compiling JavaScript in the browser.

      Parameters:
      _fn_pointDescriptionFormatter - the source code of the JavaScript function
    • getPointDescriptionFormatterFunction

      public ChartFunction getPointDescriptionFormatterFunction()
      See Also:
    • setPointDescriptionFormatterFunction

      public void setPointDescriptionFormatterFunction(ChartFunction pointDescriptionFormatter)
      Sets the function of the pointDescriptionFormatter option, declared in a JsDefinition interface. The browser runs the function from the frontend bundle, so it works under a Content Security Policy without unsafe-eval.

      Setting a function this way clears a function set with setPointDescriptionFormatter(String).

      A chart exported to SVG with SVGGenerator does not have the function. Neither does a chart state saved or restored with ChartAiController.

      Parameters:
      pointDescriptionFormatter - the function, or null to remove it
      Since:
      25.4
    • getScreenReaderSectionFormatter

      public String getScreenReaderSectionFormatter()
    • setScreenReaderSectionFormatter

      public void setScreenReaderSectionFormatter(String _fn_screenReaderSectionFormatter)
      Sets the JavaScript function of the screenReaderSectionFormatter option, as the source code of the function.

      The browser compiles the function from this string, which a Content Security Policy without unsafe-eval blocks: in the strict CSP mode, sending a chart configuration that has a function throws a ContentSecurityPolicyViolationException.

      Setting a function this way clears a function set with setScreenReaderSectionFormatterFunction(ChartFunction), which works without compiling JavaScript in the browser.

      Parameters:
      _fn_screenReaderSectionFormatter - the source code of the JavaScript function
    • getScreenReaderSectionFormatterFunction

      public ChartFunction getScreenReaderSectionFormatterFunction()
      See Also:
    • setScreenReaderSectionFormatterFunction

      public void setScreenReaderSectionFormatterFunction(ChartFunction screenReaderSectionFormatter)
      Sets the function of the screenReaderSectionFormatter option, declared in a JsDefinition interface. The browser runs the function from the frontend bundle, so it works under a Content Security Policy without unsafe-eval.

      Setting a function this way clears a function set with setScreenReaderSectionFormatter(String).

      A chart exported to SVG with SVGGenerator does not have the function. Neither does a chart state saved or restored with ChartAiController.

      Parameters:
      screenReaderSectionFormatter - the function, or null to remove it
      Since:
      25.4
    • getSeriesDescriptionFormatter

      public String getSeriesDescriptionFormatter()
    • setSeriesDescriptionFormatter

      public void setSeriesDescriptionFormatter(String _fn_seriesDescriptionFormatter)
      Sets the JavaScript function of the seriesDescriptionFormatter option, as the source code of the function.

      The browser compiles the function from this string, which a Content Security Policy without unsafe-eval blocks: in the strict CSP mode, sending a chart configuration that has a function throws a ContentSecurityPolicyViolationException.

      Setting a function this way clears a function set with setSeriesDescriptionFormatterFunction(ChartFunction), which works without compiling JavaScript in the browser.

      Parameters:
      _fn_seriesDescriptionFormatter - the source code of the JavaScript function
    • getSeriesDescriptionFormatterFunction

      public ChartFunction getSeriesDescriptionFormatterFunction()
      See Also:
    • setSeriesDescriptionFormatterFunction

      public void setSeriesDescriptionFormatterFunction(ChartFunction seriesDescriptionFormatter)
      Sets the function of the seriesDescriptionFormatter option, declared in a JsDefinition interface. The browser runs the function from the frontend bundle, so it works under a Content Security Policy without unsafe-eval.

      Setting a function this way clears a function set with setSeriesDescriptionFormatter(String).

      A chart exported to SVG with SVGGenerator does not have the function. Neither does a chart state saved or restored with ChartAiController.

      Parameters:
      seriesDescriptionFormatter - the function, or null to remove it
      Since:
      25.4