Shipfaster: UI Components
Pie Chart
Overview
A pie chart is a visual tool that represents the composition of a whole by dividing it into slices. Each slice corresponds to a category. Its size is proportional to the quantity or percentage it represents. Pie charts provide an immediate visual impact for comparative analysis of parts-to-whole relationships and are widely used in business and media to simplify data presentation.
When to use
- When you want to illustrate the percentage distribution or proportional data of a small number of categories.
- When the total of all the segments equals 100% and you're showing how individual portions compare to the whole.
- When the data set is simple and has no more than five to six categories to prevent the chart from becoming cluttered and hard to read.
Anatomy
- Title: A brief heading that explains what the pie chart measures.
- Data Number: Represents the central value or total sum that the pie chart segments are a part of. It provides a contextual benchmark for the data displayed.
- Slices: The individual sections of the pie chart, each representing a data category.
- Legend: A key that explains what the colors or patterns in the pie chart correspond to if labels are not included on the slices.
- Labels: Text elements that denote what each slice represents, often including the percentage or value.
Best Practices
- Limit the number of slices: Too many slices can make the chart hard to read and understand, especially if some slices are much smaller than others.
- Use contrasting colors: This helps to differentiate the slices easily.
- Avoid using pie charts for detailed comparisons: They are best for visualizing simple composition and not for comparing individual sections to each other.
- Label clearly: Include direct labeling or a clear legend to ensure that the information is accessible to all users.
- Consider alternatives for complex data: If your data is too complex for a pie chart to be clear, consider a bar chart or stacked bar chart as an alternative.
Recommended resources
Get instant access to over 6,000 Figma Components with Shipfaster UI. A Figma UI Kit & Design system used by over 2,000 designers.