MAIDR JavaScript API
    Preparing search index...
    • Generates a 2D grid of per-cell CSS selectors for a Highcharts heatmap series.

      MAIDR's HeatmapTrace (when given a string[][]) treats selectors[r][c] as the selector for the cell at logical row r, column c, having reversed the incoming rows so that row 0 is the bottom of the visual grid. The adapter stamps data-maidr-row with Highcharts' own y index, so this walks the same path back: which stamped row is logical row r depends on whether the adapter turned the payload over on its way out.

      On an ordinary axis it did — Highcharts counts y from the bottom while the grammar runs top-first — and the two reversals cancel, leaving logical row r on stamped row r. On a reversed axis the payload passed through untouched, so only the model's reversal applies and the index has to be flipped (#973).

      Highcharts emits heatmap cells in series.data order, which depends on the user's data layout (could be row-major or column-major). DOM-order based mapping is fragile across user configs; per-cell stamping (see stampHeatmapIndices in adapter.ts) makes the selector→cell mapping unambiguous regardless of insertion order.

      Parameters

      • containerId: string

        The chart container's id

      • seriesIndex: number

        Which series in the chart this is

      • rows: number

        How many rows the grid has

      • cols: number

        How many columns the grid has

      • topFirst: boolean

        Whether Highcharts already draws y index 0 at the top, meaning the adapter left the payload's rows as they were

      • leftFirst: boolean

        The same question of the x axis: whether Highcharts already draws x index 0 at the left, meaning the adapter left each row's columns as they were (#1008)

      Returns string[][]

      selectors[r][c], indexed the way the model indexes its cells