Skip to content

Documentation / @ripl/charts / ColorLegendOptions

Interface: ColorLegendOptions ​

Defined in: charts/src/components/color-legend.ts:36

Visual options for a ColorLegend.

Properties ​

PropertyTypeDescriptionDefined in
font?stringCSS font shorthand for the value labels.charts/src/components/color-legend.ts:48
fontColor?stringColor of the value labels.charts/src/components/color-legend.ts:50
format?(value) => stringFormats a domain value into a label (defaults to numberFormat at 2 dp).charts/src/components/color-legend.ts:46
labelGap?numberGap between the bar and its labels in pixels.charts/src/components/color-legend.ts:52
orientation?ColorLegendOrientationWhether the color bar runs horizontally or vertically. Defaults to horizontal.charts/src/components/color-legend.ts:38
padding?numberPadding inset (px) between the reserved band's leading edge and the bar, so the legend doesn't sit flush against the adjacent axis. Defaults to 8.charts/src/components/color-legend.ts:55
segments?numberNumber of solid segments used to approximate the gradient.charts/src/components/color-legend.ts:42
thickness?numberThickness of the color bar in pixels (height when horizontal, width when vertical).charts/src/components/color-legend.ts:40
tickCount?numberNumber of value labels to render.charts/src/components/color-legend.ts:44