Skip to main content
196

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Apple docs
Data displayApple

Lollipop chart

Rank categories using a dot and a zero-based stem.

Public APILumenLollipopChartApple / 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 Lollipop chart

Preserve missing measurements as null and provide a zero-inclusive domain. The application owns row ordering.

Lollipop chart rendered in the iPhone simulator Lumen playground
Captured exampleiPhone simulator
swift
LumenLollipopChart(
  data: [.init(id: "design", label: "Design", value: 88)],
  label: "Team scores, current quarter",
  domain: 0...100,
  heading: "Team performance",
  valueLabel: "Score"
)

Reference

Public API

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

APIValues or typeDefaultDescription
dataLumenComparisonDatum[]RequiredUnique id, category label, nullable finite value, optional reference and tone. Input order is preserved.
label, heading, descriptionStringlabel requiredProvides the accessible name and optional visible context.
domainFinite numeric rangeAutomaticIncludes zero and all displayed measurements. React Native uses { min, max }; SwiftUI and Compose use closed ranges.
valueLabel, labelsLocalized chart labelsEnglishNames the measure and localizes empty, missing, invalid, and disclosure text.
formatValue / labels.formatValueNumber formatterPlatform defaultReact Native accepts formatValue; SwiftUI and Compose use labels.formatValue.
showDataBooleantrueProvides the expandable exact values.

Native behavior

Design and accessibility

When to use it

Preserve missing measurements as null and provide a zero-inclusive domain. The application owns row ordering.

Accessibility

Keeps category labels and exact values available independently of the decorative stems and dots.

Shared component

Available on other platforms

React NativeAndroid / Compose
Apple docsSwiftUI package