---
title: "chartLineStyleScale(domain:range:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/chartlinestylescale(domain:range:)"
---

# chartLineStyleScale(domain:range:)

Configures the line style scale for charts.

## Declaration

```swift
nonisolated func chartLineStyleScale<Domain, Range>(domain: Domain, range: Range) -> some View where Domain : ScaleDomain, Range : ScaleRange, Range.VisualValue == StrokeStyle

```

## Parameters

- `domain`: The possible data values plotted as line styles in the chart. You can define the domain with an array for categorical values (e.g., ["A", "B", "C"])
- `range`: The range of line styles that correspond to the scale domain.

## See Also

### Line style scales

- [chartLineStyleScale(_:)](swiftui/view/chartlinestylescale(_:).md)
- [chartLineStyleScale(domain:)](swiftui/view/chartlinestylescale(domain:).md)
- [chartLineStyleScale(range:)](swiftui/view/chartlinestylescale(range:).md)
- [chartLineStyleScale(domain:mapping:)](swiftui/view/chartlinestylescale(domain:mapping:).md)
- [chartLineStyleScale(mapping:)](swiftui/view/chartlinestylescale(mapping:).md)
