Class BandByOptions<S extends AbstractChartSeries<?,?>>

Object
ObjectIdentity
BacklinkBuilder<S>
BandByOptions<S>

public class BandByOptions<S extends AbstractChartSeries<?,?>> extends BacklinkBuilder<S>
Configures the band-by legend of a series grouped with setBandBy(String): the color of each band and the bands that are selected. Obtain it with ChartSeries.Aggregation.getBandByOptions(), and return to the series with back().

Each method adds or updates legend entries, one entry per band label. Calls that name the same label are merged into one entry.

  • Constructor Details

    • BandByOptions

      public BandByOptions(S backLink, String instanceId, String classId)
  • Method Details

    • addMapping

      public BandByOptions<S> addMapping(String label, String color)
      Sets the color of the band with the given label.
      Parameters:
      label - the band label
      color - the band color, for example "#2f7ed8" or "rgba(0,0,255,0.5)"
      Returns:
      this builder
    • setSelected

      public BandByOptions<S> setSelected(String... labels)
      Marks the bands with the given labels as selected in the band-by legend.
      Parameters:
      labels - the band labels
      Returns:
      this builder
    • setState

      public BandByOptions<S> setState(List<Map<String,Object>> state)
      Restores a previously saved band-by legend state. Each map is one legend entry and must contain label, which identifies the band. An entry can also contain key, color and selected.
      Parameters:
      state - the legend entries
      Returns:
      this builder