Shared Concepts
Legend
The legend identifies each data series by color and label. BTA visuals share a consistent legend system with flexible positioning and typography controls.
Settings
Legend Position
Controls where the legend is rendered relative to the chart area.
| Value | Description |
|---|---|
topLeft | Top edge, left-aligned |
topCenter | Top edge, horizontally centered |
topRight | Top edge, right-aligned (default) |
topLeftStacked | Top edge, left-aligned, items stacked vertically |
topRightStacked | Top edge, right-aligned, items stacked vertically |
centerLeft | Middle of the left edge |
centerRight | Middle of the right edge |
bottomLeft | Bottom edge, left-aligned |
bottomCenter | Bottom edge, horizontally centered |
bottomRight | Bottom edge, right-aligned |
Legend Font Size
| Property | Type | Default | Range |
|---|---|---|---|
legendFontSize | number | 11 | 0 (auto) or 6–40 |
A value of 0 enables automatic sizing — the font scales with the visual's container. Set an explicit value between 6 and 40 to lock the size regardless of container dimensions.
Max Legend Items
| Property | Type | Default |
|---|---|---|
maxLegendItems | number | 10 |
Limits how many items appear in the legend. If your data has more series than this limit, the overflow items are hidden. Reduce this when the legend would otherwise crowd the chart area.
Defaults
legendPosition: "topRight"
legendFontSize: 11
maxLegendItems: 10Tips
- Use
topCenterorbottomCenterwhen the chart is wide and the series count is low — it balances the layout. - Use
centerLeftorcenterRightfor tall, narrow visuals where horizontal space at top/bottom is limited. - The
Stackedpositions (topLeftStacked,topRightStacked) render each legend item on its own line — helpful when item labels are long. - Keep
maxLegendItemsat or below 10 for readability. If you have many series, consider filtering the data before displaying it. - Set
legendFontSizeto0during initial layout and only fix it to a specific value once you know the visual's final size in the report.