This article explains how to create an open-high-low-close chart in Excel using XlsIO.
What is an open-high-low-close chart?
An open-high-low-close chart is a type of chart typically used to illustrate movements in the price of a financial instrument over time. Each vertical line on the chart shows the price range over one unit of time.
Open-high-low-close chart created using XlsIO
To create an open-high-low-close chart in Excel using XlsIO, you need to do the following steps.
Steps to create open-high-low-close chart
Create a chart object by calling the worksheet.Charts.Add method.
Set a range of data from the worksheet to chart’s DataRange property and specify the chart type to ExcelChartType.Stock_OpenHighLowClose enum value.
Note: For creating a stock open-high-low-close chart, the series count must be 4. The data range should be set before selecting the chart type.
Add the basic elements like chart title, data labels and legend.
Properties used to modify the markers in open-high-low-close chart
Below is the list of properties that are used to change the markers in open-high-low-close chart.
1. Marker properties are applicable for all open (chart.Series), high (chart.Series), low (chart.Series) and close (chart.Series) series.
The following C#/ VB.NET complete code snippet shows the creation of open-high-low-close chart using XlsIO.
|Article ID:||Published Date:||Last Revised Date:||Platform:||Control:|