Contents

ChartContentBuilder

A result builder that you use to compose the contents of a chart.

Declaration

@resultBuilder struct ChartContentBuilder

Overview

This Result Builder combines any number of ChartContent instances into a single composite instance, including support for conditionals.

You don’t call the methods of the result builder directly. Instead, Swift uses them to combine the elements that you declare in any closure that has the @ChartContentBuilder attribute. In particular, you rely on this behavior when you declare the content inside a Chart initializer like init(content:).

Topics

Building chart content

Building conditionally

Building with conditional availability

Supporting types

Type Methods

See Also

Charts