Contents

chartLegend(position:alignment:spacing:)

Configures the legend for charts.

Declaration

@MainActor @preconcurrency func chartLegend(position: AnnotationPosition = .automatic, alignment: Alignment? = nil, spacing: CGFloat? = nil) -> some View

Parameters

  • position:

    Configures the position of the legend.

  • alignment:

    Alignment of the legend within the space available to it. Use nil for default alignment.

  • spacing:

    Distance between the legend and the chart. Use nil for the default spacing.

See Also

Legends