- 382.3K All Categories
- 2.1K Data
- 208 Big Data Appliance
- 1.9K Data Science
- 447.9K Databases
- 220.9K General Database Discussions
- 25 Multilingual Engine
- 522 MySQL Community Space
- 465 NoSQL Database
- 7.8K Oracle Database Express Edition (XE)
- 2.9K ORDS, SODA & JSON in the Database
- 490 SQLcl
- 3.9K SQL Developer Data Modeler
- 186.1K SQL & PL/SQL
- 21K SQL Developer
- 293.2K Development
- 7 Developer Projects
- 128 Programming Languages
- 289.9K Development Tools
- 96 DevOps
- 3K QA/Testing
- 645.6K Java
- 24 Java Learning Subscription
- 36.9K Database Connectivity
- 150 Java Community Process
- 104 Java 25
- 22.1K Java APIs
- 137.9K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 16 Java Essentials
- 144 Java 8 Questions
- 85.9K Java Programming
- 79 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.2K Java SE
- 13.8K Java Security
- 198 Java User Groups
- 260 LiveLabs
- 36 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.8K Other Languages
- 2.3K Chinese
- 166 Deutsche Oracle Community
- 1.2K Español
- 1.9K Japanese
- 226 Portuguese
Parts of a Whole: Visualizations for Percentage Data Sets
Continuing the theme of introducing the JET data visualizations, this post describes several options for displaying percentage data sets, along with best practices for each. We'll be using a data set from https://analytics.usa.gov/ describing browser usage by visitors to US executive branch government domains on November 9th, 2015. If you haven't visited that site, I strongly recommend it as it successfully shows visitor data across several dimensions (time of day, location, browser, top pages visited) without being overwhelming or confusing.
The Basics: Pie, Donut, and Treemap
For non-hierarchical data, any of these components can be a good choice. Some guidelines for choosing which to use:
- Most Familiar: Pie chart
- Modern UI: A matter of preference, but donut charts are especially common nowadays.
- Best for Larger Data Sets: Treemap. The default layout makes nodes as square as possible, making it easier to identify the colors than on the thin slices of pie or donut.
- Best for Small Values: If small values are important, then there's a good chance that none of the visualizations in this post are best, since each focuses attention to the largest values. Consider using a bar chart or list of values instead, since they would assign equal space to small values.
Note: Sunburst can also be also be used in place of donut or pie, but it is optimized for hierarchical data.
Hierarchical Data Sets: Treemap and Sunburst
Treemap and sunburst are designed to display hierarchical data sets. If viewing the data at each level of the hierarchy is important, then sunbursts are preferred. If focusing on the leaf nodes, then treemaps are preferred since they minimize the space used to display information for the hierarchy (the group headers).
Specializations: Funnel Chart
If the data represents stages in a process, and especially if the population decreases for subsequent stages, then funnel charts are a popular choice. In the example below, I've used different colors so that it's obvious that the funnel is showing different data than the rest of the page.
Note: It's important to be aware that understanding relative or even absolute size is much harder on a funnel than on other visualizations. Consider using a bar chart instead.
Small Multiples and Small Form Factor
Treemaps, pies, and donuts can also be used effectively in small form factors, such as in table cells or as mashups on other data visualizations:
- Totals Vary Between Instances: Varying the component size, such as treemap width, can be used to visualize the difference in total counts. In table cells, this works best for treemaps since the row heights would not increase.
- Labeling: The donut chart is especially effective for small multiples, as it doesn't require an exterior label. The browser usage stats didn't vary enough by day for it to make sense with this data set, but one option would have been to show a donut representing the distribution for each day of data.
- Donut vs Pie: If neither of the above apply, then pies are probably better as it's easier to read their values. Compare the pie and donut below to see this.
How To: For treemap, make sure to set layout to sliceAndDiceHorizontal and the div style to border: none to get the above. For the charts, simply set the size in the div style.