Contents

chartBackground(alignment:content:)

Adds a background to a view that contains a chart.

Declaration

nonisolated func chartBackground<V>(alignment: Alignment = .center, @ViewBuilder content: @escaping (ChartProxy) -> V) -> some View where V : View

Parameters

  • alignment:

    The alignment of the content.

  • content:

    The content of the background.

Discussion

You can use this modifier to define a background view as a function of the chart in the view. You can access the chart with the ChartProxy object passed into the closure.

See Also

Styles