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.
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
| Property | Attribute | Description | Type | Default |
|---|---|---|---|---|
centerLabel | center-label | Caption under the total in the centre of the donut. Empty hides the total. | string | 'Total' |
colorScheme | color-scheme | Color scheme: semantic (data palette) or mono (greys) | "mono" | "semantic" | 'semantic' |
display | display | Show raw value or percentage | "percent" | "value" | 'value' |
legend | legend | Show legend | boolean | true |
size | size | Diameter in pixels | number | 200 |
slices | slices | Array or JSON string of slices | PieSlice[] | string | [] |
thickness | thickness | Ring thickness as a fraction of the radius (0.2–1). 1 draws a full pie; the default 0.4 draws a donut. | number | 0.4 |
Built with StencilJS