---
title: "heightBased(_:yRange:)"
framework: charts
role: symbol
role_heading: Type Method
path: "charts/chart3dsurfacestyle/heightbased(_:yrange:)"
---

# heightBased(_:yRange:)

Height (Y) based style with gradient and Y range.

## Declaration

```swift
static func heightBased(_ gradient: Gradient, yRange: ClosedRange<CGFloat>? = nil) -> Self
```
