eds-pie

Explore the Interactive Component

Use the playground below to experiment with the component. Click the button to view the full Storybook deployment for additional examples and configurations.

eds-pie Open in Storybook

See It in Use with Code

Check out this practical implementation of component.

When you’re using the component directly in HTML (or in frameworks that don’t support property binding), you must pass the values like:

In React

Pie Chart Color Palettes

Our <eds-pie> component supports two built-in color schemes. Colors are applied in order from highest to lowest value:

  • Semantic (9 colors)
  • Mono (9 colors)

Overview

EdsPie shows parts of a whole as a donut (default) or a full pie. Slices take the semantic data palette in contrast order and are separated by small gaps; the donut shows the total in the centre and the legend lists every slice with its value or percentage.

Properties

PropertyAttributeDescriptionTypeDefault
centerLabelcenter-labelCaption under the total in the centre of the donut. Empty hides the total.string'Total'
colorSchemecolor-schemeColor scheme: semantic (data palette) or mono (greys)"mono" | "semantic"'semantic'
displaydisplayShow raw value or percentage"percent" | "value"'value'
legendlegendShow legendbooleantrue
sizesizeDiameter in pixelsnumber200
slicesslicesArray or JSON string of slicesPieSlice[] | string[]
thicknessthicknessRing thickness as a fraction of the radius (0.2–1). 1 draws a full pie; the default 0.4 draws a donut.number0.4

Built with StencilJS