{"id":8071,"date":"2019-06-13T08:46:32","date_gmt":"2019-06-13T08:46:32","guid":{"rendered":"https:\/\/www.anychart.com\/blog\/?p=8071"},"modified":"2022-08-13T10:57:12","modified_gmt":"2022-08-13T10:57:12","slug":"create-interactive-sankey-diagram-javascript-tutorial","status":"publish","type":"post","link":"https:\/\/www.anychart.com\/blog\/2019\/06\/13\/create-interactive-sankey-diagram-javascript-tutorial\/","title":{"rendered":"Create Cool Interactive Sankey Diagram Using JavaScript \u2014 Tutorial"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2019\/06\/Tutorial-How-To-Create-Cool-Interactive-Sankey-Diagram-Using-JavaScript-Blog.png\" alt=\"Create Cool Interactive Sankey Diagram Using JavaScript \u2014 Tutorial\" width=\"100%\" class=\"alignnone size-full wp-image-8087\" srcset=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2019\/06\/Tutorial-How-To-Create-Cool-Interactive-Sankey-Diagram-Using-JavaScript-Blog.png 1100w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2019\/06\/Tutorial-How-To-Create-Cool-Interactive-Sankey-Diagram-Using-JavaScript-Blog-300x178.png 300w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2019\/06\/Tutorial-How-To-Create-Cool-Interactive-Sankey-Diagram-Using-JavaScript-Blog-768x455.png 768w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2019\/06\/Tutorial-How-To-Create-Cool-Interactive-Sankey-Diagram-Using-JavaScript-Blog-1024x607.png 1024w\" sizes=\"(max-width: 1100px) 100vw, 1100px\" \/><a href=\"https:\/\/www.anychart.com\/chartopedia\/chart-type\/sankey-diagram\/\">Sankey diagrams<\/a> are becoming more and more popular in data visualization tasks. So, it\u2019s essential for front-end web developers to know how to create charts of this type. Actually, it is quite a simple and straightforward process, especially if you are using one of the good JavaScript charting libraries.<\/p>\n<p>In my tutorial, I\u2019ll show you how to create beautiful, intuitive, interactive JS (HTML5) Sankey diagrams with no fuss.<\/p>\n<p><!--more Read the JS charting tutorial \u00bb--><\/p>\n<h2>What Is Sankey Diagram<\/h2>\n<p>Let\u2019s start with quickly figuring out what Sankey is so you can understand the purpose, before we get down to the JavaScript charting matter itself.<\/p>\n<p>A Sankey diagram, or a Sankey chart, is a type of data visualization that displays flows and quantities from one set of values to the other, proportionally. For the inquisitive, it is named after Irish-born captain and engineer Matthew Sankey, who created a chart illustrating the energy efficiency of a steam engine in the late 19th century.<\/p>\n<p>In Sankey diagrams, the things being linked to each other are referred to as nodes, and they are connected using lines or arrows. The width of the lines or arrows is proportional to the flow quantity from the source to the target; that is, the larger the width, the larger the flow quantity.<\/p>\n<p>The lines or arrows can be joined or separated through their paths on every phase of a process. You can also add color to split the chart into different categories or to demonstrate the transition occurring from one state of the process to the other.<\/p>\n<p>As such, Sankeys are useful in displaying the major transfers or flows in a system, which can assist in pointing the domineering contributors to an overall process. Therefore, this type of chart can be very good in visualizing many-to-many relationships between two domains or multiple paths through a set of phases within a system.<\/p>\n<p>For example, Sankey charts can be used for illustrating the energy flow from the source to destination, the transfer of goods from one location to the other, and other diverse processes and their states.<\/p>\n<h2>How to Build Simple JavaScript Sankey Diagram<\/h2>\n<p>Sankey diagrams look complicated and may seem to be difficult to create. However, there are several <a href=\"https:\/\/en.wikipedia.org\/wiki\/Sankey_diagram#Sankey_diagram_drawing_tools\" target=\"_blank\" rel=\"nofollow\">Sankey charting libraries<\/a> available on the web that you can use to draw interactive Sankey charts easily.<\/p>\n<p>Essentially, the steps for drawing Sankey diagrams with almost any JavaScript library for data visualization that supports this chart type tend to be more or less the same. Therefore, after mastering how to use any of them, you can simply extrapolate the process to the other libraries, and build something else remarkable.<\/p>\n<p>For this Sankey diagram tutorial, I\u2019ll use the <a href=\"https:\/\/www.anychart.com\/\">AnyChart<\/a> JavaScript charting library. AnyChart is lightweight, versatile, and easy-to-use. Particularly, I like its extensive <a href=\"https:\/\/docs.anychart.com\" target=\"_blank\" rel=\"nofollow\">documentation<\/a> that comes with a <a href=\"https:\/\/playground.anychart.com\/\" target=\"_blank\" rel=\"nofollow\">code playground<\/a> for testing out things, a wide range of supported chart types, and several other captivating data visualization features.<\/p>\n<p>Now, let\u2019s get our hands dirty and see how to use AnyChart for drawing cool interactive JavaScript-based Sankey charts.<\/p>\n<p>Here are the steps to follow.<\/p>\n<h3>1. Create a container<\/h3>\n<p>Let\u2019s start by creating a container on the HTML page that will reference the Sankey diagram.<\/p>\n<pre><code class=\"html\">&lt;div id=\"container\"&gt;&lt;\/div&gt;<\/code><\/pre>\n<h3>2. Connect to a JavaScript charting library<\/h3>\n<p>Connecting to a JS charting library assists in deploying its features to our work space. We can connect to a library by either downloading the relevant packages and keeping them locally or using a Content Delivery Network (CDN) service. A CDN is usually preferred because it deploys the library\u2019s files from a data center nearest to the user, leading to greater availability of the content and better performance.<\/p>\n<p>AnyChart utilizes a minimalist, modular-based technique that allows you to connect only those chart types and features you require in your project, impressively lowering the size of the JavaScript code required in your application.<\/p>\n<p>For creating a Sankey chart, we\u2019ll need to add the following Core and the Sankey Diagram modules in the <code>&lt;head&gt;<\/code> section of our page.<\/p>\n<pre><code class=\"html\">&lt;script src=\"https:\/\/cdn.anychart.com\/releases\/v8\/js\/anychart-core.min.js\"&gt;&lt;\/script&gt;\r\n&lt;script src=\"https:\/\/cdn.anychart.com\/releases\/v8\/js\/anychart-sankey.min.js\"&gt;&lt;\/script&gt;<\/code><\/pre>\n<h3>3. Create data<\/h3>\n<p>Now, let\u2019s create the array of data that will be displayed on the Sankey diagram. The AnyChart JS charting library requires the following data fields to be defined:<\/p>\n<p><code>from<\/code>\u200a\u2014\u200aspecifies the source of the data flow<br \/>\n<code>to<\/code>\u200a\u2014\u200aspecifies the destination of the data flow<br \/>\n<code>weight<\/code>\u200a\u2014\u200aspecifies the value of the data<\/p>\n<p>In AnyChart, a data row identifies the data flow connecting two nodes, whose names are defined in the <code>from<\/code> and <code>to<\/code> fields. The <code>weight<\/code> value represents the width of every flow; wherein, the bigger the width, the bigger the flow quantity.<\/p>\n<p>The nodes, which are arranged into multiple columns automatically, have varying heights that are proportionate to the total quantity of either incoming or outgoing flows; that is, the larger the quantity, the higher the height.<\/p>\n<p>For example, here is an arbitrary data of the web traffic that some websites receive from two popular search engines per day:<\/p>\n<pre><code class=\"javascript\">var data = [\r\n {from: \"Google\", to: \"Facebook\", weight: 20000},\r\n {from: \"Google\", to: \"Twitter\", weight: 17000},\r\n {from: \"Google\", to: \"YouTube\", weight: 8000},\r\n {from: \"Google\", to: \"Wikipedia\", weight: 11000},\r\n {from: \"Bing\", to: \"Facebook\", weight: 7500},\r\n {from: \"Bing\", to: \"Twitter\", weight: 5000},\r\n {from: \"Bing\", to: \"Wikipedia\", weight: 4000}\r\n ];<\/code><\/pre>\n<h3>4. Call the Sankey function<\/h3>\n<p>To draw a Sankey diagram, we\u2019ll need to call the <code>anychart.sankey()<\/code> chart constructor and pass the <code>data<\/code> parameter to it, as illustrated below.<\/p>\n<pre><code class=\"javascript\">var sankey_chart = anychart.sankey(data);<\/code><\/pre>\n<h3>5. Customize the nodes<\/h3>\n<p>Let\u2019s now call the <code>nodeWidth()<\/code> method to configure the width of the nodes. The width of the nodes can be set either as a percentage or in pixels.<\/p>\n<pre><code class=\"javascript\">sankey_chart.nodeWidth(\"20%\");<\/code><\/pre>\n<p>Furthermore, we can call the <code>nodePadding()<\/code> method to set the vertical padding between the nodes. In this case, we provided a value of 20 for the vertical padding.<\/p>\n<pre><code class=\"javascript\">sankey_chart.nodePadding(20);<\/code><\/pre>\n<h3>6. Set container id and initiate drawing the JS chart<\/h3>\n<p>Let\u2019s point the Sankey Diagram to the container id we created on the HTML page and initiate drawing the beautiful chart.<\/p>\n<pre><code class=\"javascript\">sankey_chart.container(\"container\");\r\nsankey_chart.draw();<\/code><\/pre>\n<p>Lastly, we\u2019ll wrap the entire code within AnyChart\u2019s <code>onDocumentReady()<\/code> function to ensure that the chart is rendered when the web page is ready for displaying content.<\/p>\n<p>Here is the entire code for creating the simple Sankey diagram using JavaScript:<\/p>\n<pre><code>&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;script src=\"https:\/\/cdn.anychart.com\/releases\/v8\/js\/anychart-core.min.js\"&gt;&lt;\/script&gt;\r\n&lt;script src=\"https:\/\/cdn.anychart.com\/releases\/v8\/js\/anychart-sankey.min.js\"&gt;&lt;\/script&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;div id=\"container\"&gt;&lt;\/div&gt;\r\n&lt;script&gt;\r\nanychart.onDocumentReady(function(){\r\n \/\/creating the data\r\n var data = [\r\n {from: \"Google\", to: \"Facebook\", weight: 20000},\r\n {from: \"Google\", to: \"Twitter\", weight: 17000},\r\n {from: \"Google\", to: \"YouTube\", weight: 8000},\r\n {from: \"Google\", to: \"Wikipedia\", weight: 11000},\r\n {from: \"Bing\", to: \"Facebook\", weight: 7500},\r\n {from: \"Bing\", to: \"Twitter\", weight: 5000},\r\n {from: \"Bing\", to: \"Wikipedia\", weight: 4000}\r\n ];\r\n\/\/calling the Sankey function\r\nvar sankey_chart = anychart.sankey(data);\r\n\/\/customizing the width of the nodes\r\nsankey_chart.nodeWidth(\"20%\");\r\n\/\/setting the chart title\r\nsankey_chart.title(\"Simple Sankey Diagram Example\");\r\n\/\/customizing the vertical padding of the nodes\r\nsankey_chart.nodePadding(20);\r\n\/\/setting the container id\r\nsankey_chart.container(\"container\");\r\n\/\/initiating drawing the Sankey diagram\r\nsankey_chart.draw();\r\n});\r\n&lt;\/script&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;<\/code><\/pre>\n<p>Here is how the chart looks on a browser:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2019\/06\/Building-a-simple-JavaScript-Sankey-diagram.png\" alt=\"A simple interactive JavaScript-based Sankey diagram\" width=\"100%\" class=\"alignnone size-full wp-image-8075\" srcset=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2019\/06\/Building-a-simple-JavaScript-Sankey-diagram.png 1007w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2019\/06\/Building-a-simple-JavaScript-Sankey-diagram-300x190.png 300w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2019\/06\/Building-a-simple-JavaScript-Sankey-diagram-768x487.png 768w\" sizes=\"(max-width: 1007px) 100vw, 1007px\" \/><\/p>\n<p>As you can see on the image above, this Sankey chart is interactive by default.<\/p>\n<p>Some of its default interactive behaviors include showing tooltips of the weight values, highlighting the flows when hovered over, and displaying the nodes with different colors.<\/p>\n<h2>How to Enhance JS Sankey Chart Visually<\/h2>\n<p>Since we already know how to use the AnyChart JS library to draw simple Sankey diagrams, let\u2019s talk about how to enhance their capabilities in representing data visualization tasks.<\/p>\n<p>For example, you can improve the charts by customizing their appearance, adding dropoffs, and creating multilevel charts.<\/p>\n<p>Let\u2019s talk about each of them.<\/p>\n<h3>a. Customizing appearance<\/h3>\n<p><a href=\"https:\/\/docs.anychart.com\/Basic_Charts\/Sankey_Diagram\" target=\"_blank\" rel=\"nofollow\">AnyChart Sankey diagrams<\/a> can be customized to improve their appearance. For example, the visual appearance of the nodes and flows can be configured to show different colors depending on their normal and hovered states.<\/p>\n<p>To achieve this, the <code>normal()<\/code> method and <code>hovered()<\/code> method can be used together with the <code>fill()<\/code> method (for setting the fill) and <code>stroke()<\/code> method (for setting the stroke).<\/p>\n<p>Here is the code for configuring the chart\u2019s visual appearance:<\/p>\n<pre><code>&lt;html&gt;\r\n&lt;head>&gt;\r\n&lt;script src=\"https:\/\/cdn.anychart.com\/releases\/v8\/js\/anychart-core.min.js\"&gt;&lt;\/script&gt;\r\n&lt;script src=\"https:\/\/cdn.anychart.com\/releases\/v8\/js\/anychart-sankey.min.js\"&gt;&lt;\/script&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;div id=\"container\"&gt;&lt;\/div&gt;\r\n&lt;script&gt;\r\nanychart.onDocumentReady(function(){\r\n \/\/creating the data\r\n var data = [\r\n {from: \"Google\", to: \"Facebook\", weight: 20000},\r\n {from: \"Google\", to: \"Twitter\", weight: 17000},\r\n {from: \"Google\", to: \"YouTube\", weight: 8000},\r\n {from: \"Google\", to: \"Wikipedia\", weight: 11000},\r\n {from: \"Bing\", to: \"Facebook\", weight: 7500},\r\n {from: \"Bing\", to: \"Twitter\", weight: 5000},\r\n {from: \"Bing\", to: \"Wikipedia\", weight: 4000}\r\n ];\r\n\/\/calling the Sankey function\r\nvar sankey_chart = anychart.sankey(data);\r\n\/\/customizing the width of the nodes\r\nsankey_chart.nodeWidth(\"20%\");\r\n\/\/setting the chart title\r\nsankey_chart.title(\"Sankey Diagram Customization Example\");\r\n\/\/customizing the vertical padding of the nodes\r\nsankey_chart.nodePadding(20);\r\n\/\/customizing the visual appearance of nodes\r\nsankey_chart.node().normal().fill(\"#64b5f5 0.6\");\r\nsankey_chart.node().hovered().fill(anychart.color.darken(\"#64b5f7\"));\r\nsankey_chart.node().normal().stroke(\"#455a63\", 2);\r\n\/\/customizing the visual appearance of flows\r\nsankey_chart.flow().normal().fill(\"#ffa000 0.5\");\r\nsankey_chart.flow().hovered().fill(anychart.color.darken(\"#ffa000\"));\r\nsankey_chart.flow().hovered().stroke(\"#455a63\");\r\n\/\/setting the container id\r\nsankey_chart.container(\"container\");\r\n\/\/initiating drawing the Sankey diagram\r\nsankey_chart.draw();\r\n});\r\n&lt;\/script&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;<\/code><\/pre>\n<p>Here is how the configured chart looks on a browser:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2019\/06\/Creating-a-JS-Sankey-chart-with-a-custom-design-look.png\" alt=\"A JS Sankey chart (Sankey diagram) featuring a custom look\" width=\"100%\" class=\"alignnone size-full wp-image-8074\" srcset=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2019\/06\/Creating-a-JS-Sankey-chart-with-a-custom-design-look.png 999w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2019\/06\/Creating-a-JS-Sankey-chart-with-a-custom-design-look-300x194.png 300w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2019\/06\/Creating-a-JS-Sankey-chart-with-a-custom-design-look-768x497.png 768w\" sizes=\"(max-width: 999px) 100vw, 999px\" \/><\/p>\n<h3>b. Adding dropoffs<\/h3>\n<p>A dropoff is formed whenever the destination of the flow is lacking. Since the target node is not provided, a dropoff usually showcases losses. Therefore, to set up a dropoff, include a data row with the value of <code>null<\/code> in the <code>to<\/code> field. You also need to set the name of the data flow source in the <code>from<\/code> field and the value of the dropoff in the <code>weight<\/code> field.<\/p>\n<p>You can also customize the dropoff to suit your preferences, such as configuring its visual appearance.<\/p>\n<p>Here is the code for adding dropoffs that show the process of transmitting solar light energy until it reaches the interior of a building:<\/p>\n<pre><code>&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;script src=\"https:\/\/cdn.anychart.com\/releases\/v8\/js\/anychart-core.min.js\"&gt;&lt;\/script&gt;\r\n&lt;script src=\"https:\/\/cdn.anychart.com\/releases\/v8\/js\/anychart-sankey.min.js\"&gt;&lt;\/script&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;div id=\"container\"&gt;&lt;\/div&gt;\r\n&lt;script&gt;\r\nanychart.onDocumentReady(function(){\r\n \/\/creating the data\r\nvar data = [\r\n {from: \"Solar Light\", to: \"Shade\", weight: 110},\r\n {from: \"Shade\", to: null, weight: 60},\r\n {from: \"Shade\", to: \"Facade\", weight: 40},\r\n {from: \"Facade\", to: null, weight: 30},\r\n {from: \"Facade\", to: \"Interior Lighting\", weight: 20}\r\n];\r\n\/\/calling the Sankey function\r\nvar sankey_chart = anychart.sankey(data);\r\n\/\/customizing the width of the nodes\r\nsankey_chart.nodeWidth(\"50%\");\r\n\/\/setting the chart title\r\nsankey_chart.title(\"Sankey Diagram Dropoff Example\");\r\n\/\/customizing the vertical padding of the nodes\r\nsankey_chart.nodePadding(20);\r\n\/\/customizing the visual appearance of dropoff\r\nsankey_chart.dropoff().normal().fill(\r\n {keys: [\"#dd2c01 0.5\", \"#455a62 0.9\"], angle: 275}\r\n);\r\nsankey_chart.dropoff().hovered().stroke(\"#455a61\");\r\n\/\/setting the container id\r\nsankey_chart.container(\"container\");\r\n\/\/initiating drawing the Sankey diagram\r\nsankey_chart.draw();\r\n});\r\n&lt;\/script&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;<\/code><\/pre>\n<p>Here is how the dropoffs look on a browser:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2019\/06\/Making-a-JavaScript-Sankey-Diagram-with-a-drop-off.png\" alt=\"A JavaScript Sankey diagram with the drop-off functionality\" width=\"100%\" class=\"alignnone size-full wp-image-8073\" srcset=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2019\/06\/Making-a-JavaScript-Sankey-Diagram-with-a-drop-off.png 995w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2019\/06\/Making-a-JavaScript-Sankey-Diagram-with-a-drop-off-300x191.png 300w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2019\/06\/Making-a-JavaScript-Sankey-Diagram-with-a-drop-off-768x489.png 768w\" sizes=\"(max-width: 995px) 100vw, 995px\" \/><\/p>\n<h3>c. Creating multilevel Sankey charts<\/h3>\n<p>Furthermore, you can use the AnyChart JS library to create Sankey Diagrams having multiple levels of linkages.<\/p>\n<p>In the example below, I\u2019ve created a Sankey diagram that shows an arbitrary number of people migrating from one country to the other per year. The nodes are arranged in three columns and the additional levels are added automatically, and as necessary.<\/p>\n<p>Here is the code:<\/p>\n<pre><code>&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;script src=\"https:\/\/cdn.anychart.com\/releases\/v8\/js\/anychart-core.min.js\"&gt;&lt;\/script&gt;\r\n&lt;script src=\"https:\/\/cdn.anychart.com\/releases\/v8\/js\/anychart-sankey.min.js\"&gt;&lt;\/script&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;div id=\"container\"&gt;&lt;\/div&gt; \r\n&lt;script&gt;\r\nanychart.onDocumentReady(function(){\r\n \/\/creating the data\r\nvar data = [\r\n {from: \"France\", to: \"Canada\", weight: 3000},\r\n {from: \"France\", to: \"Germany\", weight: 2000},\r\n {from: \"France\", to: \"South Africa\", weight: 1100},\r\n {from: \"France\", to: \"Portugal\", weight: 900},\r\n {from: \"US\", to: \"China\", weight: 2200},\r\n {from: \"US\", to: \"Canada\", weight: 400},\r\n {from: \"US\", to: \"Germany\", weight: 700},\r\n {from: \"US\", to: \"Portugal\", weight: 200},\r\n {from: \"Canada\", to: \"China\", weight: 1500},\r\n {from: \"Canada\", to: \"Japan\", weight: 3300},\r\n {from: \"Canada\", to: \"England\", weight: 550},\r\n {from: \"Germany\", to: \"China\", weight: 1100},\r\n {from: \"Germany\", to: \"Japan\", weight: 750},\r\n {from: \"Germany\", to: \"England\", weight: 400},\r\n {from: \"South Africa\", to: \"China\", weight: 3100},\r\n {from: \"Portugal\", to: \"China\", weight: 2100},\r\n {from: \"Portugal\", to: \"Japan\", weight: 1600}\r\n];\r\n\/\/calling the Sankey function\r\nvar sankey_chart = anychart.sankey(data);\r\n\/\/customizing the width of the nodes\r\nsankey_chart.nodeWidth(\"50%\");\r\n\/\/setting the chart title\r\nsankey_chart.title(\"Sankey Multilevel Chart Example\");\r\n\/\/customizing the vertical padding of the nodes\r\nsankey_chart.nodePadding(20);\r\n\/\/setting the container id\r\nsankey_chart.container(\"container\");\r\n\/\/initiating drawing the Sankey diagram\r\nsankey_chart.draw();\r\n});\r\n&lt;\/script&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;<\/code><\/pre>\n<p>Here is how the multilevel Sankey charts look on a browser:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2019\/06\/JS-coding-a-multi-level-Sankey-diagram-for-websites-and-apps.png\" alt=\"Multi-level Sankey diagram in JavaScript HTML5\" width=\"100%\" class=\"alignnone size-full wp-image-8088\" srcset=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2019\/06\/JS-coding-a-multi-level-Sankey-diagram-for-websites-and-apps.png 1000w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2019\/06\/JS-coding-a-multi-level-Sankey-diagram-for-websites-and-apps-300x191.png 300w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2019\/06\/JS-coding-a-multi-level-Sankey-diagram-for-websites-and-apps-768x488.png 768w\" sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><\/p>\n<h2>Wrapping Up<\/h2>\n<p>As you\u2019ve seen from this JS chart tutorial, creating intuitive and interactive Sankey diagrams using a good data visualization library is not rocket science. With a developer-friendly solution, you can create wonderful charts and take your data visualization efforts to the next level.<\/p>\n<p>Of course, we just scratched the surface on what you can do with Sankey diagrams. You can visit the AnyChart documentation and learn how to make the most of Sankey charts, as well as several other <a href=\"https:\/\/www.anychart.com\/features\/#chart-types\">types of charts<\/a>.<\/p>\n<p>You can also try out the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Comparison_of_JavaScript_charting_libraries\" target=\"_blank\" rel=\"nofollow\">other JavaScript charting libraries<\/a> and assess their capability of assisting you in adding the visualizations you need to your web applications.<\/p>\n<p>Do you have any comments or questions?<\/p>\n<p>Please post them below.<\/p>\n<hr \/>\n<p><em>The &#8220;Create Cool Interactive Sankey Diagram Using JavaScript \u2014 Tutorial&#8221;\u00a0article is published on the AnyChart blog with permission of Alfrick Opidi.<\/p>\n<p>Originally appeared on <a href=\"https:\/\/hackernoon.com\/create-javascript-sankey-diagram-b68c0d508a38\" target=\"_blank\" rel=\"nofollow\">Hacker Noon<\/a> under the title &#8220;How to Create Cool Interactive Sankey Diagrams Using JavaScript&#8221; on May 15, 2019.<\/em><\/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>Sankey diagrams are becoming more and more popular in data visualization tasks. So, it\u2019s essential for front-end web developers to know how to create charts of this type. Actually, it is quite a simple and straightforward process, especially if you are using one of the good JavaScript charting libraries. In my tutorial, I\u2019ll show you [&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":15,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,263,8,22,23,13,279,4],"tags":[53,35,258,44,54,256,844,1026,1025,32,55,144,36,907,141,81,57,58,65,56,1022,1024,415,1023,30,172],"class_list":["post-8071","post","type-post","status-publish","format-standard","hentry","category-anychart-charting-component","category-big-data","category-business-intelligence","category-charts-and-art","category-html5","category-javascript","category-javascript-chart-tutorials","category-tips-and-tricks","tag-anychart","tag-business-intelligence","tag-charts","tag-charts-and-art","tag-data-visualization","tag-data-visualization-examples","tag-data-visualization-tutorial","tag-energy-flow","tag-hacker-noon","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-sankey-chart","tag-sankey-charts","tag-sankey-diagram","tag-sankey-diagrams","tag-tips-and-tricks","tag-tutorial","wpautop"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Create Cool Interactive Sankey Diagram Using JavaScript \u2014 Tutorial<\/title>\n<meta name=\"description\" content=\"Read this tutorial to make sure you know an easy way to create a beautiful interactive Sankey diagram in JavaScript \u2014 a must for front-end web developers.\" \/>\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\/2019\/06\/13\/create-interactive-sankey-diagram-javascript-tutorial\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create Cool Interactive Sankey Diagram Using JavaScript \u2014 Tutorial\" \/>\n<meta property=\"og:description\" content=\"Read this tutorial to make sure you know an easy way to create a beautiful interactive Sankey diagram in JavaScript \u2014 a must for front-end web developers.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.anychart.com\/blog\/2019\/06\/13\/create-interactive-sankey-diagram-javascript-tutorial\/\" \/>\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=\"2019-06-13T08:46:32+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-08-13T10:57:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2019\/06\/Tutorial-How-To-Create-Cool-Interactive-Sankey-Diagram-Using-JavaScript-Blog.png\" \/>\n<meta name=\"author\" content=\"Alfrick Opidi\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"Create Cool Interactive Sankey Diagram Using JavaScript \u2014 Tutorial\" \/>\n<meta name=\"twitter:description\" content=\"Read this tutorial to make sure you know an easy way to create a beautiful interactive Sankey diagram in JavaScript \u2014 a must for front-end web developers.\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2019\/06\/Tutorial-How-To-Create-Cool-Interactive-Sankey-Diagram-Using-JavaScript-Blog.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=\"Alfrick Opidi\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.anychart.com\/blog\/2019\/06\/13\/create-interactive-sankey-diagram-javascript-tutorial\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/2019\/06\/13\/create-interactive-sankey-diagram-javascript-tutorial\/\"},\"author\":{\"name\":\"Alfrick Opidi\",\"@id\":\"https:\/\/www.anychart.com\/blog\/#\/schema\/person\/b04f8646463ba21baf9c48d4e46809f3\"},\"headline\":\"Create Cool Interactive Sankey Diagram Using JavaScript \u2014 Tutorial\",\"datePublished\":\"2019-06-13T08:46:32+00:00\",\"dateModified\":\"2022-08-13T10:57:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/2019\/06\/13\/create-interactive-sankey-diagram-javascript-tutorial\/\"},\"wordCount\":1524,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/2019\/06\/13\/create-interactive-sankey-diagram-javascript-tutorial\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2019\/06\/Tutorial-How-To-Create-Cool-Interactive-Sankey-Diagram-Using-JavaScript-Blog.png\",\"keywords\":[\"AnyChart\",\"Business Intelligence\",\"charts\",\"Charts and Art\",\"Data Visualization\",\"data visualization examples\",\"data visualization tutorial\",\"energy flow\",\"Hacker Noon\",\"HTML5\",\"html5 charts\",\"infographics\",\"JavaScript\",\"javascript chart tutorial\",\"javascript charting\",\"JavaScript charting library\",\"javascript charts\",\"js chart\",\"js charting\",\"js charts\",\"Sankey chart\",\"Sankey charts\",\"Sankey Diagram\",\"Sankey diagrams\",\"Tips and tricks\",\"tutorial\"],\"articleSection\":[\"AnyChart Charting Component\",\"Big Data\",\"Business Intelligence\",\"Charts and Art\",\"HTML5\",\"JavaScript\",\"JavaScript Chart Tutorials\",\"Tips and Tricks\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.anychart.com\/blog\/2019\/06\/13\/create-interactive-sankey-diagram-javascript-tutorial\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.anychart.com\/blog\/2019\/06\/13\/create-interactive-sankey-diagram-javascript-tutorial\/\",\"url\":\"https:\/\/www.anychart.com\/blog\/2019\/06\/13\/create-interactive-sankey-diagram-javascript-tutorial\/\",\"name\":\"Create Cool Interactive Sankey Diagram Using JavaScript \u2014 Tutorial\",\"isPartOf\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/2019\/06\/13\/create-interactive-sankey-diagram-javascript-tutorial\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/2019\/06\/13\/create-interactive-sankey-diagram-javascript-tutorial\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2019\/06\/Tutorial-How-To-Create-Cool-Interactive-Sankey-Diagram-Using-JavaScript-Blog.png\",\"datePublished\":\"2019-06-13T08:46:32+00:00\",\"dateModified\":\"2022-08-13T10:57:12+00:00\",\"author\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/#\/schema\/person\/b04f8646463ba21baf9c48d4e46809f3\"},\"description\":\"Read this tutorial to make sure you know an easy way to create a beautiful interactive Sankey diagram in JavaScript \u2014 a must for front-end web developers.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/2019\/06\/13\/create-interactive-sankey-diagram-javascript-tutorial\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.anychart.com\/blog\/2019\/06\/13\/create-interactive-sankey-diagram-javascript-tutorial\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.anychart.com\/blog\/2019\/06\/13\/create-interactive-sankey-diagram-javascript-tutorial\/#primaryimage\",\"url\":\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2019\/06\/Tutorial-How-To-Create-Cool-Interactive-Sankey-Diagram-Using-JavaScript-Blog.png\",\"contentUrl\":\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2019\/06\/Tutorial-How-To-Create-Cool-Interactive-Sankey-Diagram-Using-JavaScript-Blog.png\",\"width\":1100,\"height\":652},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.anychart.com\/blog\/2019\/06\/13\/create-interactive-sankey-diagram-javascript-tutorial\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.anychart.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create Cool Interactive Sankey Diagram Using JavaScript \u2014 Tutorial\"}]},{\"@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\/b04f8646463ba21baf9c48d4e46809f3\",\"name\":\"Alfrick Opidi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.anychart.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c544d1b91e74e29c40ec7e45a0d2281753ea00fbc1c76efb32e865a081574823?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c544d1b91e74e29c40ec7e45a0d2281753ea00fbc1c76efb32e865a081574823?s=96&r=g\",\"caption\":\"Alfrick Opidi\"},\"url\":\"https:\/\/www.anychart.com\/blog\/author\/alfrick_opidi\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Create Cool Interactive Sankey Diagram Using JavaScript \u2014 Tutorial","description":"Read this tutorial to make sure you know an easy way to create a beautiful interactive Sankey diagram in JavaScript \u2014 a must for front-end web developers.","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\/2019\/06\/13\/create-interactive-sankey-diagram-javascript-tutorial\/","og_locale":"en_US","og_type":"article","og_title":"Create Cool Interactive Sankey Diagram Using JavaScript \u2014 Tutorial","og_description":"Read this tutorial to make sure you know an easy way to create a beautiful interactive Sankey diagram in JavaScript \u2014 a must for front-end web developers.","og_url":"https:\/\/www.anychart.com\/blog\/2019\/06\/13\/create-interactive-sankey-diagram-javascript-tutorial\/","og_site_name":"AnyChart News","article_publisher":"https:\/\/www.facebook.com\/AnyCharts","article_published_time":"2019-06-13T08:46:32+00:00","article_modified_time":"2022-08-13T10:57:12+00:00","og_image":[{"url":"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2019\/06\/Tutorial-How-To-Create-Cool-Interactive-Sankey-Diagram-Using-JavaScript-Blog.png","type":"","width":"","height":""}],"author":"Alfrick Opidi","twitter_card":"summary_large_image","twitter_title":"Create Cool Interactive Sankey Diagram Using JavaScript \u2014 Tutorial","twitter_description":"Read this tutorial to make sure you know an easy way to create a beautiful interactive Sankey diagram in JavaScript \u2014 a must for front-end web developers.","twitter_image":"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2019\/06\/Tutorial-How-To-Create-Cool-Interactive-Sankey-Diagram-Using-JavaScript-Blog.png","twitter_creator":"@AnyChart","twitter_site":"@AnyChart","twitter_misc":{"Written by":"Alfrick Opidi","Est. reading time":"12 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.anychart.com\/blog\/2019\/06\/13\/create-interactive-sankey-diagram-javascript-tutorial\/#article","isPartOf":{"@id":"https:\/\/www.anychart.com\/blog\/2019\/06\/13\/create-interactive-sankey-diagram-javascript-tutorial\/"},"author":{"name":"Alfrick Opidi","@id":"https:\/\/www.anychart.com\/blog\/#\/schema\/person\/b04f8646463ba21baf9c48d4e46809f3"},"headline":"Create Cool Interactive Sankey Diagram Using JavaScript \u2014 Tutorial","datePublished":"2019-06-13T08:46:32+00:00","dateModified":"2022-08-13T10:57:12+00:00","mainEntityOfPage":{"@id":"https:\/\/www.anychart.com\/blog\/2019\/06\/13\/create-interactive-sankey-diagram-javascript-tutorial\/"},"wordCount":1524,"commentCount":0,"image":{"@id":"https:\/\/www.anychart.com\/blog\/2019\/06\/13\/create-interactive-sankey-diagram-javascript-tutorial\/#primaryimage"},"thumbnailUrl":"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2019\/06\/Tutorial-How-To-Create-Cool-Interactive-Sankey-Diagram-Using-JavaScript-Blog.png","keywords":["AnyChart","Business Intelligence","charts","Charts and Art","Data Visualization","data visualization examples","data visualization tutorial","energy flow","Hacker Noon","HTML5","html5 charts","infographics","JavaScript","javascript chart tutorial","javascript charting","JavaScript charting library","javascript charts","js chart","js charting","js charts","Sankey chart","Sankey charts","Sankey Diagram","Sankey diagrams","Tips and tricks","tutorial"],"articleSection":["AnyChart Charting Component","Big Data","Business Intelligence","Charts and Art","HTML5","JavaScript","JavaScript Chart Tutorials","Tips and Tricks"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.anychart.com\/blog\/2019\/06\/13\/create-interactive-sankey-diagram-javascript-tutorial\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.anychart.com\/blog\/2019\/06\/13\/create-interactive-sankey-diagram-javascript-tutorial\/","url":"https:\/\/www.anychart.com\/blog\/2019\/06\/13\/create-interactive-sankey-diagram-javascript-tutorial\/","name":"Create Cool Interactive Sankey Diagram Using JavaScript \u2014 Tutorial","isPartOf":{"@id":"https:\/\/www.anychart.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.anychart.com\/blog\/2019\/06\/13\/create-interactive-sankey-diagram-javascript-tutorial\/#primaryimage"},"image":{"@id":"https:\/\/www.anychart.com\/blog\/2019\/06\/13\/create-interactive-sankey-diagram-javascript-tutorial\/#primaryimage"},"thumbnailUrl":"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2019\/06\/Tutorial-How-To-Create-Cool-Interactive-Sankey-Diagram-Using-JavaScript-Blog.png","datePublished":"2019-06-13T08:46:32+00:00","dateModified":"2022-08-13T10:57:12+00:00","author":{"@id":"https:\/\/www.anychart.com\/blog\/#\/schema\/person\/b04f8646463ba21baf9c48d4e46809f3"},"description":"Read this tutorial to make sure you know an easy way to create a beautiful interactive Sankey diagram in JavaScript \u2014 a must for front-end web developers.","breadcrumb":{"@id":"https:\/\/www.anychart.com\/blog\/2019\/06\/13\/create-interactive-sankey-diagram-javascript-tutorial\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.anychart.com\/blog\/2019\/06\/13\/create-interactive-sankey-diagram-javascript-tutorial\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.anychart.com\/blog\/2019\/06\/13\/create-interactive-sankey-diagram-javascript-tutorial\/#primaryimage","url":"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2019\/06\/Tutorial-How-To-Create-Cool-Interactive-Sankey-Diagram-Using-JavaScript-Blog.png","contentUrl":"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2019\/06\/Tutorial-How-To-Create-Cool-Interactive-Sankey-Diagram-Using-JavaScript-Blog.png","width":1100,"height":652},{"@type":"BreadcrumbList","@id":"https:\/\/www.anychart.com\/blog\/2019\/06\/13\/create-interactive-sankey-diagram-javascript-tutorial\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.anychart.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Create Cool Interactive Sankey Diagram Using JavaScript \u2014 Tutorial"}]},{"@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\/b04f8646463ba21baf9c48d4e46809f3","name":"Alfrick Opidi","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.anychart.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c544d1b91e74e29c40ec7e45a0d2281753ea00fbc1c76efb32e865a081574823?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c544d1b91e74e29c40ec7e45a0d2281753ea00fbc1c76efb32e865a081574823?s=96&r=g","caption":"Alfrick Opidi"},"url":"https:\/\/www.anychart.com\/blog\/author\/alfrick_opidi\/"}]}},"_links":{"self":[{"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/posts\/8071","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\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/comments?post=8071"}],"version-history":[{"count":15,"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/posts\/8071\/revisions"}],"predecessor-version":[{"id":15490,"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/posts\/8071\/revisions\/15490"}],"wp:attachment":[{"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/media?parent=8071"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/categories?post=8071"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/tags?post=8071"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}