Visualizing hierarchical data in a compact, space‑saving layout is often required for executive dashboards and reporting. A PyramidBar100PercentStacked chart displays multiple data series as stacked bars that occupy a normalized 100 % width, forming a pyramid shape. In this guide you’ll discover how to create such a chart in an Excel workbook using Aspose.Cells for .NET and C#.

This article covers the following topics:

C# Excel Library to Create PyramidBar100PercentStacked Charts

Aspose.Cells for .NET is a robust library that enables developers to create, modify, and render Excel files without Microsoft Excel installed. It fully supports the PyramidBar100PercentStacked chart type, providing the following advantages:

  • Rich API – Manipulate workbooks, worksheets, cells, charts, and styles programmatically.
  • High‑Performance – Process large workbooks efficiently.
  • Full Format Support – XLSX, XLS, CSV, PDF, HTML, and image formats.
  • Extensive Customization – Fine‑tune chart appearance, axes, legends, data labels, 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 PyramidBar100PercentStacked chart.

Create a PyramidBar100PercentStacked Chart in Excel using C#

Below are two complete examples that demonstrate how to generate the chart and how to apply common customizations.

Simple Pyramid Bar 100 % Stacked Chart

The following code creates a workbook, fills it with sample data, adds a PyramidBar100PercentStacked chart, and saves the file as PyramidBar100PercentStacked.xlsx.

Explanation of key steps

StepPurpose
2‑3Create workbook, add sample data.
4Add a chart of type PyramidBar100PercentStacked.
5‑6Define three series (Q1–Q3) and bind category labels (Region).
7Persist the workbook to disk.

Running the program produces an Excel file where the stacked bars for each region fill the full width (100 %), forming a pyramid visual.

Customizing the Pyramid Bar Chart

The chart can be refined further—e.g., change colors, enable data labels, and adjust axis formatting. The snippet below builds on the previous example and demonstrates common customizations.

What this example adds

  • Data Labels – Values are displayed inside each stacked segment (HasDataLabels = true).
  • Series Colors – Custom RGB colors make the chart easier to read.
  • Axis Formatting – Percentage format for the value axis and removal of tick marks on the category axis.
  • Legend Position – Placed at the bottom for better layout.

Feel free to tweak colors, fonts, or add a trend line—Aspose.Cells offers full control over every chart element.

Free License

Aspose provides a 30‑day temporary license that removes evaluation watermarks and enables the full feature set. Obtain it from the temporary license page and apply it as shown:

// Apply a temporary license
var license = new Aspose.Cells.License();
license.SetLicense("Aspose.Cells.lic");   // Path to your .lic file

Free Resources

Conclusion

A PyramidBar100PercentStacked chart is an effective way to visualize proportional data across categories while conserving space. Using Aspose.Cells for .NET, you can create, populate, and fully customize such charts with just a few lines of C# code—no need for Microsoft Excel on the server. The examples above should give you a solid foundation to integrate Pyramid Bar charts into reporting solutions, dashboards, or any application that requires rich Excel visualizations.

If you encounter any issues or have questions, the Aspose community is ready to help via the free support forum.

See Also