chartXAxisStyle(content:)
Configures the x axis content of charts.
Declaration
nonisolated func chartXAxisStyle<Content>(@ViewBuilder content: @escaping (ChartAxisContent) -> Content) -> some View where Content : View
Parameters
- content:
A closure that returns the content of the axis.
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))
}
.chartXAxisStyle { axis in
axis.opacity(0.5)
}