Skip to main content
196

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
React Native docs
Data displayReact Native

Dumbbell chart

Compare two measurements per category with connected dots.

Public APILumenDumbbellChartReact Native

Native example

Use Dumbbell chart

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

View captured React Native example
Dumbbell chart rendered in the Expo web renderer Lumen playground
Captured exampleExpo web renderer
tsx
<LumenDumbbellChart
  label="Team scores, previous and current quarter"
  heading="Progress by team"
  data={[
    { id: 'design', label: 'Design', value: 88, reference: 62 },
    { id: 'support', label: 'Support', value: 74, reference: 81 }
  ]}
  domain={{ min: 0, max: 100 }}
  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

Apple / SwiftUIAndroid / Compose
React Native docsNative primitives