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

# foregroundStyle(by:)

Represents data using a foreground style.

## Declaration

```swift
nonisolated func foregroundStyle(by value: PlottableProjection<Self.DataElement, some Plottable>) -> some VectorizedChartContent<Self.DataElement>

```

## Parameters

- `value`: The data value to encode using foreground style.

## See Also

### Encoding data into mark characteristics

- [lineStyle(by:)](charts/vectorizedchartcontent/linestyle(by:).md)
- [symbol(by:)](charts/vectorizedchartcontent/symbol(by:).md)
- [symbolSize(by:)](charts/vectorizedchartcontent/symbolsize(by:).md)
