API / Configuration / ChartLegend
Defined in: src/types/chart/legend.ts:3
Properties
Property | Type | Description |
---|---|---|
align? |
"left" | "center" | "right" |
The horizontal alignment of the legend box within the chart area. Default center |
colorScale? |
object |
- |
colorScale.colors |
string [] |
- |
colorScale.domain? |
number [] |
- |
colorScale.stops? |
number [] |
- |
enabled? |
boolean |
- |
itemDistance? |
number |
Defines the pixel distance between each legend item Default 20 |
itemStyle? |
BaseTextStyle |
CSS styles for each legend item |
margin? |
number |
The space between the legend and the axis labels or chart area. Default 15 |
title? |
object |
- |
title.align? |
"left" | "center" | "right" |
The horizontal alignment of the title. |
title.margin? |
number |
The distance(in pixels) between the main content of the legend and its title Defaults to 4 for horizontal axes, 8 for vertical. |
title.style? |
Partial <BaseTextStyle > |
CSS styles for the title |
title.text? |
string |
- |
type? |
"discrete" | "continuous" |
Different types for different color schemes. If the color scheme is continuous, a gradient legend will be drawn. Otherwise, samples for different point values Default 'discrete' |
width? |
number |
- |
Previous
Next