---
title: "chartForegroundStyleScale(domain:range:type:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/chartforegroundstylescale(domain:range:type:)"
---

# chartForegroundStyleScale(domain:range:type:)

Configures the foreground style scale for charts.

## Declaration

```swift
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 ClosedRange for number or Date values (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.

## See Also

### Styles

- [chartBackground(alignment:content:)](swiftui/view/chartbackground(alignment:content:).md)
- [chartForegroundStyleScale(_:)](swiftui/view/chartforegroundstylescale(_:).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)
- [chartPlotStyle(content:)](swiftui/view/chartplotstyle(content:).md)
