Skip to main content
196

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Apple docs
Data displayApple

Box plot

Shows precomputed quartiles, whiskers and outliers on one numeric scale.

Public APILumenBoxPlotApple / SwiftUISwift product: LumenUI

Apple availability

Supported native targets

Import LumenUI in the target that uses this component. iPad support follows the iOS package baseline and uses native iPad layout behavior.

iPhone · iOS 16+iPad · iPadOS 16+Mac · macOS 13+Apple TV · tvOS 16+Apple Vision · visionOS 1+Apple Watch · watchOS 9+

Native example

Use Box plot

Supply ordered statistics or five null values for a missing summary. Applications own statistical methods.

Box plot rendered in the iPhone simulator Lumen playground
Captured exampleiPhone simulator
swift
LumenBoxPlot(data: [.init(id: "north", label: "North", min: 12, q1: 22, median: 31, q3: 44, max: 61)], label: "Response distribution")

Reference

Public API

The primary shared and platform-specific options exposed by LumenBoxPlot.

APIValues or typeDefaultDescription
dataLumenBoxPlotDatum[]RequiredPrecomputed min/q1/median/q3/max plus optional finite outliers. min/max are whisker bounds.
domainFinite numeric rangeAutomaticEncloses every statistic and outlier.
statisticLabels, labelsLocalized statistic names and formattingEnglishNames quartiles, median, whiskers and outliers.
showDataBooleantrueProvides the visible expandable exact statistics.

Native behavior

Design and accessibility

When to use it

Supply ordered statistics or five null values for a missing summary. Applications own statistical methods.

Accessibility

Provides exact statistics with a contrasting median and outlined outliers.

Shared component

Available on other platforms

React NativeAndroid / Compose
Apple docsSwiftUI package