Introduction
A Line100PercentStacked chart (also known as a 100 % stacked line chart) is ideal for visualizing the relative contribution of multiple data series over a common category axis where the total always sums to 100 %. With Aspose.Cells for .NET, you can create and fully customize this chart type programmatically, eliminating the need for manual interaction with Excel.
In this article you will learn:
- How to add a Line100PercentStacked chart to a workbook.
- How to populate data for the chart.
- How to customize series, axes and chart appearance.
- How to save the result in XLSX, PDF or image formats.
C# Excel Library to Create Line100PercentStacked Chart
Aspose.Cells for .NET offers a rich, type‑safe API for working with Excel files. When it comes to charting, the library provides direct access to every chart type supported by Microsoft Excel, including Line100PercentStacked.
Key advantages of using Aspose.Cells:
- No Excel installation required – generate charts on any server.
- Full format support – XLSX, XLS, CSV, PDF, PNG, JPEG, etc.
- High performance – process large workbooks with minimal memory footprint.
- Extensive customization – modify colors, markers, axis titles, legends and more.
Installing Aspose.Cells
You can add Aspose.Cells to your .NET project via NuGet:
PM> Install-Package Aspose.Cells
Or download the latest release from the Aspose.Cells .NET releases page.
Create a Line100PercentStacked Chart in Excel using C#
Below is a complete, runnable examples that demonstrate how to generate a Line100PercentStacked chart. This sample creates a workbook, fills it with sample data, adds a Line100PercentStacked chart and saves the file as Line100PercentStackedChart.xlsx.
Explanation of key steps
| Step | Purpose |
|---|---|
| 1‑2 | Build sample data that represents sales per quarter per region. |
| 3 | Add a chart of type ChartType.Line100PercentStacked. |
| 4 | Create three series (Q1‑Q3) and bind them to the appropriate data ranges. |
| 5 | Adjust legend, axes titles and enable markers for better readability. |
| 6 | Persist the workbook to an XLSX file. |
Get a Free License
Aspose.Cells requires a license for full functionality. You can obtain a 30‑day temporary license for free at the Aspose temporary license page. Apply the license before rendering large files to avoid the evaluation watermark:
var license = new License();
license.SetLicense("Aspose.Total.lic"); // Path to your temporary license file
Free Resources
- Developer’s Guide – https://docs.aspose.com/cells/net/
- Online App – https://products.aspose.app/cells/family (create charts without coding)
- API Reference – https://reference.aspose.com/cells/net/
- How‑To Articles – https://blog.aspose.com/categories/aspose.cells-product-family/
Conclusion
Creating a Line100PercentStacked chart with Aspose.Cells for .NET is straightforward and fully programmable. The examples above show how to generate a chart from scratch or modify an existing workbook, covering data population, series configuration, axis titles, legends, markers and data labels. With Aspose.Cells you can automate reporting, dashboards and analytical visualizations without needing Microsoft Excel installed on the server.
For any questions or further assistance, feel free to visit our support forum.