Class ExportingMenuItemDefinition

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

public class ExportingMenuItemDefinition extends AbstractConfigurationObject
Since:
6.0.1
See Also:
  • Constructor Details

    • ExportingMenuItemDefinition

      public ExportingMenuItemDefinition()
  • Method Details

    • getOnclick

      public String getOnclick()
    • setOnonclick

      public void setOnonclick(String _fn_onclick)
      Sets the JavaScript function of the onclick 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 setOnclickFunction(ChartFunction), which works without compiling JavaScript in the browser.

      Parameters:
      _fn_onclick - the source code of the JavaScript function
    • getOnclickFunction

      public ChartFunction getOnclickFunction()
      See Also:
    • setOnclickFunction

      public void setOnclickFunction(ChartFunction onclick)
      Sets the function of the onclick 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 setOnonclick(String).

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

      Parameters:
      onclick - the function, or null to remove it
      Since:
      25.4
    • getText

      public String getText()
    • setText

      public void setText(String text)
    • getTextKey

      public String getTextKey()
    • setTextKey

      public void setTextKey(String textKey)