<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 2.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Charts",
  "identifier" : "/documentation/Charts/BarPlot/init(_:x:y:width:height:stacking:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Swift Charts",
      "Charts"
    ],
    "preciseIdentifier" : "s:6Charts7BarPlotV_1x1y5width6height8stackingACyAA010VectorizedbC7ContentVyqd__GGqd___AA19PlottableProjectionVy7ElementQyd__qd_0_GANyAPqd_1_GAA14MarkDimensionsVyAPGAuA0L14StackingMethodVtcAKRszSkRd__AA0I0Rd_0_AaXRd_1_r1_lufc"
  },
  "title" : "init(_:x:y:width:height:stacking:)"
}
-->

# init(_:x:y:width:height:stacking:)

```
nonisolated init<Data>(_ data: Data, x: PlottableProjection<BarPlot<Content>.DataElement, some Plottable>, y: PlottableProjection<BarPlot<Content>.DataElement, some Plottable>, width: MarkDimensions<BarPlot<Content>.DataElement> = .automatic, height: MarkDimensions<BarPlot<Content>.DataElement> = .automatic, stacking: MarkStackingMethod = .standard) where Content == VectorizedBarPlotContent<Data>, Data : RandomAccessCollection
```

---

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)