One Logo Pool Ball
Charts · IOS API REFERENCE

ScaleType

struct · iOS 16.0+ · SDK 27.1

struct ScaleType

The ways you can scale the domain or range of a plot. Use this type with the `type:` parameter of `.chartXScale` view modifiers to customize scale types.

Members (8)

get · iOS 16.4+

squareRoot

TypeScript
static get squareRoot(): ScaleType
Swift declaration
static var squareRoot: ScaleType { get }

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 · iOS 16.4+

symmetricLog

TypeScript
static symmetricLogSlopeAtZero(slopeAtZero: number): ScaleType
Swift declaration
static func symmetricLog(slopeAtZero: Double) -> ScaleType

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`. - Parameter slopeAtZero: A positive constant that controls the slope of the symmetric log function at zero.

get · iOS 16.4+

symmetricLog

TypeScript
static get symmetricLog(): ScaleType
Swift declaration
static var symmetricLog: ScaleType { get }

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:)`.

get · iOS 16.0+

log

TypeScript
static get log(): ScaleType
Swift declaration
static var log: ScaleType { get }

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`.

get · iOS 16.0+

date

TypeScript
static get date(): ScaleType
Swift declaration
static var date: ScaleType { get }

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 · iOS 16.4+

power

TypeScript
static power(exponent: number): ScaleType
Swift declaration
static func power(exponent: Double) -> ScaleType

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`. - Parameter exponent: The exponent of the power function.

get · iOS 16.0+

linear

TypeScript
static get linear(): ScaleType
Swift declaration
static var linear: ScaleType { get }

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`.

get · iOS 16.0+

category

TypeScript
static get category(): ScaleType
Swift declaration
static var category: ScaleType { get }

A scale that has discrete domain values as inputs.

Skipped declarations

No declarations were skipped in this snapshot.

All Charts types →