MAIDR Documentation - v4.4.0
    Preparing search index...
    • Maps a rendered fill colour back to the value the colour scale encoded.

      A cell mark carries its magnitude only in its fill, so a heatmap's z values are unreadable without this. Continuous colour scales expose invert; ordinal ones do not, and are matched against the range instead — which is also what turns a series colour into its legend label.

      Parameters

      • scale: PlotScale | undefined

        The plot's colour scale.

      • color: string | null

        The fill attribute read off the element.

      Returns string | number | null

      The domain value, or null when the colour is not on the scale.