Skip to main content
196

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Android docs
Data displayAndroid

Dumbbell chart

Compare two measurements per category with connected dots.

Public APILumenDumbbellChartAndroid / Compose

Native example

Use Dumbbell chart

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

Dumbbell chart rendered in the Android phone emulator Lumen playground
Captured exampleAndroid phone emulator
kotlin
LumenDumbbellChart(
  data = listOf(
    LumenComparisonDatum("design", "Design", value = 88.0, reference = 62.0),
    LumenComparisonDatum("support", "Support", value = 74.0, reference = 81.0)
  ),
  label = "Team scores, previous and current quarter",
  domain = 0.0..100.0,
  heading = "Progress by team",
  referenceLabel = "Previous",
  valueLabel = "Current"
)

Reference

Public API

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

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. DumbbellChart also accepts referenceLabel (Before).
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 exact values available and uses filled and outlined dots for paired measurements.

Shared component

Available on other platforms

React NativeApple / SwiftUI
Android docsCompose module