Skip to content

Heat Map

HeatMapChartStrategy renders a two-dimensional matrix colored by aggregated value. Accepts at most one ColorRule.

Constructor

from orama.strategies.heatmap import HeatMapChartStrategy

strategy = HeatMapChartStrategy(
    fields_metadata=fields_metadata,
    x_category_variables=["month"],
    y_category_variables=["region"],
    aggregation=Aggregation(name="revenue", function="sum", field="revenue"),
    display_values=True,    # bool — annotate each cell with its numeric value
    color_rules=None,
    title=None,         # str | None
    subtitle=None,      # str | None
    caption=None,       # str | None
    description=None,   # str | None — interpretive text (not in figure)
    storytelling_context=None,  # str | None — narrative goal / target audience
    x_label=None,       # str | None — X-axis label
    y_label=None,       # str | None — Y-axis label
    value_label=None,   # str | None — colorbar title
    show_colorbar=True, # bool — show the colorbar
)

Supported colors

Selectors: ColorSelectorStrategy (all entries — selects the color scale).

Assigners: ColorAssignerByValue (defines the color scale and optional range bounds via range_min, range_max, range_center_at).