Part-whole

Pie, donut, treemap and sunburst for categorical and hierarchical shares.

Import @texuli/charts/part-whole· Components: PieChart, DonutChart, TreemapChart, SunburstChart

Quarterly revenue mix in millions (fictional Example Co.).

Data contract

FieldTypeRequiredNotes
titlestringyes—
descriptionstringyes—
dataPartWholeDatum[]—Flat slices: { id, label, value } — pie and donut
rootPartWholeTree—Hierarchy: { id, label, value? | children[] } — treemap and sunburst
labelsPartWholeTableLabels—Table chrome copy

Part-whole examples

Revenue mix

Platform is the largest share, followed by services, support and other.

  • Platform
  • Services
  • Support
  • Other
Open data table
Revenue mix
CategoryValue
Platform42
Services28
Support18
Other12

Revenue share

The same revenue mix with the total in the center.

  • Platform
  • Services
  • Support
  • Other
Open data table
Revenue share
CategoryValue
Platform42
Services28
Support18
Other12

Revenue by team

Area encodes each product and service revenue amount.

Revenue by teamArea encodes each product and service revenue amount.
  • Platform
  • Support
  • Implementation
  • Training
Open data table
Revenue by team
CategoryValue
Harbor Notes100
Product60
Platform42
Support18
Services40
Implementation24
Training16

Revenue hierarchy

Inner ring groups product and services; outer ring shows their parts.

Revenue hierarchyInner ring groups product and services; outer ring shows their parts.
  • Product
  • Platform
  • Support
  • Services
  • Implementation
  • Training
Open data table
Revenue hierarchy
CategoryValue
Harbor Notes100
Product60
Platform42
Support18
Services40
Implementation24
Training16