BTA Charts
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.

ValueDescription
topLeftTop edge, left-aligned
topCenterTop edge, horizontally centered
topRightTop edge, right-aligned (default)
topLeftStackedTop edge, left-aligned, items stacked vertically
topRightStackedTop edge, right-aligned, items stacked vertically
centerLeftMiddle of the left edge
centerRightMiddle of the right edge
bottomLeftBottom edge, left-aligned
bottomCenterBottom edge, horizontally centered
bottomRightBottom edge, right-aligned

Legend Font Size

PropertyTypeDefaultRange
legendFontSizenumber110 (auto) or 640

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

PropertyTypeDefault
maxLegendItemsnumber10

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:  10

Tips

  • Use topCenter or bottomCenter when the chart is wide and the series count is low — it balances the layout.
  • Use centerLeft or centerRight for tall, narrow visuals where horizontal space at top/bottom is limited.
  • The Stacked positions (topLeftStacked, topRightStacked) render each legend item on its own line — helpful when item labels are long.
  • Keep maxLegendItems at or below 10 for readability. If you have many series, consider filtering the data before displaying it.
  • Set legendFontSize to 0 during initial layout and only fix it to a specific value once you know the visual's final size in the report.

On this page