MAIDR JavaScript API
    Preparing search index...
    • The pixel intervals a band or point scale assigns to its categories.

      Marks are not always drawn flush to their band — Plot insets rect and cell marks by half a pixel, and a dot sits at the band's midpoint — so matching a pixel to a category by equality fails. Intervals let valueAtPixel ask which band contains a point instead.

      Built once per scale. The result describes the scale alone, so every caller reading the same chart gets the same array back rather than rebuilding it.

      Parameters

      • scale: PlotScale

        A band, point, or ordinal scale.

      Returns BandInterval[]

      One entry per domain value, ordered by pixel position.