<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Charts",
  "identifier" : "/documentation/Charts/ScaleType",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Swift Charts"
    ],
    "preciseIdentifier" : "s:6Charts9ScaleTypeV"
  },
  "title" : "ScaleType"
}
-->

# ScaleType

The ways you can scale the domain or range of a plot.

```
struct ScaleType
```

## Overview

Use this type with the `type:` parameter of `.chartXScale` view modifiers to
customize scale types.

## Topics

### Type Properties

[`static var category: ScaleType`](/documentation/Charts/ScaleType/category)

A scale that has discrete domain values as inputs.

[`static var date: ScaleType`](/documentation/Charts/ScaleType/date)

A date scale where each range value y can be expressed as a function
of the domain value x’s timestamp,
with `y = a * x.timeIntervalSinceReferenceDate + b`.

[`static var linear: ScaleType`](/documentation/Charts/ScaleType/linear)

A number scale where each range value y can be expressed as a linear
function of the domain value x, with `y = a * x + b`.

[`static var log: ScaleType`](/documentation/Charts/ScaleType/log)

A number scale where each range value y can be expressed as a logarithmic
function of the domain value x, with `y = a * log(x) + b`.

[`static var squareRoot: ScaleType`](/documentation/Charts/ScaleType/squareRoot)

A number scale where each range value y can be expressed as a square root
function of the domain value x, with `y = a * sqrt(x) + b`.
This is equivalent to a power scale with exponent 0.5.

[`static var symmetricLog: ScaleType`](/documentation/Charts/ScaleType/symmetricLog)

A number scale where each range value y can be expressed as a symmetric
log function of the domain value x, with `y = a * sign(x) * log(1 + |x * slopeAtZero|) + b`.
The constant `slopeAtZero` defaults to 1. You can configure it with `symmetricLog(slopeAtZero:)`.

### Type Methods

[`static func power(exponent: Double) -> ScaleType`](/documentation/Charts/ScaleType/power(exponent:))

A number scale where each range value y can be expressed as a power
function of the domain value x, with `y = a * pow(x, exponent) + b`.

[`static func symmetricLog(slopeAtZero: Double) -> ScaleType`](/documentation/Charts/ScaleType/symmetricLog(slopeAtZero:))

A number scale where each range value y can be expressed as a symmetric
log function of the domain value x, with `y = a * sign(x) * log(1 + |x * slopeAtZero|) + b`.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)