Documentation / @ripl/charts / ColorLegendOptions
Interface: ColorLegendOptions ​
Defined in: charts/src/components/color-legend.ts:36
Visual options for a ColorLegend.
Properties ​
| Property | Type | Description | Defined in |
|---|---|---|---|
font? | string | CSS font shorthand for the value labels. | charts/src/components/color-legend.ts:48 |
fontColor? | string | Color of the value labels. | charts/src/components/color-legend.ts:50 |
format? | (value) => string | Formats a domain value into a label (defaults to numberFormat at 2 dp). | charts/src/components/color-legend.ts:46 |
labelGap? | number | Gap between the bar and its labels in pixels. | charts/src/components/color-legend.ts:52 |
orientation? | ColorLegendOrientation | Whether the color bar runs horizontally or vertically. Defaults to horizontal. | charts/src/components/color-legend.ts:38 |
padding? | number | Padding 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? | number | Number of solid segments used to approximate the gradient. | charts/src/components/color-legend.ts:42 |
thickness? | number | Thickness of the color bar in pixels (height when horizontal, width when vertical). | charts/src/components/color-legend.ts:40 |
tickCount? | number | Number of value labels to render. | charts/src/components/color-legend.ts:44 |