---
title: "ratio(_:)"
framework: charts
role: symbol
role_heading: Type Method
path: "charts/markdimensions/ratio(_:)-r23h"
---

# ratio(_:)

A dimension that’s proportional to the scale step size, using the specified ratio.

## Declaration

```swift
static func ratio(_ keyPath: KeyPath<DataElement, CGFloat>) -> MarkDimensions<DataElement>
```
