loom & weft
Made for Swift.

Published release 0.2.1. Unreleased PR #2 reference.

LOOM 0.2.1 / PLOTTING AND CALENDARS

ChartAxis

Axis presentation.

Nil bounds autoscale finite dataset points; invalid explicit bounds draw no data. Titles are horizontal, with the y title above its axis and the x title below its labels.

Standard inherited Swift protocol operations such as synthesized equality and OptionSet set operations are not repeated. The public declarations below are extracted from the exact source revision listed in the coverage manifest.

Members on this page

Feature guides and release status

ChartAxis

Structure
struct ChartAxis

Conforms to: Swift.Sendable, Swift.SendableMetatype.

Axis presentation.

Nil bounds autoscale finite dataset points; invalid explicit bounds draw no data. Titles are horizontal, with the y title above its axis and the x title below its labels.

Source · Chart.swift:53

bounds

Instance Property
var bounds: CanvasBounds?

Current window rectangle within the viewport.

Source · Chart.swift:54

title

Instance Property
var title: [TextSpan]

Optional title displayed in the top border.

Source · Chart.swift:55

labels

Instance Property
var labels: [ChartAxisLabel]

A public field of this type. Its value type and mutability are shown in the declaration.

Source · Chart.swift:56

style

Instance Property
var style: Style?

Nil inherits the chart appearance; an explicit style replaces it.

Source · Chart.swift:58

labelStyle

Instance Property
var labelStyle: Style?

Nil inherits the chart appearance; span styles still take precedence.

Source · Chart.swift:60

init(bounds:title:labels:style:labelStyle:)

Initializer
init(bounds: CanvasBounds? = nil, title: [TextSpan] = [], labels: [ChartAxisLabel] = [], style: Style? = nil, labelStyle: Style? = nil)

Creates a value with the supplied arguments. Default arguments are shown in the declaration.

Parameters (5)
bounds
Argument type and any default are shown in the declaration; see the behavior notes above.
title
Argument type and any default are shown in the declaration; see the behavior notes above.
labels
Argument type and any default are shown in the declaration; see the behavior notes above.
style
Text/cell appearance.
labelStyle
Argument type and any default are shown in the declaration; see the behavior notes above.
Source · Chart.swift:62

init(bounds:title:labels:style:labelStyle:)

Initializer
init(bounds: CanvasBounds? = nil, title: String, labels: [ChartAxisLabel] = [], style: Style? = nil, labelStyle: Style? = nil)

Creates a value with the supplied arguments. Default arguments are shown in the declaration.

Parameters (5)
bounds
Argument type and any default are shown in the declaration; see the behavior notes above.
title
Argument type and any default are shown in the declaration; see the behavior notes above.
labels
Argument type and any default are shown in the declaration; see the behavior notes above.
style
Text/cell appearance.
labelStyle
Argument type and any default are shown in the declaration; see the behavior notes above.
Source · Chart.swift:73