Visualizing hierarchical information—such as organizational structures, product categories, or file system layouts—becomes much clearer with a Sunburst chart. In this article we will demonstrate how to create a Sunburst chart in an Excel workbook using Aspose.Cells for .NET. The example is fully runnable, requires only the Aspose.Cells NuGet package, and can be adapted to any hierarchical dataset.
This article covers the following topics:
- C# Excel Library to Create Sunburst Charts
- Create a Sunburst Chart in Excel using C#
- Free License
- Sunburst Chart Excel: Free Resources
- Conclusion
- See Also
C# Excel Library to Create Sunburst Charts
Aspose.Cells for .NET is a powerful Excel automation library that removes the need for Office interop. It provides a clean, object‑oriented API for creating, modifying, and styling charts, including the Sunburst chart introduced in Excel 2016.
Key reasons to choose Aspose.Cells for Sunburst chart generation:
- Comprehensive API – Full access to chart types, data series, and formatting options.
- No Excel installation required – Works in server‑side, cloud, or container environments.
- Cross‑format support – Save to XLSX, XLS, CSV, PDF, PNG, and more.
- High performance – Efficient handling of large workbooks and data sets.
Getting Started
- Download the library from the Aspose.Cells releases page.
- Install via NuGet:
PM> Install-Package Aspose.Cells
- Add a reference to
Aspose.Cellsin your C# project.
Create a Sunburst Chart in Excel using C#
Below is a complete, self‑contained C# example that demonstrates how to create a Sunburst chart in Excel.
Explanation of key steps
| Step | Purpose |
|---|---|
| 2 | Hierarchical data is arranged in columns where the leftmost column represents the outermost ring (Category) and the rightmost numeric column holds values. |
| 3 | ChartType.Sunburst creates the required chart type. |
| 4 | SetChartDataRange links the data range to the chart; the flag true tells Aspose.Cells that the range includes both categories and values. |
| 5 | Optional appearance tweaks (background fill, legend position). |
| 6 | Saves the workbook in XLSX format, ready for further processing or export to PDF/PNG. |
Get a Free License
Aspose offers a temporary free license that removes evaluation limitations. Visit the temporary license page to request your license key. Apply it to your application as shown:
License license = new License();
license.SetLicense("Aspose.Total.lic"); // Path to your temporary license file
Sunburst Chart Excel: Free Resources
- Developer’s guide – https://docs.aspose.com/cells/net/
- Online demo & converter – https://products.aspose.app/cells/family
- API reference – https://reference.aspose.com/cells/net/
- How‑to articles – https://blog.aspose.com/categories/aspose.cells-product-family/
Conclusion
Creating Sunburst charts programmatically is straightforward with Aspose.Cells for .NET. The library handles data hierarchy, chart type selection, and styling without requiring Microsoft Excel on the server. Use the provided examples as a foundation, adapt the data source to your domain, and leverage Aspose’s extensive API to produce polished, export‑ready visualizations.
For further assistance, feel free to ask questions on the Aspose.Cells free support forum.