Visualizing hierarchical or comparative data with a three‑dimensional appearance can make reports much more engaging. The Cone Stacked chart is a 3‑D chart type that stacks data series on a cone shape, helping you highlight proportional relationships while adding visual depth. In this guide you will learn how to create a Cone Stacked chart in Excel programmatically with C# and Aspose.Cells for .NET.

This article covers the following topics:

C# Excel Library to Create Cone Stacked Charts

Aspose.Cells for .NET is a powerful API that enables developers to create, edit, and render Excel files without Microsoft Office. It offers complete support for a wide range of chart types—including the Cone Stacked chart—through a clean, object‑oriented API.

Key benefits of using Aspose.Cells for chart creation:

FeatureBenefit
Comprehensive APIAccess every Excel feature from cells to advanced charts.
High PerformanceManipulate large workbooks efficiently.
No Office DependencyWorks on any platform that supports .NET.
Multiple Output FormatsSave as XLSX, XLS, PDF, PNG, JPEG, etc.

Getting started is easy:

PM> Install-Package Aspose.Cells

Or download the latest release from the Aspose.Cells .NET releases page.

Create a Cone Stacked Chart in Excel using C#

Below is a complete, ready‑to‑run C# console application that:

  1. Creates a new workbook.
  2. Populates sample data.
  3. Adds a Cone Stacked chart.
  4. Customizes the chart title, axes, and legend.
  5. Saves the workbook to disk.

Tip – The chart type is defined by ChartType.ConeStacked. For a 100 % stacked version use ChartType.ConeStacked100.

Explanation of the Code

StepWhat the code does
1Instantiates a new Workbook and references the first Worksheet.
2Writes a header row and four rows of quarterly sales data for three products.
3Adds a Cone Stacked chart (ChartType.ConeStacked) to the worksheet.
4Creates three series—one for each product—using the range of its sales values.
5Sets the category (X‑axis) to the quarter names, shows the legend, and adds axis titles.
6Saves the workbook as an XLSX file.

Run the program, open the produced ConeStackedChart_Output.xlsx, and you will see a three‑dimensional Cone Stacked chart that clearly visualizes the proportional contribution of each product per quarter.

Free Resources

Conclusion

The Cone Stacked chart is an effective way to present stacked data with a visually appealing 3‑D effect. Using Aspose.Cells for .NET, you can generate such charts programmatically in a few lines of C# code, fully customize their appearance, and export them to any supported format. The example above provides a solid foundation that you can adapt to your own data sets and reporting requirements.

If you need assistance, feel free to ask questions on the Aspose.Cells support forum or reach out via our contact channels.

See Also