<!--
{
  "availability" : [
    "iOS: 16.4.0 -",
    "iPadOS: 16.4.0 -",
    "macCatalyst: 16.4.0 -",
    "macOS: 13.3.0 -",
    "tvOS: 16.4.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Charts",
  "identifier" : "/documentation/Charts/ChartContent/shadow(color:radius:x:y:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Swift Charts",
      "Charts"
    ],
    "preciseIdentifier" : "s:6Charts12ChartContentPAAE6shadow5color6radius1x1yQr7SwiftUI5ColorV_14CoreFoundation7CGFloatVA2NtF"
  },
  "title" : "shadow(color:radius:x:y:)"
}
-->

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

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

```
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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)