<!--
{
  "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:y:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Swift Charts",
      "Charts"
    ],
    "preciseIdentifier" : "s:6Charts12ChartContentPAAE6offset6xStart4xEnd1yQr14CoreFoundation7CGFloatV_A2JtF"
  },
  "title" : "offset(xStart:xEnd:y:)"
}
-->

# offset(xStart:xEnd:y:)

Applies an offset to the chart content.

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

## Parameters

`xStart`

The starting horizontal offset in screen coordinates.

`xEnd`

The ending horizontal offset in screen coordinates.

`y`

The vertical offset in screen coordinates.

## Discussion

The `xStart` and `xEnd` 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)