{"id":9923,"date":"2020-03-25T11:43:48","date_gmt":"2020-03-25T11:43:48","guid":{"rendered":"https:\/\/www.anychart.com\/blog\/?p=9923"},"modified":"2022-08-13T10:11:31","modified_gmt":"2022-08-13T10:11:31","slug":"js-candlestick-chart-steps","status":"publish","type":"post","link":"https:\/\/www.anychart.com\/blog\/2020\/03\/25\/js-candlestick-chart-steps\/","title":{"rendered":"Making JS Candlestick Chart in Four Simple Steps"},"content":{"rendered":"<p><img decoding=\"async\" class=\"alignnone size-full wp-image-9952\" src=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/03\/js-candlestick-chart-tutorial.png\" alt=\"A JS Candlestick Chart on the screen of a laptop\" width=\"100%\" srcset=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/03\/js-candlestick-chart-tutorial.png 1920w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/03\/js-candlestick-chart-tutorial-300x189.png 300w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/03\/js-candlestick-chart-tutorial-768x484.png 768w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/03\/js-candlestick-chart-tutorial-1024x646.png 1024w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/>Do you have trading data,\u00a0looking for a way to effectively visualize it for your website or app project? If so, a JS <a href=\"https:\/\/www.anychart.com\/chartopedia\/chart-type\/japanese-candlestick-chart\/\">candlestick chart<\/a> could be your best pick. This tutorial will break down the process needed to create\u00a0such a chart into simple steps and provide a detailed explanation\u00a0of the code. Keep reading even if you are new to\u00a0programming,\u00a0because only a basic understanding is needed to follow along and master\u00a0such a JavaScript (HTML5) based data visualization technique.<\/p>\n<p>Also called a Japanese candlestick chart,\u00a0this chart type is one of the most popular forms of financial and stock data visualization.\u00a0Each candlestick\u00a0represents\u00a0information about the open, high, low, and close price of the day.\u00a0Candlestick charts are widely used in technical analysis of\u00a0price movement patterns.<\/p>\n<p>Complete this tutorial and you will be able to create a compelling interactive candlestick chart in JavaScript real quick, with ease.<\/p>\n<p><!--more Read the JS charting tutorial \u00bb--><\/p>\n<h2>How to Create JavaScript Candlestick Chart<\/h2>\n<p>When it comes to JavaScript charting, there are\u00a0four basic steps usually needed to make a data visualization of almost any type:<\/p>\n<ol>\n<li>Create the HTML page where the chart will be displayed.<\/li>\n<li>Include all necessary JavaScript files.<\/li>\n<li>Prepare the data you\u00a0want to visualize.<\/li>\n<li>Write the JS code for the chart.<\/li>\n<\/ol>\n<p>The tutorial includes four JS candlestick chart examples. Here&#8217;s how the final one will look (just so you could better imagine where we are going):<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-9954\" src=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/03\/js-candlestick-chart.png\" alt=\"JS candlestick chart to be built at the end of this tutorial\" width=\"100%\" srcset=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/03\/js-candlestick-chart.png 1260w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/03\/js-candlestick-chart-300x167.png 300w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/03\/js-candlestick-chart-768x427.png 768w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/03\/js-candlestick-chart-1024x569.png 1024w\" sizes=\"(max-width: 1260px) 100vw, 1260px\" \/><\/p>\n<p>Now, each step will be explained in detail.<\/p>\n<h3>Step 1: Create an HTML page<\/h3>\n<p>First of all, you need to create a basic HTML page. Include a relevant title and an HTML block element (for example, <code>&lt;div&gt;<\/code>) to place the chart. Here, the id used has the value <code>container.<\/code>\u00a0But feel free to use whatever makes sense to you.<\/p>\n<p>The page should look as follows:<\/p>\n<pre><code class=\"html\">&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n\r\n&lt;head&gt;\r\n  &lt;title&gt;JavaScript Candlestick Chart&lt;\/title&gt;\r\n  &lt;style&gt;\r\n    html,\r\n    body,\r\n    #container {\r\n      width: 100%;\r\n      height: 100%;\r\n      margin: 0;\r\n      padding: 0;\r\n    }\r\n  &lt;\/style&gt;\r\n&lt;\/head&gt;\r\n\r\n&lt;body&gt;\r\n  &lt;div id=\"container\"&gt;&lt;\/div&gt;\r\n&lt;\/body&gt;\r\n\r\n&lt;\/html&gt;<\/code><\/pre>\n<p>Note that you can specify the <code>width<\/code> and <code>height<\/code> parameters inside the <code>&lt;style&gt;<\/code> block to modify the space that your chart will occupy.\u00a0I have put <code>100%<\/code>\u00a0in both parameters and thus the chart will fill the whole page.<\/p>\n<h3>Step 2. Include all necessary JS files<\/h3>\n<p>Second, reference all the necessary script files in the <code>&lt;head&gt;<\/code> section.<\/p>\n<p>There are <a href=\"https:\/\/en.wikipedia.org\/wiki\/Comparison_of_JavaScript_charting_libraries\" target=\"_blank\" rel=\"nofollow\">many JavaScript charting libraries<\/a> out there with ready-made features that are of great help when you want to quickly create a visualization \u2014 sometimes even\u00a0complex\u00a0one \u2014 which\u00a0would otherwise\u00a0require advanced coding experience.<\/p>\n<p>In this tutorial, I will make use of <a href=\"https:\/\/www.anychart.com\">AnyChart<\/a>, and to be more accurate, of AnyChart&#8217;s <a href=\"https:\/\/www.anychart.com\/products\/anystock\/overview\/\">AnyStock JS library<\/a> specifically\u00a0made for visualizing large datasets of date and time based charts including (but actually not limited to) stock charts.<\/p>\n<p>You can\u00a0either\u00a0reference the necessary scripts from\u00a0the <a href=\"https:\/\/www.anychart.com\/download\/cdn\/?v=8.7.1\">CDN<\/a>\u00a0or <a href=\"https:\/\/www.anychart.com\/download\/\">download<\/a>\u00a0them for local use.<\/p>\n<p>Let&#8217;s\u00a0use the CDN links. For stock candlesticks, you need to use both the <code>anychart-core.min.js<\/code> and <code>anychart-stock.min.js<\/code> scripts. Here&#8217;s how it looks in the HTML code:<\/p>\n<pre><code class=\"html\">&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n\r\n&lt;head&gt;\r\n  &lt;title&gt;JavaScript Candlestick Chart&lt;\/title&gt;\r\n  &lt;script src=\"https:\/\/cdn.anychart.com\/releases\/8.7.1\/js\/anychart-core.min.js\" type=\"text\/javascript\"&gt;&lt;\/script&gt;\r\n  &lt;script src=\"https:\/\/cdn.anychart.com\/releases\/8.7.1\/js\/anychart-stock.min.js\" type=\"text\/javascript\"&gt;&lt;\/script&gt;\r\n  &lt;style&gt;\r\n    html,\r\n    body,\r\n    #container {\r\n      width: 100%;\r\n      height: 100%;\r\n      margin: 0;\r\n      padding: 0;\r\n    }\r\n  &lt;\/style&gt;\r\n&lt;\/head&gt;\r\n\r\n&lt;body&gt;\r\n  &lt;div id=\"container\"&gt;&lt;\/div&gt;\r\n  &lt;script&gt;\r\n    \/\/ The candlestick code will be written here\r\n  &lt;\/script&gt;\r\n&lt;\/body&gt;\r\n\r\n&lt;\/html&gt;<\/code><\/pre>\n<p>Note\u00a0that there is\u00a0a <code>script<\/code> tag\u00a0in the\u00a0<code>&lt;body&gt;<\/code>\u00a0section. That&#8217;s\u00a0where\u00a0I will put all the code for the JS candlestick chart.<\/p>\n<h3>Step 3: Prepare the data<\/h3>\n<h4>Load the data<\/h4>\n<p>For this candlestick chart,\u00a0I chose\u00a0to visualize historical data for EUR\/USD (euro\/U.S. dollar) from <a href=\"https:\/\/www.investing.com\/currencies\/eur-usd-historical-data\" target=\"_blank\" rel=\"nofollow\">Investing.com<\/a>, focusing on the time period of two years, March 2018 to March 2020. Since\u00a0the\u00a0dataset is pretty large, instead of\u00a0inserting the data directly in the .html file,\u00a0let&#8217;s\u00a0put it in a CSV file for convenience.<\/p>\n<p>Here&#8217;s a sample to demonstrate how the data looks:<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-9941\" src=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/03\/candlestick-chart-data-csv-javascript.png\" alt=\"A screenshot of the CSV file with data for the JS candlestick chart\" width=\"60%\" srcset=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/03\/candlestick-chart-data-csv-javascript.png 1165w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/03\/candlestick-chart-data-csv-javascript-300x86.png 300w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/03\/candlestick-chart-data-csv-javascript-768x220.png 768w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/03\/candlestick-chart-data-csv-javascript-1024x293.png 1024w\" sizes=\"(max-width: 1165px) 100vw, 1165px\" \/><\/p>\n<p>AnyChart has a module called <a href=\"https:\/\/docs.anychart.com\/Working_with_Data\/Data_Adapter\/Overview\" target=\"_blank\" rel=\"nofollow\">Data Adapter<\/a> that allows\u00a0developers to load CSV and other file formats in a quite straightforward way. Go ahead and reference this module in the <code>&lt;head&gt;<\/code> section:<\/p>\n<pre><code class=\"html\">&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n\r\n&lt;head&gt;\r\n  &lt;title&gt;JavaScript Candlestick Chart&lt;\/title&gt;\r\n  &lt;script src=\"https:\/\/cdn.anychart.com\/releases\/8.7.1\/js\/anychart-core.min.js\" type=\"text\/javascript\"&gt;&lt;\/script&gt;\r\n  &lt;script src=\"https:\/\/cdn.anychart.com\/releases\/8.7.1\/js\/anychart-stock.min.js\" type=\"text\/javascript\"&gt;&lt;\/script&gt;\r\n  &lt;script src=\"https:\/\/cdn.anychart.com\/releases\/8.7.1\/js\/anychart-data-adapter.min.js\"&gt;&lt;\/script&gt;\r\n\r\n  &lt;style&gt;\r\n    html,\r\n    body,\r\n    #container {\r\n      width: 100%;\r\n      height: 100%;\r\n      margin: 0;\r\n      padding: 0;\r\n    }\r\n  &lt;\/style&gt;\r\n&lt;\/head&gt;\r\n\r\n&lt;body&gt;\r\n  &lt;div id=\"container\"&gt;&lt;\/div&gt;\r\n  &lt;script&gt;\r\n    \/\/ The candlestick code will be written here\r\n  &lt;\/script&gt;\r\n&lt;\/body&gt;\r\n\r\n&lt;\/html&gt;<\/code><\/pre>\n<p>Next, using the <code>loadCsvFile()<\/code> method provided by the Data Adapter, load the data.\u00a0And then\u00a0create a data table to\u00a0apply this data\u00a0to\u00a0the chart. The code implementation looks as follows:<\/p>\n<pre><code class=\"js\">anychart.data.loadCsvFile(\"https:\/\/static.anychart.com\/git-storage\/word-press\/data\/candlestick-chart-tutorial\/EUR_USDHistoricalData2year.csv\", function (data) {\r\n  \r\n  var dataTable = anychart.data.table(0, 'MMM d, yyyy');\r\n  dataTable.addData(data);\r\n\r\n});<\/code><\/pre>\n<h4>Map the data<\/h4>\n<p>Now that the data is loaded, let\u2019s use the <code>mapAs()<\/code> function to transform the data fields into the fields of the candlestick chart.<\/p>\n<p>We need five data fields:<\/p>\n<ul>\n<li><code>x<\/code>, which usually represents the date<\/li>\n<li><code>open<\/code>, which represents the price at the start period<\/li>\n<li><code>high<\/code>, which represents the highest price during this period<\/li>\n<li><code>low<\/code>, which represents the lowest price during this period, and<\/li>\n<li><code>close<\/code>, which represents the price at the end, or close, of the period<\/li>\n<\/ul>\n<p>In\u00a0the CSV file,\u00a0you see that in our case <code>open<\/code> is the second field, <code> high<\/code> the third, <code>low<\/code> the fourth, and <code>close<\/code> the first. So here&#8217;s what you should write:<\/p>\n<pre><code class=\"js\">var mapping = dataTable.mapAs({ 'open': 2, 'high': 3, 'low': 4, 'close': 1 });<\/code><\/pre>\n<h3>Step 4: Write the JS candlestick chart code<\/h3>\n<p>Now that everything is set up, proceed to the chart code itself.<\/p>\n<p>All the coding will take place inside the <code>&lt;script&gt;<\/code> tag. The first function that needs to be added there is the <code>anychart.onDocumentReady<\/code>.\u00a0It will enclose all\u00a0the code and will be executed when the page is ready:<\/p>\n<pre><code class=\"html\">&lt;script&gt;\r\n  anychart.onDocumentReady(function () {\r\n    \/\/ The candlestick code will be written here\r\n  });\r\n&lt;\/script&gt;<\/code><\/pre>\n<p>Next, include\u00a0the data from step 3:<\/p>\n<pre><code class=\"html\">&lt;script&gt;\r\n  anychart.onDocumentReady(function () {\r\n\r\n    \/\/ load data\r\n    anychart.data.loadCsvFile(\"https:\/\/static.anychart.com\/git-storage\/word-press\/data\/candlestick-chart-tutorial\/EUR_USDHistoricalData2year.csv\", function (data) {\r\n\r\n      \/\/ create a data table\r\n      var dataTable = anychart.data.table(0, 'MMM d, yyyy');\r\n      dataTable.addData(data);\r\n\r\n      \/\/ map data\r\n      var mapping = dataTable.mapAs({ 'open': 2, 'high': 3, 'low': 4, 'close': 1 });\r\n\r\n    });\r\n\r\n  });\r\n&lt;\/script&gt;<\/code><\/pre>\n<p>Finally, use <code>anychart.stock()<\/code> to create a stock chart and\u00a0provide it with\u00a0the\u00a0candlestick series. Then you can specify an appropriate chart title, put the chart into the container, and command to draw it.<\/p>\n<p>Done! You&#8217;ve just made your first interactive candlestick chart in HTML5 using JavaScript!<\/p>\n<p><iframe loading=\"lazy\" class=\"anychart-embed anychart-embed-\" src=\"https:\/\/playground.anychart.com\/GQcSp8s0\/iframe\" width=\"300\" height=\"150\" frameborder=\"0\" sandbox=\"allow-scripts allow-pointer-lock allow-same-origin allow-popups allow-modals allow-forms\" allowfullscreen=\"allowfullscreen\"><br \/>\n<\/iframe><br \/>\n<script type=\"text\/javascript\">(function(){\nfunction ac_add_to_head(el){\n\tvar head = document.getElementsByTagName('head')[0];\n\thead.insertBefore(el,head.firstChild);\n}\nfunction ac_add_style(css){\n\tvar ac_style = document.createElement('style');\n\tif (ac_style.styleSheet) ac_style.styleSheet.cssText = css;\n\telse ac_style.appendChild(document.createTextNode(css));\n\tac_add_to_head(ac_style);\n}\nac_add_style(\".anychart-embed-{width:100%;height:500px;}\");\n})();<\/script><\/p>\n<p>In\u00a0the resulting JS candlestick chart,\u00a0it is possible to observe\u00a0how the EUR\/USD currency pair traded\u00a0over two years. Use the scroller to zoom into a shorter period if you want. Tooltips and crosshairs show up on hover.<\/p>\n<p>With\u00a0only the default settings,\u00a0you have\u00a0got a fully functional and interactive chart that finely presents\u00a0all the basic information needed for financial analysts and traders to do their job.<\/p>\n<p>By the way, AnyChart has its own online editor for data visualizations like charts, maps, and dashboards, called <a href=\"https:\/\/playground.anychart.com\" target=\"_blank\" rel=\"nofollow\">AnyChart Playground<\/a>. This candlestick chart is available <a href=\"https:\/\/playground.anychart.com\/GQcSp8s0\/\" target=\"_blank\" rel=\"nofollow\">right there<\/a> so you can play with its code in a convenient way.<\/p>\n<p>Here&#8217;s\u00a0the full code of the chart:<\/p>\n<pre><code class=\"html\">&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n\r\n&lt;head&gt;\r\n  &lt;title&gt;JavaScript Candlestick Chart&lt;\/title&gt;\r\n  &lt;script src=\"https:\/\/cdn.anychart.com\/releases\/8.7.1\/js\/anychart-core.min.js\" type=\"text\/javascript\"&gt;&lt;\/script&gt;\r\n  &lt;script src=\"https:\/\/cdn.anychart.com\/releases\/8.7.1\/js\/anychart-stock.min.js\" type=\"text\/javascript\"&gt;&lt;\/script&gt;\r\n  &lt;script src=\"https:\/\/cdn.anychart.com\/releases\/8.7.1\/js\/anychart-data-adapter.min.js\"&gt;&lt;\/script&gt;\r\n  &lt;style&gt;\r\n    html,\r\n    body,\r\n    #container {\r\n      width: 100%;\r\n      height: 100%;\r\n      margin: 0;\r\n      padding: 0;\r\n    }\r\n  &lt;\/style&gt;\r\n&lt;\/head&gt;\r\n\r\n&lt;body&gt;\r\n  &lt;div id=\"container\"&gt;&lt;\/div&gt;\r\n  &lt;script&gt;\r\n    anychart.onDocumentReady(function () {\r\n\r\n      \/\/ load data\r\n      anychart.data.loadCsvFile(\"https:\/\/static.anychart.com\/git-storage\/word-press\/data\/candlestick-chart-tutorial\/EUR_USDHistoricalData2year.csv\", function (data) {\r\n\r\n        \/\/ create a data table\r\n        var dataTable = anychart.data.table(0, 'MMM d, yyyy');\r\n        dataTable.addData(data);\r\n\r\n        \/\/ map data\r\n        var mapping = dataTable.mapAs({ 'open': 2, 'high': 3, 'low': 4, 'close': 1 });\r\n\r\n        \/\/ set the chart type\r\n        var chart = anychart.stock();\r\n\r\n        \/\/ set the series\r\n        var series = chart.plot(0).candlestick(mapping);\r\n        series.name(\"EUR USD Trade Data\");\r\n\r\n        \/\/ set the chart title\r\n        chart.title(\"EUR USD Historical Trade Data\");\r\n\r\n        \/\/ set the container id\r\n        chart.container('container');\r\n\r\n        \/\/ draw the chart\r\n        chart.draw();\r\n\r\n      });\r\n\r\n    });\r\n  &lt;\/script&gt;\r\n&lt;\/body&gt;\r\n\r\n&lt;\/html&gt;<\/code><\/pre>\n<h2>JS Candlestick Chart Customization<\/h2>\n<p>So you&#8217;ve build a basic candlestick chart in JS,\u00a0with predefined styles and features. However, there are numerous things you can easily change if you need to.<\/p>\n<p>Now, I will show you how to customize it in\u00a0the following ways:<\/p>\n<ol>\n<li>Add the EMA indicator for technical analysis.<\/li>\n<li>Modify the candlestick colors.<\/li>\n<li>Configure the scroller series.<\/li>\n<\/ol>\n<h3>Add the EMA technical indicator<\/h3>\n<p><a href=\"https:\/\/docs.anychart.com\/Stock_Charts\/Technical_Indicators\/Exponential_Moving_Average_(EMA)\" target=\"_blank\" rel=\"nofollow\">EMA<\/a> stands for Exponential Moving Average. Based on\u00a0mathematical formulas to place greater weight and importance to recent observations, it is a technical indicator widely used in financial charts to analyze data. Depending on a situation, traders may like to use different EMA periods.\u00a0For example, 20-day, 30-day and 90-day moving averages.<\/p>\n<p>AnyStock\u00a0already\u00a0has the code needed for adding EMA. So you can simply\u00a0insert it\u00a0in your candlestick chart and specify the period you want to use. Like this:<\/p>\n<pre><code class=\"js\">\/\/ create a plot\r\nvar plot = chart.plot(0);\r\n\r\n\/\/ create an EMA indicator with period 20\r\nvar ema20 = plot.ema(mapping, 20).series();\r\n\r\n\/\/ set the EMA color\r\nema20.stroke('#bf360c');<\/code><\/pre>\n<p>Here&#8217;s the <a href=\"https:\/\/playground.anychart.com\/ohvM418c\/\" target=\"_blank\" rel=\"nofollow\">result<\/a>:<\/p>\n<p><iframe loading=\"lazy\" class=\"anychart-embed anychart-embed-\" src=\"https:\/\/playground.anychart.com\/ohvM418c\/iframe\" width=\"300\" height=\"150\" frameborder=\"0\" sandbox=\"allow-scripts allow-pointer-lock allow-same-origin allow-popups allow-modals allow-forms\" allowfullscreen=\"allowfullscreen\"><br \/>\n<\/iframe><br \/>\n<script type=\"text\/javascript\">(function(){\nfunction ac_add_to_head(el){\n\tvar head = document.getElementsByTagName('head')[0];\n\thead.insertBefore(el,head.firstChild);\n}\nfunction ac_add_style(css){\n\tvar ac_style = document.createElement('style');\n\tif (ac_style.styleSheet) ac_style.styleSheet.cssText = css;\n\telse ac_style.appendChild(document.createTextNode(css));\n\tac_add_to_head(ac_style);\n}\nac_add_style(\".anychart-embed-{width:100%;height:500px;}\");\n})();<\/script><\/p>\n<h3>Modify the candlestick\u00a0colors<\/h3>\n<p>If you\u00a0want to encode\u00a0increases and decreases of the price using\u00a0white and black colors, simply\u00a0add the following lines:<\/p>\n<pre><code class=\"js\">\/\/ modify the color of candlesticks making them black and white\r\nseries.fallingFill(\"black\");\r\nseries.fallingStroke(\"black\");\r\nseries.risingFill(\"white\");\r\nseries.risingStroke(\"black\");<\/code><\/pre>\n<p>Here&#8217;s the <a href=\"https:\/\/playground.anychart.com\/WVJWwQTI\" target=\"_blank\" rel=\"nofollow\">result<\/a>:<br \/>\n<iframe loading=\"lazy\" class=\"anychart-embed anychart-embed-\" src=\"https:\/\/playground.anychart.com\/WVJWwQTI\/iframe\" width=\"300\" height=\"150\" frameborder=\"0\" sandbox=\"allow-scripts allow-pointer-lock allow-same-origin allow-popups allow-modals allow-forms\" allowfullscreen=\"allowfullscreen\"><br \/>\n<\/iframe><br \/>\n<script type=\"text\/javascript\">(function(){\nfunction ac_add_to_head(el){\n\tvar head = document.getElementsByTagName('head')[0];\n\thead.insertBefore(el,head.firstChild);\n}\nfunction ac_add_style(css){\n\tvar ac_style = document.createElement('style');\n\tif (ac_style.styleSheet) ac_style.styleSheet.cssText = css;\n\telse ac_style.appendChild(document.createTextNode(css));\n\tac_add_to_head(ac_style);\n}\nac_add_style(\".anychart-embed-{width:100%;height:500px;}\");\n})();<\/script><\/p>\n<h3>Configure the scroller series<\/h3>\n<p>Currently, the date is displayed both on the default X-axis and the scroller. You can disable the extra X-axis as follows:<\/p>\n<pre><code class=\"js\">chart.scroller().xAxis(false);<\/code><\/pre>\n<p>Now, let&#8217;s plot the\u00a0<code>open<\/code> value\u00a0as a column series in the scroller. First, create a variable to store <code>open<\/code> values only:<\/p>\n<pre><code class=\"js\">openValue = dataTable.mapAs();\r\nopenValue.addField('value', 2);<\/code><\/pre>\n<p>Second,\u00a0in just one line of code, create a scroller series with the mapped data:<\/p>\n<pre><code class=\"js\">chart.scroller().column(openValue);<\/code><\/pre>\n<p>Look at the <a href=\"https:\/\/playground.anychart.com\/mwhJ7tRx\" target=\"_blank\" rel=\"nofollow\">result<\/a>:<\/p>\n<p><iframe loading=\"lazy\" class=\"anychart-embed anychart-embed-QXRCl5PX\" src=\"https:\/\/playground.anychart.com\/mwhJ7tRx\/iframe\" width=\"300\" height=\"150\" frameborder=\"0\" sandbox=\"allow-scripts allow-pointer-lock allow-same-origin allow-popups allow-modals allow-forms\" allowfullscreen=\"allowfullscreen\"><br \/>\n<\/iframe><br \/>\n<script type=\"text\/javascript\">(function(){\nfunction ac_add_to_head(el){\n\tvar head = document.getElementsByTagName('head')[0];\n\thead.insertBefore(el,head.firstChild);\n}\nfunction ac_add_style(css){\n\tvar ac_style = document.createElement('style');\n\tif (ac_style.styleSheet) ac_style.styleSheet.cssText = css;\n\telse ac_style.appendChild(document.createTextNode(css));\n\tac_add_to_head(ac_style);\n}\nac_add_style(\".anychart-embed-QXRCl5PX{width:100%;height:500px;}\");\n})();<\/script><\/p>\n<p>For your convenience, here&#8217;s the\u00a0full code\u00a0of this final JS candlestick chart:<\/p>\n<pre><code class=\"html\">&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n\r\n&lt;head&gt;\r\n  &lt;title&gt;JavaScript Candlestick Chart&lt;\/title&gt;\r\n  &lt;script src=\"https:\/\/cdn.anychart.com\/releases\/8.7.1\/js\/anychart-core.min.js\" type=\"text\/javascript\"&gt;&lt;\/script&gt;\r\n  &lt;script src=\"https:\/\/cdn.anychart.com\/releases\/8.7.1\/js\/anychart-stock.min.js\" type=\"text\/javascript\"&gt;&lt;\/script&gt;\r\n  &lt;script src=\"https:\/\/cdn.anychart.com\/releases\/8.7.1\/js\/anychart-data-adapter.min.js\"&gt;&lt;\/script&gt;\r\n  &lt;style&gt;\r\n    html,\r\n    body,\r\n    #container {\r\n      width: 100%;\r\n      height: 100%;\r\n      margin: 0;\r\n      padding: 0;\r\n    }\r\n  &lt;\/style&gt;\r\n&lt;\/head&gt;\r\n\r\n&lt;body&gt;\r\n  &lt;div id=\"container\"&gt;&lt;\/div&gt;\r\n  &lt;script&gt;\r\n    anychart.onDocumentReady(function () {\r\n\r\n      \/\/ load data\r\n      anychart.data.loadCsvFile(\"https:\/\/static.anychart.com\/git-storage\/word-press\/data\/candlestick-chart-tutorial\/EUR_USDHistoricalData2year.csv\", function (data) {\r\n\r\n        \/\/ create a data table\r\n        var dataTable = anychart.data.table(0, 'MMM d, yyyy');\r\n        dataTable.addData(data);\r\n\r\n        \/\/ map data\r\n        var mapping = dataTable.mapAs({ 'open': 2, 'high': 3, 'low': 4, 'close': 1 });\r\n\r\n        \/\/ set the chart type\r\n        var chart = anychart.stock();\r\n\r\n        \/\/ set the series\r\n        var series = chart.plot(0).candlestick(mapping);\r\n        series.name(\"EUR USD Trade Data\");\r\n\r\n        \/\/ set the chart title\r\n        chart.title(\"EUR USD Historical Trade Data\");\r\n\r\n        \/\/ create a plot\r\n        var plot = chart.plot(0);\r\n        \/\/ create an EMA indicator with period 20\r\n        var ema20 = plot.ema(mapping, 20).series();\r\n        \/\/ set the EMA color\r\n        ema20.stroke('#bf360c');\r\n    \r\n        \/\/ disable the scroller axis\r\n        chart.scroller().xAxis(false);\r\n        \/\/ map \"open\" values for the scroller\r\n        openValue = dataTable.mapAs();\r\n        openValue.addField('value', 2);\r\n        \/\/ create a scroller series with the mapped data\r\n        chart.scroller().column(openValue);\r\n    \r\n        \/\/ modify the color of candlesticks making them black and white\r\n        series.fallingFill(\"black\");\r\n        series.fallingStroke(\"black\");\r\n        series.risingFill(\"white\");\r\n        series.risingStroke(\"black\");\r\n\r\n        \/\/ set the container id\r\n        chart.container('container');\r\n\r\n        \/\/ draw the chart\r\n        chart.draw();\r\n\r\n      });\r\n\r\n    });\r\n  &lt;\/script&gt;\r\n&lt;\/body&gt;\r\n\r\n&lt;\/html&gt;<\/code><\/pre>\n<h2>Conclusion<\/h2>\n<p>Creating interactive charts for apps and sites with the help of dedicated JavaScript libraries for data visualization is not complicated at all, is it? Actually, even newbies to coding can create professional-looking interactive charts that meet their needs.<\/p>\n<p>In this tutorial, I tried to\u00a0show\u00a0four simple steps needed to make\u00a0your own first JS candlestick chart and hope it is helpful.<\/p>\n<p>To learn more about creating and customizing candlestick charts, see the <a href=\"https:\/\/docs.anychart.com\/Basic_Charts\/Japanese_Candlestick_Chart\" target=\"_blank\" rel=\"nofollow\">candlestick chart documentation<\/a>.<\/p>\n<p><!-- SyntaxHighlighter --><link rel=\"stylesheet\" href=\"\/\/cdnjs.cloudflare.com\/ajax\/libs\/highlight.js\/9.12.0\/styles\/default.min.css\"><link rel=\"stylesheet\" href=\"\/\/cdnjs.cloudflare.com\/ajax\/libs\/highlight.js\/9.12.0\/styles\/atom-one-light.min.css\"><script src=\"\/\/cdnjs.cloudflare.com\/ajax\/libs\/highlight.js\/9.12.0\/highlight.min.js\"><\/script><script>hljs.initHighlightingOnLoad();<\/script><\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>Do you have trading data,\u00a0looking for a way to effectively visualize it for your website or app project? If so, a JS candlestick chart could be your best pick. This tutorial will break down the process needed to create\u00a0such a chart into simple steps and provide a detailed explanation\u00a0of the code. Keep reading even if [&hellip;]<!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":17,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,18,263,19,23,13,279,20,4],"tags":[53,198,284,127,258,471,266,54,256,844,1845,1844,47,912,1762,32,55,144,36,907,141,81,57,58,65,56,459,37,30,172,1843],"class_list":["post-9923","post","type-post","status-publish","format-standard","hentry","category-anychart-charting-component","category-anystock","category-big-data","category-financial-charts","category-html5","category-javascript","category-javascript-chart-tutorials","category-stock-charts","category-tips-and-tricks","tag-anychart","tag-candlestick-chart","tag-chart-examples","tag-chart-types","tag-charts","tag-data-analysis","tag-data-analytics","tag-data-visualization","tag-data-visualization-examples","tag-data-visualization-tutorial","tag-date","tag-eurusd","tag-financial-charts","tag-financial-data","tag-guest-post","tag-html5","tag-html5-charts","tag-infographics","tag-javascript","tag-javascript-chart-tutorial","tag-javascript-charting","tag-javascript-charting-library","tag-javascript-charts","tag-js-chart","tag-js-charting","tag-js-charts","tag-statistics","tag-stock-charts","tag-tips-and-tricks","tag-tutorial","tag-usdeur","wpautop"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>JS Candlestick Chart Making in Four Simple Steps (Tutorial)<\/title>\n<meta name=\"description\" content=\"Do you have trading data, looking for a way to effectively visualize it for your website or app? A JS candlestick chart could be your best pick. Tutorial.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.anychart.com\/blog\/2020\/03\/25\/js-candlestick-chart-steps\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Making JS Candlestick Chart in Four Simple Steps\" \/>\n<meta property=\"og:description\" content=\"Looking for a way to effectively visualize trading data for a web page or app? A JS candlestick chart could be your best pick. Tutorial.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.anychart.com\/blog\/2020\/03\/25\/js-candlestick-chart-steps\/\" \/>\n<meta property=\"og:site_name\" content=\"AnyChart News\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/AnyCharts\" \/>\n<meta property=\"article:published_time\" content=\"2020-03-25T11:43:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-08-13T10:11:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/03\/js-candlestick-chart-tutorial.png\" \/>\n<meta name=\"author\" content=\"Anastasia Zoumpliou\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"Making JS Candlestick Chart in Four Simple Steps\" \/>\n<meta name=\"twitter:description\" content=\"Looking for a way to effectively visualize trading data for a web page or app? A JS candlestick chart could be your best pick. Tutorial.\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/03\/js-candlestick-chart-tutorial.png\" \/>\n<meta name=\"twitter:creator\" content=\"@AnyChart\" \/>\n<meta name=\"twitter:site\" content=\"@AnyChart\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Anastasia Zoumpliou\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.anychart.com\/blog\/2020\/03\/25\/js-candlestick-chart-steps\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/2020\/03\/25\/js-candlestick-chart-steps\/\"},\"author\":{\"name\":\"Anastasia Zoumpliou\",\"@id\":\"https:\/\/www.anychart.com\/blog\/#\/schema\/person\/f5cd0be5c1240a1276a6b36bfeca2bff\"},\"headline\":\"Making JS Candlestick Chart in Four Simple Steps\",\"datePublished\":\"2020-03-25T11:43:48+00:00\",\"dateModified\":\"2022-08-13T10:11:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/2020\/03\/25\/js-candlestick-chart-steps\/\"},\"wordCount\":1293,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/2020\/03\/25\/js-candlestick-chart-steps\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/03\/js-candlestick-chart-tutorial.png\",\"keywords\":[\"AnyChart\",\"candlestick chart\",\"chart examples\",\"chart types\",\"charts\",\"data analysis\",\"data analytics\",\"Data Visualization\",\"data visualization examples\",\"data visualization tutorial\",\"date\",\"EURUSD\",\"Financial charts\",\"financial data\",\"guest post\",\"HTML5\",\"html5 charts\",\"infographics\",\"JavaScript\",\"javascript chart tutorial\",\"javascript charting\",\"JavaScript charting library\",\"javascript charts\",\"js chart\",\"js charting\",\"js charts\",\"statistics\",\"Stock charts\",\"Tips and tricks\",\"tutorial\",\"USDEUR\"],\"articleSection\":[\"AnyChart Charting Component\",\"AnyStock\",\"Big Data\",\"Financial Charts\",\"HTML5\",\"JavaScript\",\"JavaScript Chart Tutorials\",\"Stock Charts\",\"Tips and Tricks\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.anychart.com\/blog\/2020\/03\/25\/js-candlestick-chart-steps\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.anychart.com\/blog\/2020\/03\/25\/js-candlestick-chart-steps\/\",\"url\":\"https:\/\/www.anychart.com\/blog\/2020\/03\/25\/js-candlestick-chart-steps\/\",\"name\":\"JS Candlestick Chart Making in Four Simple Steps (Tutorial)\",\"isPartOf\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/2020\/03\/25\/js-candlestick-chart-steps\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/2020\/03\/25\/js-candlestick-chart-steps\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/03\/js-candlestick-chart-tutorial.png\",\"datePublished\":\"2020-03-25T11:43:48+00:00\",\"dateModified\":\"2022-08-13T10:11:31+00:00\",\"author\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/#\/schema\/person\/f5cd0be5c1240a1276a6b36bfeca2bff\"},\"description\":\"Do you have trading data, looking for a way to effectively visualize it for your website or app? A JS candlestick chart could be your best pick. Tutorial.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/2020\/03\/25\/js-candlestick-chart-steps\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.anychart.com\/blog\/2020\/03\/25\/js-candlestick-chart-steps\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.anychart.com\/blog\/2020\/03\/25\/js-candlestick-chart-steps\/#primaryimage\",\"url\":\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/03\/js-candlestick-chart-tutorial.png\",\"contentUrl\":\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/03\/js-candlestick-chart-tutorial.png\",\"width\":1920,\"height\":1211},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.anychart.com\/blog\/2020\/03\/25\/js-candlestick-chart-steps\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.anychart.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Making JS Candlestick Chart in Four Simple Steps\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.anychart.com\/blog\/#website\",\"url\":\"https:\/\/www.anychart.com\/blog\/\",\"name\":\"AnyChart News\",\"description\":\"AnyChart JS Charts\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.anychart.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.anychart.com\/blog\/#\/schema\/person\/f5cd0be5c1240a1276a6b36bfeca2bff\",\"name\":\"Anastasia Zoumpliou\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.anychart.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/774bd2dbe4c628607dd7ac40f009135e92ba9ab1027bccf9f63351bca2dd919e?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/774bd2dbe4c628607dd7ac40f009135e92ba9ab1027bccf9f63351bca2dd919e?s=96&r=g\",\"caption\":\"Anastasia Zoumpliou\"},\"url\":\"https:\/\/www.anychart.com\/blog\/author\/anastasia-zoumpliou\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"JS Candlestick Chart Making in Four Simple Steps (Tutorial)","description":"Do you have trading data, looking for a way to effectively visualize it for your website or app? A JS candlestick chart could be your best pick. Tutorial.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.anychart.com\/blog\/2020\/03\/25\/js-candlestick-chart-steps\/","og_locale":"en_US","og_type":"article","og_title":"Making JS Candlestick Chart in Four Simple Steps","og_description":"Looking for a way to effectively visualize trading data for a web page or app? A JS candlestick chart could be your best pick. Tutorial.","og_url":"https:\/\/www.anychart.com\/blog\/2020\/03\/25\/js-candlestick-chart-steps\/","og_site_name":"AnyChart News","article_publisher":"https:\/\/www.facebook.com\/AnyCharts","article_published_time":"2020-03-25T11:43:48+00:00","article_modified_time":"2022-08-13T10:11:31+00:00","og_image":[{"url":"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/03\/js-candlestick-chart-tutorial.png","type":"","width":"","height":""}],"author":"Anastasia Zoumpliou","twitter_card":"summary_large_image","twitter_title":"Making JS Candlestick Chart in Four Simple Steps","twitter_description":"Looking for a way to effectively visualize trading data for a web page or app? A JS candlestick chart could be your best pick. Tutorial.","twitter_image":"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/03\/js-candlestick-chart-tutorial.png","twitter_creator":"@AnyChart","twitter_site":"@AnyChart","twitter_misc":{"Written by":"Anastasia Zoumpliou","Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.anychart.com\/blog\/2020\/03\/25\/js-candlestick-chart-steps\/#article","isPartOf":{"@id":"https:\/\/www.anychart.com\/blog\/2020\/03\/25\/js-candlestick-chart-steps\/"},"author":{"name":"Anastasia Zoumpliou","@id":"https:\/\/www.anychart.com\/blog\/#\/schema\/person\/f5cd0be5c1240a1276a6b36bfeca2bff"},"headline":"Making JS Candlestick Chart in Four Simple Steps","datePublished":"2020-03-25T11:43:48+00:00","dateModified":"2022-08-13T10:11:31+00:00","mainEntityOfPage":{"@id":"https:\/\/www.anychart.com\/blog\/2020\/03\/25\/js-candlestick-chart-steps\/"},"wordCount":1293,"commentCount":0,"image":{"@id":"https:\/\/www.anychart.com\/blog\/2020\/03\/25\/js-candlestick-chart-steps\/#primaryimage"},"thumbnailUrl":"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/03\/js-candlestick-chart-tutorial.png","keywords":["AnyChart","candlestick chart","chart examples","chart types","charts","data analysis","data analytics","Data Visualization","data visualization examples","data visualization tutorial","date","EURUSD","Financial charts","financial data","guest post","HTML5","html5 charts","infographics","JavaScript","javascript chart tutorial","javascript charting","JavaScript charting library","javascript charts","js chart","js charting","js charts","statistics","Stock charts","Tips and tricks","tutorial","USDEUR"],"articleSection":["AnyChart Charting Component","AnyStock","Big Data","Financial Charts","HTML5","JavaScript","JavaScript Chart Tutorials","Stock Charts","Tips and Tricks"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.anychart.com\/blog\/2020\/03\/25\/js-candlestick-chart-steps\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.anychart.com\/blog\/2020\/03\/25\/js-candlestick-chart-steps\/","url":"https:\/\/www.anychart.com\/blog\/2020\/03\/25\/js-candlestick-chart-steps\/","name":"JS Candlestick Chart Making in Four Simple Steps (Tutorial)","isPartOf":{"@id":"https:\/\/www.anychart.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.anychart.com\/blog\/2020\/03\/25\/js-candlestick-chart-steps\/#primaryimage"},"image":{"@id":"https:\/\/www.anychart.com\/blog\/2020\/03\/25\/js-candlestick-chart-steps\/#primaryimage"},"thumbnailUrl":"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/03\/js-candlestick-chart-tutorial.png","datePublished":"2020-03-25T11:43:48+00:00","dateModified":"2022-08-13T10:11:31+00:00","author":{"@id":"https:\/\/www.anychart.com\/blog\/#\/schema\/person\/f5cd0be5c1240a1276a6b36bfeca2bff"},"description":"Do you have trading data, looking for a way to effectively visualize it for your website or app? A JS candlestick chart could be your best pick. Tutorial.","breadcrumb":{"@id":"https:\/\/www.anychart.com\/blog\/2020\/03\/25\/js-candlestick-chart-steps\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.anychart.com\/blog\/2020\/03\/25\/js-candlestick-chart-steps\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.anychart.com\/blog\/2020\/03\/25\/js-candlestick-chart-steps\/#primaryimage","url":"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/03\/js-candlestick-chart-tutorial.png","contentUrl":"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/03\/js-candlestick-chart-tutorial.png","width":1920,"height":1211},{"@type":"BreadcrumbList","@id":"https:\/\/www.anychart.com\/blog\/2020\/03\/25\/js-candlestick-chart-steps\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.anychart.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Making JS Candlestick Chart in Four Simple Steps"}]},{"@type":"WebSite","@id":"https:\/\/www.anychart.com\/blog\/#website","url":"https:\/\/www.anychart.com\/blog\/","name":"AnyChart News","description":"AnyChart JS Charts","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.anychart.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.anychart.com\/blog\/#\/schema\/person\/f5cd0be5c1240a1276a6b36bfeca2bff","name":"Anastasia Zoumpliou","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.anychart.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/774bd2dbe4c628607dd7ac40f009135e92ba9ab1027bccf9f63351bca2dd919e?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/774bd2dbe4c628607dd7ac40f009135e92ba9ab1027bccf9f63351bca2dd919e?s=96&r=g","caption":"Anastasia Zoumpliou"},"url":"https:\/\/www.anychart.com\/blog\/author\/anastasia-zoumpliou\/"}]}},"_links":{"self":[{"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/posts\/9923","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/users\/17"}],"replies":[{"embeddable":true,"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/comments?post=9923"}],"version-history":[{"count":54,"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/posts\/9923\/revisions"}],"predecessor-version":[{"id":15482,"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/posts\/9923\/revisions\/15482"}],"wp:attachment":[{"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/media?parent=9923"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/categories?post=9923"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/tags?post=9923"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}