Class JsFunction

java.lang.Object
io.jmix.pivottable.model.JsFunction
All Implemented Interfaces:
Serializable

public class JsFunction extends Object implements Serializable
JavaScript function definition.
Code example:
  @Autowired
  private SerialChart serialChart;
  ...
  Graph graph = serialChart.getGraphs().get(0);
  graph.setBalloonFunction(new JsFunction(
      "function(event){"
          + "var result = 'Income in ' + event.category + ': '"
          + "+ event.serialDataItem.dataContext.expenses;"
          + "return result;}"));
 
See Also:
  • Constructor Details

    • JsFunction

      public JsFunction(String code)
  • Method Details

    • getCode

      public String getCode()