MAIDR Documentation - v4.4.0
    Preparing search index...

    Function extremeStat

    • Builds one range row of a box-shaped trace's description summary: the winning value across groups, named with the group it belongs to once there is more than one group to tell apart.

      Every box carries its own ends, so a single chart-wide pair reads as though a chart of several boxes had one minimum and one maximum. Attributing each extreme to its group is what makes the summary answer "which box?" — the per-group breakdown itself is left to the data table below it.

      Both halves of the row — which label to use and whether the value carries a group name — hang off the one grouped check here, so a row can never pair a lone-group label with a group-suffixed value.

      Boxes tie on an end readily, several bottoming out at the same floor being the ordinary case, and beats is strict, so the earliest group in navigation order wins: the group named is the first one the user reaches.

      Parameters

      • points: BoxPoint[]

        The trace's groups, in navigation order.

      • labels: ExtremeLabels

        Row label for the one-group and the several-group case.

        • single

          Label used when the chart holds a single box.

        • grouped

          Label used when the chart holds several boxes.

      • valueOf: (point: BoxPoint) => number

        Reads the value being compared from a group.

      • beats: (candidate: number, current: number) => boolean

        True when the candidate value outranks the current winner.

      Returns DescriptionStat

      The summary row, or a missing row when no group has the value.