Visualizing data that contains a few dominant categories and many small ones can be challenging. A Pie of Pie chart helps by separating the smaller slices into a secondary pie, making the overall picture clearer. In this post you’ll discover how to generate such a chart in Excel programmatically using Aspose.Cells for .NET and C#.
This article covers the following topics:
- C# Excel Library to Create Pie of Pie Charts
- Create a Pie of Pie Chart in Excel using C#
- Free License
- Free Resources
- Conclusion
- See Also
C# Excel Library to Create Pie of Pie Charts
Aspose.Cells for .NET is a powerful Excel manipulation library that eliminates the need for Microsoft Office automation. It provides a rich set of APIs for creating, modifying, and styling charts—including specialized chart types such as Pie of Pie.
Key benefits of using Aspose.Cells:
- Comprehensive API – Full control over workbook structure, data, and visual elements.
- Advanced Chart Customization – Change chart types, split criteria, explode slices, and more.
- High Performance – Process large spreadsheets quickly and efficiently.
- Multi‑Format Support – Work with XLSX, XLS, CSV, PDF, ODS, and many other formats.
Getting Started
Download the library from the official releases page.
Install the NuGet package:
PM> Install-Package Aspose.Cells
Now you are ready to build pie‑of‑pie charts programmatically.
Create a Pie of Pie Chart in Excel using C#
Below is a complete, runnable examples that demonstrate how to generate a Pie of Pie chart from scratch and how to modify an existing chart. This example creates a new workbook, fills it with sample data, adds a Pie of Pie chart, and saves the file.
What the code does
| Step | Description |
|---|---|
| 1 | Instantiates a Workbook and retrieves the first worksheet. |
| 2 | Writes a small data set that will be visualized. |
| 3 | Adds a chart placeholder of type PiePie (required as the base type). |
| 4 | Links the chart to the data range and gives the series a friendly name. |
| 5 | Persists the workbook to an XLSX file. |
Opening PieOfPieChart_Output.xlsx will show a primary pie with the large categories (A, B, C) and a secondary pie containing D and Others.
Get a Free License
To try Aspose.Cells without restrictions, obtain a temporary license from the Aspose free temporary license page. The license removes evaluation watermarks and unlocks the full API surface.
// Example of applying a temporary license.
var license = new Aspose.Cells.License();
license.SetLicense("Aspose.Cells.lic"); // Path to your temporary license file.
Free Resources
Enhance your Excel automation skills with these free resources:
- Developer’s guide – https://docs.aspose.com/cells/net/
- Online demo & editor – https://products.aspose.app/cells/family
- API reference – https://reference.aspose.com/cells/net/
- How‑to articles & blog posts – https://blog.aspose.com/categories/aspose.cells-product-family/
Conclusion
A Pie of Pie chart is an effective way to highlight both dominant and minor data categories in a single visual. With Aspose.Cells for .NET you can generate and tailor such charts entirely in code, eliminating the need for manual Excel work. The examples above provide a solid foundation—feel free to adapt the data sources, split criteria, and styling to match your specific reporting needs.
If you require assistance, our community forums and support teams are ready to help:
- Free support forum – https://forum.aspose.com/c/cells/9
Happy coding!