Skip to content

Type Alias: LegendGlyphPart ​

ts
type LegendGlyphPart =
  | {
      color: string;
      dash?: string;
      segment: readonly [number, number, number, number];
      width: number;
    }
  | {
      color: string;
      lineColor?: string;
      lineWidth?: number;
      rect: readonly [number, number, number, number];
    };

Experimental

One piece of a LegendGlyph of kind 'parts': a line segment or a filled rect, in px from the glyph center (x right, y down; the glyph area is legend.itemwidth wide).

Released under the MIT License.