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

# foregroundStyle(_:)

Sets the axis content’s foreground elements to use a given style.

## Declaration

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

```

## Parameters

- `style`: The color or pattern to use when filling in the foreground elements.

## Return Value

Return Value An axis content that uses the given foreground style.
