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

# positionRange(for:)

Returns the range of x and y positions for the given pair of data values, or nil if the y scale is unavailable or if the value is invalid.

## Declaration

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

## Return Value

Return Value The position range corresponding to the data values.

## Discussion

Discussion For a continuous data value, the returned range is a single point. For a categorical data value, the returned range is the range of positions that correspond to the given category.
