chartXScale(domain:type:)
Configures the x scale for charts.
Declaration
nonisolated func chartXScale<Domain>(domain: Domain, type: ScaleType? = nil) -> some View where Domain : ScaleDomain
Parameters
- domain:
The possible data values along the x axis in the chart. You can define the domain with a
ClosedRangefor number orDatevalues (e.g.,0 ... 500), and with an array for categorical values (e.g.,["A", "B", "C"]) - type:
The scale type.