Skip to content

Chart frame

Pro

The card a chart sits in: its title names the chart, a switch shows the same numbers as a table, and it has empty, loading, pending and error states. Not an M3 component (@windmorph/react-pro).

import { ChartFrame } from '@windmorph/react-pro/charts';

Part of Windmorph Pro, paid components on the free core, not on sale yet. See the Pro guide for what it includes and to register interest.

Playground

Visits by device

This month
  • Phone
  • Desktop
  • Tablet

Code

import { ChartFrame, SegmentedBar } from '@windmorph/react-pro/charts'; <ChartFrame  description="This month"  minHeight={160}  title="Visits by device">  <SegmentedBar    parts={[      { key: 'phone', label: 'Phone', value: 5120 },      { key: 'desktop', label: 'Desktop', value: 2980 },      { key: 'tablet', label: 'Tablet', value: 610 },    ]}  /></ChartFrame>

Examples

A chart that switches to its table

In a narrow column, the table becomes a list of figures

Empty, loading, error and pending