Sunburst charts with Plotly Dash

Sunburst charts with Plotly Dash

Introduction: A sunburst chart is suitable when there is hierarchical data to be presented visually. The data for the sunburst chart presented in this video is on the theme of diamonds. Specifically, the 4 elements of diamond quality are represented visually as the 4 Cs. This is a sunburst chart created with Plotly Express. Displaying all hierarchical levels of data may be appropriate when an overview is required. Displaying all hierarchical levels may also be appropriate when the dataset is small. For larger datasets, it might be better to break up a sunburst chart into multiple charts. Plotly labels reordering issue: https://github.com/plotly/plotly.js/p... Key code snippets: Single sunburst chart: color = 'metric', # metric is the data column containing the top level labels color_discrete_sequence = ['#3367ff', '#745600', '#FFBD00', '#00ffee', 'white'], Multiple sunburst charts: color_discrete_sequence = ['#71d9bb', '#71c3d9'] # color attribute is not used Styling hint: For color styling sunburst chart for categorical data, try various combinations of the attribute ‘color’ and the attribute ‘color_discrete_sequence’. Data created based on information on website: https://www.gemsociety.org/