Class Annotations

java.lang.Object
org.apache.juneau.console.freemarker.Annotations
All Implemented Interfaces:
Decorator

public final class Annotations extends Object implements Decorator
The built-in annotations decorator: ECharts markPoint presets (max, min, average) on every series, or explicit points on a carrier series juneau-annotations-<n>.
Example:

Annotations.max().withMin().label("{name}");

Since:
10.0.0
  • Method Details

    • max

      public static Annotations max()
      Returns:
      A new decorator marking each series' maximum.
    • min

      public static Annotations min()
      Returns:
      A new decorator marking each series' minimum.
    • average

      public static Annotations average()
      Returns:
      A new decorator marking each series' average.
    • points

      public static Annotations points(List<? extends Map<String,?>> rows)
      Parameters:
      rows - Explicit points {x, y, label}. @return A new decorator.
    • withMax

      public Annotations withMax()
      Returns:
      This object, also marking the maximum.
    • withMin

      public Annotations withMin()
      Returns:
      This object, also marking the minimum.
    • withAverage

      Returns:
      This object, also marking the average.
    • label

      public Annotations label(String v)
      Parameters:
      v - A label template (template fn tokens). @return This object.
    • toJson

      public JsonMap toJson()
      Specified by:
      toJson in interface Decorator
      Returns:
      A new map {"use": name, ...args}; a string topic key is published on click, and ChartDef.decorate(Decorator) adds it to the card's publishes.