<!--
{
  "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/PointPlot",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Swift Charts"
    ],
    "preciseIdentifier" : "s:6Charts9PointPlotV"
  },
  "title" : "PointPlot"
}
-->

# PointPlot

Chart content that represents a collection of data using points.

```
struct PointPlot<Content>
```

## Overview

Use `PointPlot` when you want to visualize data in the same way as with [`PointMark`](/documentation/Charts/PointMark),
but you want to visualize an entire data collection with a single plot.

You can initialize and style the plot with simple values or key paths.
Add modifiers with `KeyPath` before adding modifiers with simple values.

```
Chart {
    PointPlot(
        flightDelays,
        x: .value("Flight Distance", \.distance),
        y: .value("Flight Delay", \.delay)
    )
    .foregroundStyle(by: .value("Airline", \.airline))
    .opacity(\.opacity)
    .symbolSize(by: .value("Capacity", \.passengerCount))
    .symbol(.circle)
}
```

## Topics

### Plotting points from a collection

[`init(_:x:y:)`](/documentation/Charts/PointPlot/init(_:x:y:)-1a9af)

[`init(_:x:y:)`](/documentation/Charts/PointPlot/init(_:x:y:)-1p6px)

[`init(_:x:y:)`](/documentation/Charts/PointPlot/init(_:x:y:)-72pm2)

[`init(_:x:y:)`](/documentation/Charts/PointPlot/init(_:x:y:)-7frpp)

[`init(_:x:y:)`](/documentation/Charts/PointPlot/init(_:x:y:)-9p3yg)

### Supporting types

[`body`](/documentation/Charts/ChartContent/body-swift.property)

The content and behavior of the chart content.

[`VectorizedPointPlotContent`](/documentation/Charts/VectorizedPointPlotContent)

An opaque vectorized chart content type.



---

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)