<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Charts",
  "identifier" : "/documentation/Charts/ChartContent/offset(xStart:xEnd:yStart:yEnd:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Swift Charts",
      "Charts"
    ],
    "preciseIdentifier" : "s:6Charts12ChartContentPAAE6offset6xStart4xEnd01yE001yF0Qr14CoreFoundation7CGFloatV_A3KtF"
  },
  "title" : "offset(xStart:xEnd:yStart:yEnd:)"
}
-->

# offset(xStart:xEnd:yStart:yEnd:)

Applies an offset to the chart content.

```
nonisolated func offset(xStart: CGFloat = 0, xEnd: CGFloat = 0, yStart: CGFloat = 0, yEnd: CGFloat = 0) -> some ChartContent
```

## Parameters

`xStart`

The starting horizontal offset in screen coordinates.

`xEnd`

The ending horizontal offset in screen coordinates.

`yStart`

The starting vertical offset in screen coordinates.

`yEnd`

The ending vertical offset in screen coordinates.

## Discussion

The `xStart`, `xEnd`, `yStart`, and `yEnd` offset values apply only to
marks that have such properties, like bar marks and line segment marks.

---

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)