Visualizing hierarchical or cumulative data often calls for a stacked bar chart with a 3‑D look. Aspose.Cells for .NET makes it straightforward to generate a Cylindrical Bar Stacked chart directly from code. Whether you are building a financial dashboard, a sales‑by‑region report, or any other stacked‑bar scenario, the following guide will walk you through creating, customizing, and saving the chart using C#.

This article covers the following topics:

C# Excel Library to Create Cylindrical Bar Stacked Charts

Aspose.Cells for .NET is a comprehensive Excel manipulation library that eliminates the need for Microsoft Office automation. It provides a rich set of charting APIs, including the CylindricalBarStacked type, which renders stacked bar series as 3‑D cylinders.

Key benefits of using Aspose.Cells for chart creation:

  • Full .NET Integration – Works with .NET 6+, .NET Framework, and .NET Core.
  • No Office Dependency – Runs on servers, containers, and CI/CD pipelines without Office installed.
  • High Performance – Handles large workbooks and complex charts efficiently.
  • Multiple Format Support – Save to XLSX, XLS, CSV, PDF, PNG, JPEG, and more.

Getting Started

  1. Download the latest Aspose.Cells for .NET from the releases page.

  2. Add the library to your project via NuGet:

    PM> Install-Package Aspose.Cells
    

Now you are ready to create a Cylindrical Bar Stacked chart programmatically.

Create a Cylindrical Bar Stacked Chart in Excel using C#

Below is a complete, compilable C# example that demonstrates:

  1. Creating a new workbook.
  2. Populating sample data.
  3. Adding a CylindricalBarStacked chart.
  4. Customizing series, axes, and appearance.
  5. Saving the workbook to an XLSX file.

Explanation of the Code

StepWhat the code does
1Creates an empty workbook and retrieves the first worksheet.
2Populates the worksheet with sample sales data for four regions and three products.
3Adds a CylindricalBarStacked chart positioned below the data table.
4Adds three series, one for each product, and links them to the corresponding data range.
5Sets the category (X‑axis) labels to the region names.
6Demonstrates common visual tweaks: border, plot‑area formatting, legend placement, and axis titles.
7Saves the workbook to an XLSX file that can be opened in Excel, Google Sheets, or any compatible viewer.

Running the program generates CylindricalBarStackedChart_Output.xlsx containing a 3‑D stacked cylindrical bar chart that visually aggregates product sales per region.

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. The license file can be applied in your code as shown in the license documentation.

Free Resources

Conclusion

Creating a Cylindrical Bar Stacked chart with Aspose.Cells for .NET is a matter of a few lines of code. The library abstracts the complexity of Excel chart objects while giving you full control over data, layout, and visual styling. Use the example above as a starting point and adapt it to your own reporting requirements—whether you need to feed the chart from a database, apply conditional formatting, or export the result to PDF or an image.

If you encounter any challenges or have questions, feel free to post them on our free support forum.

See Also