Visualizing the distribution of defects, sales, or any metric with a ParetoLine chart helps you quickly identify the most significant contributors. In this guide, you’ll learn how to create a ParetoLine chart in Excel using C# with Aspose.Cells for .NET. The example covers data preparation, chart creation, Pareto line configuration, and saving the workbook in various formats.
This article covers the following topics:
- C# Excel Library to Create ParetoLine Charts
- Create a ParetoLine Chart in Excel using C#
- Free License & Resources
- Conclusion
- See Also
C# Excel Library to Create ParetoLine Charts
Aspose.Cells for .NET is a comprehensive Excel manipulation library that lets developers create, modify, and render Excel files without Microsoft Office installed. It supports a wide range of chart types, including the ParetoLine chart, which combines a column chart with a cumulative percentage line.
Key advantages of using Aspose.Cells for .NET:
- Rich API – Full access to Excel features, including advanced chart types.
- High Performance – Efficient handling of large workbooks and datasets.
- Multiple Output Formats – Save to XLSX, XLS, CSV, PDF, PNG, and more.
- No COM Interop – Works on any platform that supports .NET.
Get started quickly:
PM> Install-Package Aspose.Cells
Create a ParetoLine Chart in Excel using C#
Overview
A ParetoLine chart is essentially a Column chart that displays the raw values and a Line chart that shows the cumulative percentage of those values. The steps are:
- Create a
Workbookand obtain the first worksheet. - Populate the worksheet with categorical data and corresponding numeric values.
- Add a Column chart.
- Add the second series (cumulative percentage) and set its chart type to Line.
- Enable the secondary axis for the line series.
- Format axes, titles, and data labels.
- Save the workbook.
Complete C# Code Example
Explanation of Key Steps
| Step | Purpose |
|---|---|
| 2 | Inserts raw data that the Pareto chart will represent. |
| 3 | Calculates cumulative percentages needed for the line series. |
| 4‑5 | Creates a base Column chart and adds the first series (defect count). |
| 6‑7 | Adds the second series, sets its type to Line, and places it on the secondary axis. |
| 8 | Formats the secondary axis as a percentage and adds data labels for clarity. |
| 10 | Persists the workbook; Aspose.Cells can also render the chart to PDF, PNG, etc., by changing the file extension. |
Get a Free License
Explore Aspose.Cells with a temporary free license to unlock all features without evaluation restrictions. Visit the temporary license page and follow the simple steps to obtain your license file.
Resources
- Developer’s Guide – https://docs.aspose.com/cells/net/
- Free 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/
Conclusion
Creating a ParetoLine chart with Aspose.Cells for .NET is straightforward: prepare data, add a column chart, overlay a line series for cumulative percentages, and fine‑tune the appearance. The provided code is ready to compile and run, delivering a professional‑looking Pareto analysis chart that can be saved in any supported format.
If you have questions or need assistance, join our free support forum.