Chart & Visualization Issues

Create a Sunburst or Stacked Bar Chart in ASP.NET MVC

Nimra MalikNimra Malik Nov 20, 2026 869 views

Question details

Create a hierarchical chart that displays countries and their medal categories in an ASP.NET MVC application.

Create a Sunburst or Stacked Bar Chart in ASP.NET MVC
Product
ASP.NET MVC
Device & OS
not provided
Scenario
A developer wants to show countries in an inner ring and medal categories in an outer ring.
Observed behavior
A multi-level chart should represent the country-to-medal hierarchy, although a chart with many slices may be difficult to read.
Before you start

Organize the data by country, medal category, and medal count. Check that your ASP.NET MVC charting library supports sunburst charts or nested doughnut series.

Solution 1Recommended

Build a Sunburst Chart in an ASP.NET MVC View

Use a sunburst chart to display countries and medal categories as hierarchical rings.

A sunburst chart uses parent-child relationships: country nodes form the inner level, and medal-category nodes form the outer level.

1
Prepare the hierarchy

In your controller or view model, create a unique ID for each country and a child node for each medal category. Give each child the country ID as its parent and the medal count as its value.

2
Add a chart library

In the MVC view, add a chart container and load a library that supports sunburst charts. For example, Highcharts requires its core script and sunburst module.

3
Configure the chart

Pass the hierarchy from the controller to the view as JSON, then initialize the chart in a script with a sunburst series and the node data.

4
Improve readability

Set consistent colors for Gold, Silver, and other medal-category nodes. Enable data labels and, if the library supports them, outside labels or callouts; use tooltips for details that do not fit.

Build a Sunburst Chart in an ASP.NET MVC View
Check library requirements: Chart configuration and licensing vary by library. Consult your library's documentation for its sunburst options and usage terms.
Free Microsoft Office alternative

Compare Medal Counts in WPS Spreadsheets

For spreadsheet-based comparisons, WPS Office is a free, lightweight alternative with a familiar interface and support for Excel files, making it easy to move existing data. It does not replace a charting library in an ASP.NET MVC application.

Create stacked bar charts to compare medal counts by countryOpen and edit Microsoft Excel XLS and XLSX filesUse a familiar spreadsheet interface for existing Office workflowsWork with a free, lightweight Office alternative
microsoft office alternative - wps office

Frequently Asked Questions

How should I structure data for a sunburst chart?

Create a node for each country with a unique ID, then add medal-category nodes that reference the country ID as their parent. Store the medal count on each category node.

Can I use a nested doughnut chart instead of a sunburst?

Yes, if your chart library supports multiple doughnut series or nested rings. Configure the inner ring for countries and the outer ring for medal categories, ensuring the slices align with their parent countries.

What can I do if the chart has too many labels?

Use the chart library's data-label options to show outside labels or callouts where supported, and place less essential details in tooltips. A stacked bar chart can also make comparisons easier.

Does WPS Office create the chart inside my ASP.NET MVC application?

No. WPS Spreadsheets can create spreadsheet charts, but an ASP.NET MVC page needs a web charting library to render an interactive chart in the application.