Chart

Bar, line or area chart on the chart series colours, one y axis from zero.

The snippet an agent gets

Chart.tsx
import { Chart } from '@basiiik/ui';<Chart data={[{ month: 'Jan', revenue: 4200 }, { month: 'Feb', revenue: 4800 }]} xKey="month" series={[{ key: 'revenue', label: 'Revenue' }]} title="Revenue" />

From get_component_snippet, with the required props filled in from the spec. Every snippet is type-checked against the library before it ships.

  • Example values were filled in for the required props data, xKey, series, title: replace them with your own.
  • Values in braces are your own variables, handlers or data, such as const [open, setOpen] = useState(false).
  • No interaction states in Figma. In code the active x position follows the pointer and the arrow keys; View as table is a pressed toggle.
  • Storybook: Data display/Chart.