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

# position(forY:)

Returns the y position for the given data value, or nil if the y scale is unavailable or if the data value is invalid. The returned position is relative to the plot.

## Declaration

```swift
func position<P>(forY value: P) -> CGFloat? where P : Plottable
```

## Parameters

- `value`: A data value.

## Return Value

Return Value The position corresponding to the data value.
