Skip to content

AdaptiveChartContainer

stable

Responsive wrapper that renders a full chart at desktop (≥768px) and collapses to a compact metric card with sparkline at mobile (<768px)

FinanceInteractive/Storybook ↗
import { AdaptiveChartContainer } from "@danagraph/design-system/finance"
Loading demo…

Props

chartrequired
Type ReactNodeDefault —

Full chart component rendered at desktop breakpoint

metricLabelrequired
Type stringDefault —

Label shown on the compact mobile metric card

metricValuerequired
Type numberDefault —

Primary KPI value shown on mobile card

metricFormat
Type NumberFormatDefault —

currency | rate | percent | bps | integer | decimal (default: currency)

metricCurrency
Type stringDefault —

ISO 4217 currency code

delta
Type numberDefault —

Period-over-period delta as decimal (e.g. 0.03 = +3%)

deltaThreshold
Type ThresholdBreakpointsDefault —

Breakpoints for delta severity coloring

sparklineData
Type number[]Default —

Trend data points for mobile sparkline (omit to hide)

title
Type stringDefault —

Chart/card title

asOf
Type stringDefault —

As-of date string

locale
Type stringDefault —

Locale for number formatting

semantictypeoutcomespacefin
MobileMobile Adapted

Fully adapted for mobile: renders the full chart at ≥768px and automatically collapses to a compact SparkLine + metric card at <768px. No additional mobile handling required.

Design Rationale

This component was designed to express:

Explore Related

Was this helpful?