---
title: "buildIf(_:)"
framework: charts
role: symbol
role_heading: Type Method
path: "charts/axismarkbuilder/buildif(_:)"
---

# buildIf(_:)

Provides support for “if” statements in multi-statement closures, producing an optional axis content that is visible only when the condition evaluates to true.

## Declaration

```swift
static func buildIf<T>(_ content: T?) -> T? where T : AxisMark
```
