Class ByValueHeatMapBuilder

java.lang.Object
io.deephaven.multiviewwidget.builder.heatmap.ByValueHeatMapBuilder
All Implemented Interfaces:
PivotHeatMapBuilder, Serializable

public class ByValueHeatMapBuilder extends Object implements PivotHeatMapBuilder
A PivotHeatMapBuilder which permits the query-builder to define a value to color mapping for any number of values. If a resultant cell within the pivot-table cannot be mapped to a color, then the cell-color will be defined by the default behavior of the table
See Also:
  • Constructor Details

    • ByValueHeatMapBuilder

      public ByValueHeatMapBuilder(@NotNull @NotNull List<Color> colors, @NotNull @NotNull List<Object> values)
      Construct a new ByValueHeatMapBuilder
      Parameters:
      colors - a list of colors to use with corresponding values
      values - a list of values to use with corresponding colors
  • Method Details

    • getColor

      public long getColor(Object value)
      Returns the appropriate color for the given value
      Parameters:
      value - an object, which may or may not have an associated color
      Returns:
      the builder-defined color for the given value, or an indication that the underlying default color should be used
    • createHeatMap

      public PivotHeatMap<ValuesHeatMap> createHeatMap(Table valuesTable, PivotTableState state)
      Converts this PivotHeatMapBuilder instance into a PivotHeatMap instance
      Specified by:
      createHeatMap in interface PivotHeatMapBuilder
      Parameters:
      valuesTable - unused by this type
      state - unused by this type
      Returns:
      a new ValuesHeatMap instance