java.lang.Object
org.apache.juneau.console.freemarker.Fn

public final class Fn extends Object
Builds $fn markers: JSON values the chart glue replaces with a function from JuneauCharts.fn. Nothing is evaluated from a string; the marker is a name plus JSON arguments.
Example:

ChartDef.line("t").src("/s").x("d").series("v", "V") .patch(JsonMap.of("tooltip", JsonMap.of("valueFormatter", Fn.ref("compact"))));

Since:
10.0.0
  • Method Details

    • ref

      public static JsonMap ref(String name)
      Parameters:
      name - A built-in (bare) or app (dotted) fn name. @return The marker {"$fn": name}.
    • ref

      public static JsonMap ref(String name, JsonMap args)
      Parameters:
      name - A built-in (bare) or app (dotted) fn name.
      args - The factory arguments, or null.
      Returns:
      The marker {"$fn": name, "args": args}.
      Throws:
      IllegalArgumentException - E-74 if the name is not a valid extension name.