---
title: ScaleDomain
framework: charts
role: symbol
role_heading: Protocol
path: charts/scaledomain
---

# ScaleDomain

A type that you can use to configure the domain of a chart.

## Declaration

```swift
protocol ScaleDomain
```

## Overview

Overview A type you use to configure the domain of a chart scale. Including zero in number scales By default, number scales include zero in the domain to ensure charts follow the best practice to include a zero baseline in bar charts.

For other marks, this zero baseline isn’t as important, but the framework includes zero by default so the domain inference logic is consistent and deterministic.  Changing the mark type won’t suddenly affect scale domain.

If you don’t want to include the zero baseline in certain cases, use automatic(includeszero:reversed:) to customize the scale domain and disable the automatic zero inclusion. Chart([20, 30, 50, 70, 85], id: \.self) {     PointMark(         x: .value("Value", $0)     ) } .chartXScale(domain: .automatic(includesZero: false))

Reversing the order of inferred domain You can also reverse the order of the inferred domain: Chart([20, 30, 50, 70, 85], id: \.self) {     PointMark(         x: .value("Value", $0)     ) } .chartXScale(domain: .automatic(reversed: true))

## Topics

### Type Properties

- [automatic](charts/scaledomain/automatic.md)

### Type Methods

- [automatic(includesZero:reversed:)](charts/scaledomain/automatic(includeszero:reversed:).md)
- [automatic(includesZero:reversed:dataType:modifyInferredDomain:)](charts/scaledomain/automatic(includeszero:reversed:datatype:modifyinferreddomain:).md)

## Relationships

### Conforming Types

- [AutomaticScaleDomain](charts/automaticscaledomain.md)

## See Also

### Scales

- [ScaleRange](charts/scalerange.md)
- [PositionScaleRange](charts/positionscalerange.md)
- [PlotDimensionScaleRange](charts/plotdimensionscalerange.md)
- [AutomaticScaleDomain](charts/automaticscaledomain.md)
- [ScaleType](charts/scaletype.md)
