Visualizing hierarchical data in a compact, three‑dimensional format can dramatically improve the readability of business reports. The Conical Bar Stacked chart type provides a 3‑D cone‑shaped bar where each segment of the bar represents a data series, making it ideal for comparing cumulative values across categories.
In this guide you will discover how to create a Conical Bar Stacked chart in an Excel workbook using C# and Aspose.Cells for .NET. The code snippets are complete, well‑commented, and can be compiled and executed without any modifications.
This article covers the following topics:
- C# Excel Library to Create Conical Bar Stacked Charts
- Create a Conical Bar Stacked Chart in Excel using C#
- Free License
- Additional Resources
- Conclusion
- See Also
C# Excel Library to Create Conical Bar Stacked Charts
Aspose.Cells for .NET is a comprehensive Excel manipulation library that enables developers to create, modify, and render Excel files without requiring Microsoft Office. It fully supports the Conical Bar Stacked chart type (ChartType.ConicalBarStacked) along with millions of other chart styles.
Key benefits of using Aspose.Cells for chart generation:
| Feature | Benefit |
|---|---|
| Rich API | Full access to chart properties, series, axes, and formatting. |
| No COM Interop | Works on any server‑side .NET environment (Windows, Linux, Docker). |
| High Performance | Handles large workbooks and datasets efficiently. |
| Multiple Formats | Save to XLSX, XLS, CSV, PDF, HTML, image formats, etc. |
Getting Started
Download the latest release from the Aspose.Cells releases page.
Install via NuGet:
PM> Install-Package Aspose.CellsAdd a reference to
Aspose.Cellsin your project.
Now you are ready to create a Conical Bar Stacked chart.
Create a Conical Bar Stacked Chart in Excel using C#
Below are two practical examples:
- Example 1 – Build a Conical Bar Stacked chart from scratch.
- Example 2 – Modify an existing chart (change colors, add data labels, and export to PDF).
Both examples are fully runnable.
Example 1: Build a Conical Bar Stacked Chart from Scratch
Explanation of key steps
| Step | What it does |
|---|---|
| 1‑2 | Creates a workbook and writes sample data. |
| 3 | Adds a ConicalBarStacked chart object to the worksheet. |
| 4 | Adds three data series (Q1‑Q3) that will be stacked inside the cone. |
| 5 | Sets titles for category and value axes and positions tick labels. |
| 6 | Applies a built‑in chart style (Style9). |
| 7 | Saves the workbook both as an XLSX file and as a PNG image for quick preview. |
Running the program produces ConicalBarStacked_Chart.xlsx (editable in Excel) and ConicalBarStacked_Chart.png (a snapshot of the chart).
Example 2: Update an Existing Conical Bar Stacked Chart (Styling & Export)
This example shows how to load an existing workbook, locate the chart, change its color palette, add data labels, and export the chart to a PDF document.
What this example demonstrates
- Loading an existing workbook with
Workbook(string). - Accessing a chart via
sheet.Charts[index]. - Customizing series colors using
Area.ForegroundColor. - Enabling and configuring data labels (
HasDataLabel,DataLabel.Position). - Exporting the workbook to PDF using
SaveFormat.Pdf.
Get a Free License
Aspose.Cells requires a license for full functionality. You can obtain a temporary free license for evaluation from the Aspose temporary license page. Apply the license at the start of your application:
License license = new License();
license.SetLicense("Aspose.Total.NET.lic"); // Path to your .lic file
Using a license removes evaluation watermarks and unlocks all features.
Conical Bar Stacked Chart: Free Resources
Continue mastering Aspose.Cells with these official assets:
- 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/
Conclusion
Creating a Conical Bar Stacked chart with Aspose.Cells for .NET is straightforward. The library offers a clean, fluent API to populate data, configure chart properties, apply styling, and export to multiple formats—all without Microsoft Office. Whether you are generating financial dashboards, sales reports, or any hierarchical visualization, the Conical Bar Stacked chart adds a modern, three‑dimensional touch to your Excel output.
If you run into any challenges or have further questions, feel free to post on the Aspose.Cells support forum.