Introduction
Cone charts are a powerful way to visualize a single series of data where the magnitude of each data point is represented by the size of a cone. They are especially useful in dashboards, financial reports, and presentations where a distinctive 3‑D effect adds visual impact.
In this guide you will learn how to create a Cone chart in an Excel workbook using C# and Aspose.Cells for .NET. The article covers:
- Setting up the Aspose.Cells library
- Preparing sample data
- Adding a Cone chart to a worksheet
- Customising chart titles, axes, and formatting
- Saving the workbook to various formats
All code snippets are complete, compile‑ready, and follow .NET best practices.
C# Excel Library to Create Cone Chart
Aspose.Cells for .NET is a fully managed Excel manipulation API that enables developers to create, edit, and render Excel files without requiring Microsoft Office. It offers native support for a wide variety of chart types, including Cone and Cone3D charts.
Key benefits for chart creation
| Feature | Benefit |
|---|---|
| Rich Chart Type Support | Over 30 chart types, including Cone, Cone3D, Pyramid, and more |
| Full Formatting API | Control fonts, colors, borders, legends, and axis properties programmatically |
| High Performance | Process large datasets quickly and efficiently |
| Cross‑Platform | Works on Windows, Linux, and macOS with .NET Core / .NET 6+ |
Installation
PM> Install-Package Aspose.Cells
Or via the .NET CLI:
dotnet add package Aspose.Cells
Create a Cone Chart in Excel using C#
The following example creates a simple 2‑D Cone chart that shows quarterly sales figures.
Explanation of key steps
| Step | Purpose |
|---|---|
| 1‑2 | Create workbook & fill data |
| 3 | Add a chart of type ChartType.Cone |
| 4 | Define the series range (B2:B5) and set the series name |
| 5 | Set axis titles, number format, and a custom fill colour |
| 6 | Persist the file (.xlsx) |
Running the code generates ConeChart_Basic.xlsx, which contains a clean 2‑D cone chart visualising quarterly sales.
Get a Free License
Explore Aspose products with a temporary free license – no credit‑card required. Obtain it from the Aspose temporary license page and unlock all features for development and testing.
Cone Chart Excel: Free Resources
- Developer’s Guide – https://docs.aspose.com/cells/net/
- Online 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/