Contents

buildEither(first:)

Builds a partial result from a condition that’s true.

Declaration

static func buildEither<T1, T2>(first: T1) -> BuilderConditional<T1, T2> where T1 : ChartContent, T2 : ChartContent

Parameters

  • first:

    The content to use if the condition is true.

Discussion

This method provides support for if statements with an else clause and switch statements. It produces optional chart content that is visible when the condition evaluates to true.

See Also

Building conditionally