Skip to content
Mizen UI
Docs

IntroductionInstallationCLIStylingFoundationsThemingCompositionIntegrationsAccessibilityFor agents

useCopyToClipboard

AccordionAspect RatioCardCollapsibleFrameGridGroupInlineScroll AreaSectionSeparatorSpacerStack

BlockquoteCitationCodeHeadingKbdLabelLinkTextVisually Hidden

ButtonButton GroupToggleToggle groupToolbar

CalendarCheckboxCheckbox groupComboboxDate pickerDate range pickerDate-Time InputFieldFieldsetFile UploadFormInputInput groupNumber fieldOTP FieldRadio groupSelectSliderSwitchTextareaTime Input

BreadcrumbMenubarNavigation MenuPaginationSegmented ControlStepperTabs

Alert dialogCommandContext MenuDialogDrawerMenuPopoverPreview CardSheetTooltip

AlertBadgeEmptyError StateMeterProgressSkeletonSpinnerStatus dotToast

Activity FeedAvatarAvatar GroupData TableListMetricOverflow ListProperty ListTableTokenTree

Area ChartBar ListCalendar HeatmapCategory ComparisonChart FrameChart LegendChart TooltipDistributionFunnelHeatmapMetric TrendPart-to-WholeProgress RingsRadar ChartRadial BarsSankey ChartScatter ChartScore GaugeTime Series

Diagram

AttachmentCarouselCode BlockLightboxMarkdownThumbnailTimestamp

Agent ThinkingApproval CardComposerConversationInline CitationMessageMessage ScrollerQuestion CardSourcesStreaming TextSuggestionTask ListTerminalTool Call

On this page

  • Preview
  • Usage
  • Examples
  • Visitors by source
  • Overlap
  • Percent
  • Loading
  • In a card
  • Recommendations
  • Usage boundaries
  • API reference

Charts

Area Chart

Plots several series over time as stacked, overlapping, or 100% areas, with one tooltip listing every series at the hovered time.

idle

Usage

import { AreaChart } from "@mizen-labs/ui";

Examples

Visitors by source

Stacked areas read as volume: each band adds to the total.

Overlap

Each series fills from zero so the series compare against each other.

Percent

Every time normalizes to 100%, so the chart reads as share.

Loading

While data loads, a placeholder holds the chart's space and keeps the legend. The data that replaces it wipes in.

In a card

MetricTrend frames the chart; the legend below it carries each series' total.

Recommendations

GuidancePractice
Do

Put the largest, steadiest series first so it forms the base of the stack. Keep series order and tones fixed when filters change.

Usage boundaries

GuidanceBoundary
Scope

Up to six series. Fold the rest into "Other" or split into small multiples; never generate a seventh hue.

Scope

Use stacked or percent only when the series add up to a meaningful whole. Compare unrelated measures in separate charts, never on two y-axes.

API reference

Public props from @mizen-labs/ui. Use exported prop types for the complete TypeScript contract.

PropTypeDefaultDescription
seriesreadonly { id: string; label: string; points: TimeSeriesPoint[]; tone?: ChartSeriesTone }[]RequiredUp to six series. Tones follow the fixed palette order unless set; a seventh series belongs in "Other".
layout"stacked" | "overlap" | "percent""stacked"stacked reads as volume, overlap compares series from zero, percent normalizes each time to 100%. Stacked and percent need the same times and no gaps in every series.
aria-label / timeZonestringRequiredNames the chart and the explicit timezone for displayed dates.
formatValue / formatAxisValue / locale(value: number) => string / stringLocale number formatting / "en-US"Formats tooltip values and value-axis labels; percent layout labels its axis as shares.
legendbooleantrueShows the series legend; set false when a surrounding card renders it.
PreviousTreeNextBar List
Visitors
86,500
+8.2%
JanFebMarAprMayJunJulAugSepOctNovDec02K4K6K8K10K12K
  • Organic47,900
  • Referral23,100
  • Paid15,500
JanFebMarAprMayJunJulAugSepOctNovDec02K4K6K8K10K
  • Organic
  • Referral
  • Paid
JanFebMarAprMayJunJulAugSepOctNovDec02K4K6K
  • Organic
  • Referral
  • Paid
JanFebMarAprMayJunJulAugSepOctNovDec0%20%40%60%80%100%
  • Organic
  • Referral
  • Paid
JanFebMarAprMayJunJulAugSepOctNovDec02K4K6K8K10K
  • Organic
  • Referral
  • Paid
Visitors
88,200
+8.2%
JanFebMarAprMayJunJulAugSepOctNovDec02K4K6K8K10K
  • Organic48,900
  • Referral23,500
  • Paid15,800