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
  • Support channel share
  • Quarterly budget mix
  • Recommendations
  • Usage boundaries
  • API reference

Charts

Part-to-Whole

Shows caller-ordered non-negative parts as a labeled whole, with a complete legend and safe normalization.

idle

Usage

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

Examples

Support channel share

A part-to-whole chart with percentage formatting.

Quarterly budget mix

Recommendations

GuidancePractice
Do

Name the whole and each part. Use a deliberate part order and keep the complete legend visible.

Usage boundaries

GuidanceBoundary
Scope

Use non-negative parts from the same total. Use Category Comparison for signed or independent values.

API reference

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

PropTypeDefaultDescription
partsreadonly PartToWholePart[]RequiredProvides caller-ordered labeled parts with stable unique IDs and finite non-negative raw values.
PartToWholePart{ id: string; label: string; value: number }—Uses each value to calculate its share of the whole; the component does not infer or round source values.
aria-labelstringRequiredNames the chart and its empty state.
locale / formatValuestring / (value: number) => string"en-US" / Locale number formattingFormats raw values and displayed shares. Zero values remain in the legend without a chart arc.
PreviousMetric TrendNextProgress Rings
Support requests
2,675
-4.1%
2,675Requests
  • Email 1,284 48%
  • Chat 856 32%
  • Phone 535 20%
Share of support requests by channel.
2,675Requests
  • Email 1,284 48%
  • Chat 856 32%
  • Phone 535 20%

Quarterly budget mix

Planned allocation · USD

Total budget
$100,000
Five cost categories
$100,000Total
  • Payroll $52,000 52%
  • Infrastructure $21,000 21%
  • Research $15,000 15%
  • Operations $9,000 9%
  • Reserve $3,000 3%