chartForegroundStyleScale(domain:range:type:)
Configures the foreground style scale for charts.
Declaration
nonisolated func chartForegroundStyleScale<Domain, Range>(domain: Domain, range: Range, type: ScaleType? = nil) -> some View where Domain : ScaleDomain, Range : ScaleRange, Range.VisualValue : ShapeStyle
Parameters
- domain:
The possible data values plotted as foreground style 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"]) - range:
The range of foreground styles that correspond to the scale domain.
- type:
The scale type.