MAIDR JavaScript API
    Preparing search index...
    • Stamps what a legend drew, so the count of marks leaves it out.

      A legend icon is painted exactly as the series it stands for -- a bar's swatch in the bar colour, a line's in the line colour at the line's weight -- and is drawn after the series, so paint and order both take it for a mark: a five-bar chart with its legend showing counted six, and the mismatch dropped its highlighting (#1315). What does tell them apart is where they are, so everything whose centre lies inside a legend's box is set aside.

      A mark drawn under a legend placed over the plot is set aside with it. The count then disagrees and the chart reads without an outline, which is the conservative failure the count check exists to produce.

      Parameters

      • container: HTMLElement

        The element the chart was rendered into

      • boxes: ChartBox[]

        Where each legend was drawn, in the chart's pixels

      Returns void