---
title: "position(for:)"
framework: charts
role: symbol
role_heading: Instance Method
path: "charts/chartproxy/position(for:)"
---

# position(for:)

Returns the x and y positions as a CGPoint for the given data values, or nil if either the X or the y scale is unavailable or if any data value is invalid. The returned position is relative to the plot.

## Declaration

```swift
func position<X, Y>(for point: (x: X, y: Y)) -> CGPoint? where X : Plottable, Y : Plottable
```

## Parameters

- `point`: A tuple of x and y data values.

## Return Value

Return Value The position corresponding to the data values.
