---
title: "chartPlotStyle(content:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/chartplotstyle(content:)"
---

# chartPlotStyle(content:)

Configures the plot area of charts.

## Declaration

```swift
nonisolated func chartPlotStyle<Content>(@ViewBuilder content: @escaping (ChartPlotContent) -> Content) -> some View where Content : View

```

## Parameters

- `content`: A closure that returns the content of the plot area.

## Discussion

Discussion Use this modifier to configure the size or aspect ratio of the plot area of charts. For example: Chart(data: data) {     BarMark(x: .value("Category", $0.category)) } .chartPlotStyle { content in     content.frame(width: 100, height: 100) }

## See Also

### Styles

- [chartBackground(alignment:content:)](swiftui/view/chartbackground(alignment:content:).md)
- [chartForegroundStyleScale(_:)](swiftui/view/chartforegroundstylescale(_:).md)
- [chartForegroundStyleScale(domain:range:type:)](swiftui/view/chartforegroundstylescale(domain:range:type:).md)
- [chartForegroundStyleScale(domain:type:)](swiftui/view/chartforegroundstylescale(domain:type:).md)
- [chartForegroundStyleScale(domain:mapping:)](swiftui/view/chartforegroundstylescale(domain:mapping:).md)
- [chartForegroundStyleScale(mapping:)](swiftui/view/chartforegroundstylescale(mapping:).md)
- [chartForegroundStyleScale(range:type:)](swiftui/view/chartforegroundstylescale(range:type:).md)
- [chartForegroundStyleScale(type:)](swiftui/view/chartforegroundstylescale(type:).md)
