---
title: "init(x:y:)"
framework: charts
role: symbol
role_heading: Initializer
path: "charts/pointmark/init(x:y:)-44ke9"
---

# init(x:y:)

Creates a point mark that plots values to x and y.

## Declaration

```swift
nonisolated init<X, Y>(x: PlottableValue<X>, y: PlottableValue<Y>) where X : Plottable, Y : Plottable
```

## Parameters

- `x`: The value plotted with x.
- `y`: The value plotted with y.

## Discussion

Discussion Use this initializer to plot one property with x and another property with y: Chart(data) {     PointMark(         x: .value("Wing Length", $0.wingLength),         y: .value("Wing Length", $0.wingWidth)     ) }

For more background, see the first example used in PointMark which shows the structure that contains the wingLength and wingHeight properties.

## See Also

### Creating a point mark

- [init(x:y:)](charts/pointmark/init(x:y:)-9dswq.md)
- [init(x:y:)](charts/pointmark/init(x:y:)-9hppd.md)
- [init(x:y:z:)](charts/pointmark/init(x:y:z:).md)
