6.2.3 Advanced Pie Chart
Last updated
Last updated
In chapter 2, we discussed why the pie chart is easy to be messed up. Here is another example. When the observations are more than 5, the pie chart will become hard to read or deliver information. You should be very careful before using it.
Let's start with a simple donut chart.
This donut chart is not sweet enough, we can add some customization to make it look better. For example,
change the color set
make the font size bigger update_traces
make the donut hole bigger hole
cut a slice out pull
put the legend closer to the donut update_layout
Sunburst plots visualize hierarchical data spanning outwards radially from root to leaves. It looks fancy and stylish, however, it could be even messer than a pie chart. Be careful!