---
title: "foregroundStyle(_:)"
framework: charts
role: symbol
role_heading: Instance Method
path: "charts/chartcontent/foregroundstyle(_:)"
---

# foregroundStyle(_:)

Sets the foreground style for the chart content.

## Declaration

```swift
nonisolated func foregroundStyle<S>(_ style: S) -> some ChartContent where S : ShapeStyle

```

## Parameters

- `style`: The shape style.

## See Also

### Styling marks

- [opacity(_:)](charts/chartcontent/opacity(_:).md)
- [blur(radius:)](charts/chartcontent/blur(radius:).md)
- [cornerRadius(_:style:)](charts/chartcontent/cornerradius(_:style:).md)
- [lineStyle(_:)](charts/chartcontent/linestyle(_:).md)
- [shadow(color:radius:x:y:)](charts/chartcontent/shadow(color:radius:x:y:).md)
- [interpolationMethod(_:)](charts/chartcontent/interpolationmethod(_:).md)
