Visualizing financial market data such as high‑low‑close prices is essential for analysts and traders. In this article, you will learn how to create a StockVolumeHighLowClose chart in Excel using C# with Aspose.Cells for .NET. The examples demonstrate both a basic chart and a more advanced version with custom markers, secondary axis, and formatting. The code is fully functional and can be compiled directly.
This article covers the following topics:
- C# Excel Library to Create StockVolumeHighLowClose Chart
- Create a StockVolumeHighLowClose Chart in Excel using C#
- Free Resources
- Get a Free License
- Conclusion
- See Also
C# Excel Library to Create StockVolumeHighLowClose Chart
Aspose.Cells for .NET is a powerful library that simplifies the creation and manipulation of Excel files without requiring Microsoft Office. It provides a rich API for working with worksheets, cells, and a wide variety of chart types, including the StockVolumeHighLowClose chart used for financial data.
Key advantages of Aspose.Cells for .NET:
- Comprehensive API – Full access to Excel features, including over 70 chart types.
- High Performance – Works efficiently with large workbooks and complex formulas.
- No Interop Dependency – Runs on any platform that supports .NET.
- Extensive Format Support – XLSX, XLS, CSV, ODS, PDF, and more.
Get started quickly:
PM> Install-Package Aspose.Cells
Create a StockVolumeHighLowClose Chart in Excel using C#
Below are two complete examples. The first demonstrates a basic StockVolumeHighLowClose chart. The second shows how to customize the chart with different marker styles, a secondary axis, and visual formatting.
Example 1 – Basic StockVolumeHighLowClose Chart
Explanation of key steps
| Step | Purpose |
|---|---|
| 1 | Initialise a new Workbook and get the first worksheet. |
| 2 | Populate sample Open‑High‑Low‑Close data. |
| 3 | Add a chart of type ChartType.StockVolumeHighLowClose. |
| 4 | Set the category (X‑axis) and series data ranges using A1‑style references. |
| 5 | Adjust legend position and chart background for a cleaner look. |
| 6 | Persist the workbook to an .xlsx file. |
Running the program creates StockVolumeHighLowClose_Basic.xlsx with a fully functional VHLC chart.
Example 2 – Customized StockVolumeHighLowClose Chart
The second example demonstrates how to apply custom markers, a secondary axis for volume (if desired), and additional formatting such as line colors and border styles.
Highlights of the customization
- Marker Styles – Each price series (Open, High, Low, Close) uses a distinct marker shape and color, improving readability.
- Secondary Axis – The volume data is plotted as a column series on a secondary axis, illustrating how to mix chart types.
- Line & Fill Colors – Explicitly set line colors (
Border.Color) and marker fill colors (Marker.Area.ForeColor). - Axis Labels – Titles for primary and secondary axes help end‑users interpret the chart quickly.
Running this program creates StockVolumeHighLowClose_Customized.xlsx, a polished financial chart ready for presentation or further analysis.
Get a Free License
Explore Aspose products with a temporary free license. Visit the temporary license page to obtain a license file and unlock the full capabilities of Aspose.Cells for .NET.
StockVolumeHighLowClose Chart Excel: Free Resources
Continue expanding your Excel automation expertise with these 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
In this guide we demonstrated how to generate a StockVolumeHighLowClose chart in Excel using C# and Aspose.Cells for .NET. The first example gives you a quick start, while the second shows advanced styling options such as custom markers, secondary axes, and formatting tweaks. Aspose.Cells empowers developers to deliver professional‑grade financial visualizations without the need for Microsoft Office.
If you have any questions or need further assistance, feel free to join the Aspose.Cells Support Forum.