Open-High-Low-Close (OHLC) Chart


An open-high-low-close chart (also known as OHLC and HLOC) is a chart type mostly used to illustrate movements in the price of a financial instrument over time. Each vertical line on the chart shows the price range (the highest and lowest prices) over one unit of time, e.g. one day or one hour. Tick marks project from each side of the line indicating the opening price (e.g. for a daily bar chart this would be the starting price for that day) on the left, and the closing price for that time period on the right. The bars may be shown in different hues depending on whether prices rose or fell in that period.

The Japanese candlestick chart is another way of displaying market price data, with the opening and closing prices defining a rectangle within the range for each time unit. Both charts show exactly the same data, i.e. the opening, high, low, and closing prices during a particular time frame. Some traders find the Japanese candlestick chart easier to read.

OHLC is a series type that is predominantly used for demonstrating the stock market data, due to its specifics. So AnyChart OHLC series are also available in AnyStock – see the OHLC series in AnyStock article to learn more.

This article explains how to create a basic OHLC chart as well as configure settings that are specific to the type. See the table below to get a brief overview of the OHLC chart's characteristics:

Data Fieldsx, open, high, low, close
Multiple SeriesYES
VerticalVertical OHLC
Error BarsN/A
StockStock OHLC
Japanese Candlestick
Chartopedia: OHLC Chart
General Settings

Quick Start

To create an OHLC chart, use the chart constructor. Then call the ohlc() method to create an OHLC series.

The following sample demonstrates how a basic OHLC chart is created:

// create a data set
var data = [
  [Date.UTC(2007, 07, 23), 23.55, 23.88, 23.38, 23.62],
  [Date.UTC(2007, 07, 24), 22.65, 23.7, 22.65, 23.36],
  [Date.UTC(2007, 07, 25), 22.75, 23.7, 22.69, 23.44],
  [Date.UTC(2007, 07, 26), 23.2, 23.39, 22.87, 22.92],
  [Date.UTC(2007, 07, 27), 23.98, 24.49, 23.47, 23.49],
  [Date.UTC(2007, 07, 30), 23.55, 23.88, 23.38, 23.62],
  [Date.UTC(2007, 07, 31), 23.88, 23.93, 23.24, 23.25],
  [Date.UTC(2007, 08, 01), 23.17, 23.4, 22.85, 23.25],
  [Date.UTC(2007, 08, 02), 22.65, 23.7, 22.65, 23.36],
  [Date.UTC(2007, 08, 03), 23.2, 23.39, 22.87, 22.92],
  [Date.UTC(2007, 08, 06), 23.03, 23.15, 22.44, 22.97],
  [Date.UTC(2007, 08, 07), 22.75, 23.7, 22.69, 23.44],

// create a chart
chart =;

// create an OHLC series and set the data
var series = chart.ohlc(data);

// set the container id

// initiate drawing the chart

JsFiddle Playground

General Settings

In AnyChart there are many settings that are configured in the same way for all chart types, including the Area chart (for example, legend and interactivity settings).

Read the overview of general settings: General Settings.

Special Settings


Here is a full list of methods used to configure visual settings that are available for the OHLC series::

You can learn more from the Appearance Settings section.

In the sample below, there are two OHLC series with some of the appearance settings configured::

// configure the visual settings of the first series
series1.hoverRisingStroke("#33ccff", 1.5);
series1.selectRisingStroke("#33ccff", 3);
series1.hoverFallingStroke("#ff33cc", 1.5);
series1.selectFallingStroke("#ff33cc", 3);

// configure the visual settings of the second series
series2.risingStroke("#33ccff", 1, "10 5", "round");
series2.hoverRisingStroke("#33ccff", 1.5, "10 5", "round");
series2.selectRisingStroke("#33ccff", 3, "10 5", "round");
series2.fallingStroke("#ff33cc", 1, "10 5", "round");
series2.hoverFallingStroke("#ff33cc", 1.5, "10 5", "round");
series2.selectFallingStroke("#ff33cc", 3, "10 5", "round");

JsFiddle Playground

Point Size

This chart type allows you to set the size of its points. Read more in the Point Size article.


Labels are text or image elements that can be placed anywhere on any chart (they can be enabled on a whole series or for a single point). For text labels, font settings and text formatters are available.


A Tooltip is a text box displayed when a point on a chart is hovered. There is a number of visual and other settings available: for example, you can edit the text by using font settings and text formatters, change the style of background, adjust the position of a tooltip, and so on.