Skip to content

Palette ​

<notatio-palette palette="dusk"> -- one menu for a plot's colors. Each palette is drawn as it paints: its gradient, for values, and its first category colors, for kinds of point. Below the palettes, the gradient and the category colors can be swapped on their own, the gradient reversed, and — given band — the band set: the distance in value between the gradient's two ends, and how values past it meet the gradient (mode).

gradient and discrete say whether those sections are offered at all, so a plot shows only the colors it uses.

packages/components/src/notatio-palette.ts

Props

PropTypeDefaultNotes
palettestring"dusk"
gradientstring""
discretestring""
reversebooleanfalse
bandnumber | undefinedundefined
modeBandMode | undefinedundefined
unitstring""What the band measures, for its label: √|N|.
withGradient
attribute with-gradient
booleantrueOffer the gradient section.
withDiscrete
attribute with-discrete
booleantrueOffer the category-color section.

As a web component

Plain custom elements, no framework required: import @enumeratio/frontend for the side effect and write <notatio-palette> in any HTML. Attributes are kebab-case and always strings; the props table above names each one's attribute where it differs from its prop.