LegendConfig
public class LegendConfigControls legend visibility, placement, alignment, dimensions, title, and per-item customization.
Fields
Section titled “Fields”
Position
Section titled “Position”public LegendPosition PositionReturns
ChartGuru.LegendPosition
Alignment
Section titled “Alignment”public LegendAlignment AlignmentAlignment of the legend within its position area. Swift Charts equivalent: .ChartLegend(position:alignment:)
Returns
ChartGuru.LegendAlignment
public float SizeSize reserved for legend (height for Top/Bottom, width for Leading/Trailing). For Top/Bottom, ~30px is typically sufficient. For Leading/Trailing, this is overridden to at least 80px to accommodate swatch + text.
Returns
System.Single
Interactive
Section titled “Interactive”public bool InteractiveReturns
System.Boolean
ItemRenderer
Section titled “ItemRenderer”public Action<LegendItemBuilder, LegendSeriesInfo> ItemRendererOptional per-item customization invoked while the legend is computed. Receives the
proposed ChartGuru.LegendItemBuilder plus the resolved series info; mutating the
builder overrides label text and swatch color without replacing the whole layout.
The builder instance is callback-scoped and may be reused across entries.
Swift Charts equivalent: chartLegend { item in … } / custom legend content.
Returns
System.Action{ChartGuru.LegendItemBuilder,ChartGuru.LegendSeriesInfo}
Constructors
Section titled “Constructors”
LegendConfig()
Section titled “LegendConfig()”public LegendConfig()