Visualizing proportional data with a clear distinction between categories is a common requirement for business reports, dashboards, and presentations. An exploded doughnut chart emphasizes each segment by slightly separating it from the rest of the ring, improving readability and visual impact. In this guide you will learn how to generate a DoughnutExploded chart in Excel using C# and Aspose.Cells for .NET.
The article covers:
- C# Excel Library to Create DoughnutExploded Charts
- Create a DoughnutExploded Chart in Excel using C#
- Free License
- Additional Resources
- Conclusion
- See Also
C# Excel Library to Create DoughnutExploded Charts
Aspose.Cells for .NET is a comprehensive Excel manipulation library that enables developers to create, edit, and render Excel files without requiring Microsoft Office. Its rich charting API supports every chart type available in Excel, including the DoughnutExploded chart.
Key advantages of using Aspose.Cells:
- Full‑featured API – Access worksheets, cells, formulas, styles, pictures, and all chart types.
- No Office dependency – Works on Windows, Linux, Docker, and Azure environments.
- High performance – Handles large workbooks with millions of rows efficiently.
- Multiple format support – Read/write XLSX, XLS, CSV, ODS, PDF, HTML, and image formats.
Getting Started
- Download the latest release 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 DoughnutExploded Chart in Excel using C#
Below is a complete, ready‑to‑run example that demonstrates how to:
- Create a new workbook.
- Populate sample data.
- Insert a DoughnutExploded chart.
- Customize the chart title, series names, and explode effect.
- Save the workbook to an XLSX file.
Explanation of Key Steps
| Step | Purpose |
|---|---|
| Create Workbook | Starts a fresh Excel file. |
| Populate Data | Supplies the categories and numeric values that the chart visualizes. |
| Add Chart | ChartType.DoughnutExploded creates an exploded doughnut chart. |
| Define Series | Links the chart to the data range and sets the series name. |
| Explode Specific Slice | The Explode property (0‑100) controls the offset of each slice; in the example the “Electronics” slice is highlighted. |
| Customize Appearance | Demonstrates how to hide the plot area background and show percentage labels. |
| Save | Writes the workbook to disk (.xlsx). |
Running the code above produces an Excel file with a vibrant DoughnutExploded chart that clearly separates the “Electronics” segment, making it stand out for presentations or reports.
Get a Free License
Aspose.Cells requires a license for full functionality. You can obtain a temporary free license for evaluation:
- Visit the Aspose temporary license page.
- Follow the instructions to download the
.licfile. - Load the license in your application before using the library:
License license = new License();
license.SetLicense("Aspose.Cells.lic");
Using a license removes evaluation watermarks and unlocks all charting features.
DoughnutExploded Chart Excel: Free Resources
Explore more learning material to master Aspose.Cells:
- Developer’s Guide – https://docs.aspose.com/cells/net/
- Online Demo & Apps – 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/
- Sample Code Repository – https://github.com/aspose-cells/Aspose.Cells-for-.NET
Conclusion
Creating a DoughnutExploded chart with Aspose.Cells for .NET is straightforward and fully programmatic. The library’s rich chart API lets you control every aspect—from data binding to slice explosion—without needing Microsoft Office. Integrate the provided code into your reporting engine to deliver professional‑looking visualizations instantly.
For any questions, troubleshooting, or feature requests, feel free to join the community at the Aspose.Cells Forum.