---
title: "shadow(color:radius:x:y:)"
framework: charts
role: symbol
role_heading: Instance Method
path: "charts/chartcontent/shadow(color:radius:x:y:)"
---

# shadow(color:radius:x:y:)

A chart content that adds a shadow to this chart content.

## Declaration

```swift
nonisolated func shadow(color: Color = Color(.sRGBLinear, white: 0, opacity: 0.33), radius: CGFloat, x: CGFloat = 0, y: CGFloat = 0) -> some ChartContent

```

## Parameters

- `color`: The shadow’s color.
- `radius`: A measure of how much to blur the shadow. Larger values result in more blur.
- `x`: An amount to offset the shadow horizontally.
- `y`: An amount to offset the shadow vertically.

## See Also

### Styling marks

- [foregroundStyle(_:)](charts/chartcontent/foregroundstyle(_:).md)
- [opacity(_:)](charts/chartcontent/opacity(_:).md)
- [blur(radius:)](charts/chartcontent/blur(radius:).md)
- [cornerRadius(_:style:)](charts/chartcontent/cornerradius(_:style:).md)
- [lineStyle(_:)](charts/chartcontent/linestyle(_:).md)
- [interpolationMethod(_:)](charts/chartcontent/interpolationmethod(_:).md)
