{"id":16427,"date":"2023-03-22T16:17:14","date_gmt":"2023-03-22T16:17:14","guid":{"rendered":"https:\/\/www.anychart.com\/blog\/?p=16427"},"modified":"2023-03-22T16:40:35","modified_gmt":"2023-03-22T16:40:35","slug":"flow-map","status":"publish","type":"post","link":"https:\/\/www.anychart.com\/blog\/2023\/03\/22\/flow-map\/","title":{"rendered":"Creating Interactive Flow Maps with JavaScript"},"content":{"rendered":"<p><a href=\"https:\/\/www.anychart.com\/blog\/2023\/03\/22\/flow-map\/\"><img decoding=\"async\" src=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2023\/03\/flow-map-javascript.png\" alt=\"A laptop with an Interactive Flow Map built with JavaScript\" width=\"100%\" class=\"alignnone size-full wp-image-16448\" srcset=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2023\/03\/flow-map-javascript.png 1366w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2023\/03\/flow-map-javascript-300x169.png 300w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2023\/03\/flow-map-javascript-768x432.png 768w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2023\/03\/flow-map-javascript-1024x576.png 1024w\" sizes=\"(max-width: 1366px) 100vw, 1366px\" \/><\/a>Flow maps are a powerful way to represent the movement of objects between different geographic locations, and with JavaScript, creating an interactive flow map is easier than you might think. Flow maps <a href=\"https:\/\/www.anychart.com\/chartopedia\/chart-type\/flow-map\/\">combine<\/a> the functionality of a map and a flow diagram; this type of visualization shows the direction of movement of people, goods, money, or information, as well as the quantity of those.<\/p>\n<p>In this step-by-step <a href=\"https:\/\/www.anychart.com\/blog\/category\/javascript-chart-tutorials\/\">tutorial<\/a>, we&#8217;ll guide you through the process of creating a JavaScript flow map. To make it more practical, we&#8217;ll use the example of visualizing the number of students from India studying abroad in different countries. By following the tutorial, you&#8217;ll learn how to create your own flow maps using JavaScript, regardless of the data you choose to use.<\/p>\n<p>So, let&#8217;s get started! Follow along with us to learn how to develop your own JS Flow Map.<\/p>\n<p><!--more Read the JS charting tutorial \u00bb--><\/p>\n<h2>Flow Map Preview<\/h2>\n<p>Take a look at what your finished JavaScript flow map will look like once you&#8217;ve completed this tutorial. By following the step-by-step instructions, you&#8217;ll have the skills to build your own interactive flow maps using JavaScript.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2023\/03\/flow-map.png\" alt=\"Final Flow Map of the tutorial (JS)\" width=\"100%\" class=\"alignnone size-full wp-image-16447\" srcset=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2023\/03\/flow-map.png 1201w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2023\/03\/flow-map-300x171.png 300w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2023\/03\/flow-map-768x439.png 768w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2023\/03\/flow-map-1024x585.png 1024w\" sizes=\"(max-width: 1201px) 100vw, 1201px\" \/><\/a><\/p>\n<p>Follow along with me to see how it&#8217;s done. I\u2019ll guide you through each step of the process so you can create your own JS-based flow maps with ease.<\/p>\n<h2>How to Build Basic Flow Map with JavaScript<\/h2>\n<p>Creating a JavaScript-based flow map can be done in four basic steps:<\/p>\n<ol>\n<li>Create a web\u00a0page using HTML.<\/li>\n<li>Include the necessary JavaScript files.<\/li>\n<li>Add the data.<\/li>\n<li>Write JavaScript code to draw the chart.<\/li>\n<\/ol>\n<p>While having a good understanding of HTML, CSS, and JavaScript can be helpful, don&#8217;t worry if you&#8217;re new to these concepts. In this tutorial, we&#8217;ll guide you through each step in detail, and you&#8217;ll be able to follow along easily.<\/p>\n<h3>1. Create a web page\u00a0using HTML<\/h3>\n<p>To begin, let&#8217;s create a basic HTML page, as we need a container to display our flow map. We&#8217;ll do this by creating\u00a0a <code>&lt;div&gt;<\/code> element and setting its <code>id<\/code> attribute to &#8220;container&#8221;. This will allow us to reference the container later when we add the map.<\/p>\n<p>To make sure the flow map is displayed over the entire page, we&#8217;ll also set the <code>&lt;div&gt;<\/code>&#8216;s height and width to 100% using CSS. Feel free to adjust the styling to suit your preferences.<\/p>\n<pre class=\"html\"><code>&lt;!DOCTYPE html&gt;\r\n&lt;html lang=\"en\"&gt;\r\n  &lt;head&gt;\r\n    &lt;meta charset=\"utf-8\"&gt;\r\n    &lt;title&gt;Flow Map&lt;\/title&gt;\r\n    &lt;style type=\"text\/css\"&gt;      \r\n      html, body, #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  &lt;body&gt;\r\n    &lt;div id=\"container\"&gt;&lt;\/div&gt;\r\n  &lt;\/body&gt;\r\n&lt;\/html&gt;<\/code><\/pre>\n<h3>2. Include the necessary JavaScript files<\/h3>\n<p>Next, we&#8217;ll include the necessary scripts in the head section of our HTML file to develop the JS flow map.<\/p>\n<p>Using a <a href=\"https:\/\/www.anychart.com\/blog\/2017\/03\/05\/how-to-choose-the-right-javascript-charting-component-10-factors-you-have-to-consider\/\">JavaScript charting library<\/a> is the quickest and easiest way to create an interactive JavaScript flow map visualization. However, not all libraries support flow maps. For this tutorial, we&#8217;ll be using\u00a0<a href=\"https:\/\/www.anychart.com\/\">AnyChart JS Charts<\/a>, which supports flow maps and is a great choice due to its excellent <a href=\"https:\/\/docs.anychart.com\/Maps\/Quick_Start\" target=\"_blank\" rel=\"nofollow\">mapping documentation<\/a> and numerous ready-to-use\u00a0<a href=\"https:\/\/www.anychart.com\/products\/anymap\/gallery\/\">map examples<\/a>.<\/p>\n<p>To build our flow map, we&#8217;ll need to add a few AnyChart <a href=\"https:\/\/docs.anychart.com\/Quick_Start\/Modules\" target=\"_blank\" rel=\"nofollow\">modules<\/a>: the Core and Geo Map modules for data visualization, and geodata for the map. The <a href=\"http:\/\/proj4js.org\/\" target=\"_blank\" rel=\"nofollow\">Proj4js<\/a> library will be used for geographic coordinates, so it is also included. In addition, we\u2019ll need AnyChart\u2019s Common UI module and CSS, for zoom UI controls.<\/p>\n<pre class=\"html\"><code>&lt;!DOCTYPE html&gt;\r\n&lt;html lang=\"en\"&gt;\r\n  &lt;head&gt;\r\n    &lt;meta charset=\"utf-8\"&gt;\r\n    &lt;title&gt;Flow Map&lt;\/title&gt;\r\n    &lt;script src=\"https:\/\/cdn.anychart.com\/releases\/8.11.0\/js\/anychart-core.min.js\"&gt;&lt;\/script&gt;\r\n    &lt;script src=\"https:\/\/cdn.anychart.com\/releases\/8.11.0\/js\/anychart-map.min.js\"&gt;&lt;\/script&gt;\r\n    &lt;script src=\"https:\/\/cdn.anychart.com\/releases\/8.11.0\/geodata\/custom\/world\/world.js\"&gt;&lt;\/script&gt;\r\n    &lt;script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/proj4js\/2.8.0\/proj4.js\"&gt;&lt;\/script&gt;\r\n    &lt;script src=\"https:\/\/cdn.anychart.com\/releases\/8.11.0\/js\/anychart-ui.min.js\"&gt;&lt;\/script&gt;\r\n    &lt;link rel=\"stylesheet\" href=\"https:\/\/cdn.anychart.com\/releases\/8.11.0\/css\/anychart-ui.min.css\"&gt;\r\n    &lt;link rel=\"stylesheet\" href=\"https:\/\/cdn.anychart.com\/releases\/8.11.0\/fonts\/css\/anychart-font.min.css\"&gt;\r\n    &lt;style type=\"text\/css\"&gt;      \r\n      html, body, #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  &lt;body&gt;\r\n    &lt;div id=\"container\"&gt;&lt;\/div&gt;\r\n    &lt;script&gt;\r\n      \/\/ The JS flow map code will be written here.\r\n    &lt;\/script&gt;\r\n  &lt;\/body&gt;\r\n&lt;\/html&gt;<\/code><\/pre>\n<h3>3. Add the data<\/h3>\n<p>In this JS flow map tutorial, we will be visualizing the Top 10 destination countries for Indian students as of 2022. The data source for this visualization is the Ministry of External Affairs, India, which provides information on the <a href=\"https:\/\/www.mea.gov.in\/Images\/CPV\/lu3820-1-mar-25-22.pdf\" target=\"_blank\" rel=\"nofollow\">number of Indian students studying abroad<\/a>.<\/p>\n<p>To filter out the top 10 countries, I have analyzed the data and selected the following countries based on the number of Indian students studying there: Australia, Canada, Germany, Oman, Qatar, the Russian Federation, Saudi Arabia, the United Arab Emirates, the United Kingdom, and the United States.<\/p>\n<p>To create the flow map, we will be using the capital cities of these countries as the ending points of the connectors, while the starting point for all connectors will be New Delhi, India. To determine the latitude and longitude of the capital cities, I used the website <a href=\"https:\/\/www.latlong.net\/\" target=\"_blank\" rel=\"nofollow\">LatLong.net<\/a>. The table below shows the list of the selected countries, along with the total number of Indian students studying there and the coordinates of their respective capital cities.<\/p>\n<table style=\"border: 1px solid black;\">\n<thead>\n<tr>\n<th style=\"width: 30%; text-align: center; border: 1px solid black;\">Country<\/th>\n<th style=\"width: 30%; text-align: center; border: 1px solid black;\">Number of Indian students<\/th>\n<th style=\"width: 40%; text-align: center; border: 1px solid black;\">Latitude and longitude of the capital city<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"width: 30%; text-align: center; border: 1px solid black;\">Australia<\/td>\n<td style=\"width: 30%; text-align: center; border: 1px solid black;\">100009<\/td>\n<td style=\"width: 40%; text-align: center; border: 1px solid black;\">-30.59, 145.94<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 30%; text-align: center; border: 1px solid black;\">Canada<\/td>\n<td style=\"width: 30%; text-align: center; border: 1px solid black;\">183310<\/td>\n<td style=\"width: 40%; text-align: center; border: 1px solid black;\">45.41, -75.69<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 30%; text-align: center; border: 1px solid black;\">Germany<\/td>\n<td style=\"width: 30%; text-align: center; border: 1px solid black;\">34864<\/td>\n<td style=\"width: 40%; text-align: center; border: 1px solid black;\">52.51, 13.40<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 30%; text-align: center; border: 1px solid black;\">Oman<\/td>\n<td style=\"width: 30%; text-align: center; border: 1px solid black;\">39550<\/td>\n<td style=\"width: 40%; text-align: center; border: 1px solid black;\">23.58, 58.38<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 30%; text-align: center; border: 1px solid black;\">Qatar<\/td>\n<td style=\"width: 30%; text-align: center; border: 1px solid black;\">46000<\/td>\n<td style=\"width: 40%; text-align: center; border: 1px solid black;\">25.28, 51.53<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 30%; text-align: center; border: 1px solid black;\">Russian Federation<\/td>\n<td style=\"width: 30%; text-align: center; border: 1px solid black;\">18039<\/td>\n<td style=\"width: 40%; text-align: center; border: 1px solid black;\">55.74, 37.62<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 30%; text-align: center; border: 1px solid black;\">Saudi Arabia<\/td>\n<td style=\"width: 30%; text-align: center; border: 1px solid black;\">65800<\/td>\n<td style=\"width: 40%; text-align: center; border: 1px solid black;\">24.71, 46.67<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 30%; text-align: center; border: 1px solid black;\">United Arab Emirates<\/td>\n<td style=\"width: 30%; text-align: center; border: 1px solid black;\">164000<\/td>\n<td style=\"width: 40%; text-align: center; border: 1px solid black;\">24.45, 54.37<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 30%; text-align: center; border: 1px solid black;\">United Kingdom<\/td>\n<td style=\"width: 30%; text-align: center; border: 1px solid black;\">55465<\/td>\n<td style=\"width: 40%; text-align: center; border: 1px solid black;\">52.66, -0.95<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 30%; text-align: center; border: 1px solid black;\">United States<\/td>\n<td style=\"width: 30%; text-align: center; border: 1px solid black;\">465791<\/td>\n<td style=\"width: 40%; text-align: center; border: 1px solid black;\">38.88, -77.03<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<br \/>\nBelow is the dataset that we will use to build our flow map. It is an <a href=\"https:\/\/docs.anychart.com\/Working_with_Data\/Data_Sets#array_of_objects\" target=\"_blank\" rel=\"nofollow\">array of objects<\/a>, where each object represents one flow direction. Each object contains the starting point and ending point latitude and longitude, the name of the destination country, and the number of Indian students studying there according to India\u2019s MEA.<\/p>\n<pre class=\"javascript\"><code>var data = [\r\n  { points: [28.610198, 77.207584, -30.59, 145.94], to: \"Australia\", total: 100009 },\r\n  { points: [28.610198, 77.207584, 45.41, -75.69], to: \"Canada\", total: 183310 },\r\n  { points: [28.610198, 77.207584, 52.51, 13.40], to: \"Germany\", total: 34864 },\r\n  { points: [28.610198, 77.207584, 23.58, 58.38], to: \"Oman\", total: 39550 },\r\n  { points: [28.610198, 77.207584, 25.28, 51.53], to: \"Qatar\", total: 46000 },\r\n  { points: [28.610198, 77.207584, 55.74, 37.62], to: \"Russian Federation\", total: 18039 },\r\n  { points: [28.610198, 77.207584, 24.71, 46.67], to: \"Saudi Arabia\", total: 65800 },\r\n  { points: [28.610198, 77.207584, 24.45, 54.37], to: \"United Arab Emirates\", total: 164000 },\r\n  { points: [28.610198, 77.207584, 52.66, -0.95], to: \"United Kingdom\", total: 55465 },\r\n  { points: [28.610198, 77.207584, 38.88, -77.03], to: \"United States\", total: 465791 }\r\n];<\/code><\/pre>\n<h3>4. Write JavaScript code to draw the map<\/h3>\n<p>Now that we have prepared our data, let&#8217;s move on to the main part of putting our flow map on our web page.<\/p>\n<p>Before we begin, we need to make sure that our code only runs once the page has fully loaded and is ready. To do this, we will use the <code>anychart.onDocumentReady()<\/code> function to enclose all our flow map\u2019s JavaScript code.<\/p>\n<pre class=\"html\"><code>&lt;script&gt;\r\n  anychart.onDocumentReady(function () {\r\n    \/\/ The flow map code will be written here.\r\n  });\r\n&lt;\/script&gt;<\/code><\/pre>\n<p>Once that&#8217;s done, we can add the data we prepared in the previous step.<\/p>\n<pre class=\"javascript\"><code>anychart.onDocumentReady(function () {\r\n  var data = [\r\n    { points: [28.610198, 77.207584, -30.59, 145.94], to: \"Australia\", total:    100009 },\r\n    { points: [28.610198, 77.207584, 45.41, -75.69], to: \"Canada\", total: 183310 },\r\n    { points: [28.610198, 77.207584, 52.51, 13.40], to: \"Germany\", total: 34864 },\r\n    { points: [28.610198, 77.207584, 23.58, 58.38], to: \"Oman\", total: 39550 },\r\n    { points: [28.610198, 77.207584, 25.28, 51.53], to: \"Qatar\", total: 46000 },\r\n    { points: [28.610198, 77.207584, 55.74, 37.62], to: \"Russian Federation\", total: 18039 },\r\n    { points: [28.610198, 77.207584, 24.71, 46.67], to: \"Saudi Arabia\", total: 65800 },\r\n    { points: [28.610198, 77.207584, 24.45, 54.37], to: \"United Arab Emirates\", total: 164000 },\r\n    { points: [28.610198, 77.207584, 52.66, -0.95], to: \"United Kingdom\", total: 55465 },\r\n    { points: [28.610198, 77.207584, 38.88, -77.03], to: \"United States\", total: 465791 }\r\n  ];\r\n});<\/code><\/pre>\n<p>To create our flow map chart, we&#8217;ll use the AnyChart <code>connector()<\/code> function, passing in our data to create the flow map connectors, and including the world map geodata.<\/p>\n<pre class=\"javascript\"><code>var map = anychart.connector();\r\nvar connectorSeries = map.connector(data);\r\nmap.geoData(anychart.maps.world);<\/code><\/pre>\n<p>Then, we&#8217;ll set the labels and add arrow markers at the end of each flow line.<\/p>\n<pre class=\"javascript\"><code>connectorSeries\r\n  .labels()\r\n  .enabled(true)\r\n  .position('100%')\r\n  .format(function () {\r\n    return this.getData('to')\r\n  });\r\n\r\nconnectorSeries\r\n  .markers()\r\n  .position('100%')\r\n  .size(12);<\/code><\/pre>\n<p>Next, let\u2019s add a <a href=\"https:\/\/www.anychart.com\/blog\/2017\/04\/05\/chart-captions-title-graph-tips\/\">title<\/a> for our flow map.<\/p>\n<pre class=\"javascript\"><code>map.title(\"Top 10 Destination Countries for Indian Students Studying Abroad\");<\/code><\/pre>\n<p>Finally, we&#8217;ll reference the container ID, place the map in the container element, and display it on the page using the <code>draw()<\/code> function.<\/p>\n<pre class=\"javascript\"><code>map.container('container');\r\nmap.draw();<\/code><\/pre>\n<p>This should be enough to get our JavaScript-based flow map onto the webpage. However, since we&#8217;re working with a world map, it would be helpful to add some zoom controls to allow users to easily zoom in and out.<\/p>\n<p>Believe it or not, it&#8217;s actually quite simple! We just need to add three lines of code.<\/p>\n<pre class=\"javascript\"><code>var zoomController = anychart.ui.zoom();\r\nzoomController.target(map);\r\nzoomController.render();<\/code><\/pre>\n<p>And that&#8217;s it! Our basic JavaScript flow map is now ready.<\/p>\n<p>Take a look at the interactive version of this JavaScript flow map and play around with it in the <a href=\"https:\/\/playground.anychart.com\/DCzOCVLs\" target=\"_blank\" rel=\"nofollow\">AnyChart Playground<\/a>. I&#8217;ve included the entire code for our basic map below for your convenience.<\/p>\n<p><iframe loading=\"lazy\" class=\"anychart-embed anychart-embed-GYa91Vwk\" src=\"https:\/\/playground.anychart.com\/DCzOCVLs\/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-GYa91Vwk{width:100%;height:600px;}\");\n})();<\/script><\/p>\n<pre class=\"html\"><code>&lt;!DOCTYPE html&gt;\r\n&lt;html lang=\"en\"&gt;\r\n  &lt;head&gt;\r\n    &lt;meta charset=\"utf-8\"&gt;\r\n    &lt;title&gt;JavaScript Flow Map&lt;\/title&gt;\r\n    &lt;script src=\"https:\/\/cdn.anychart.com\/releases\/8.11.0\/js\/anychart-core.min.js\"&gt;&lt;\/script&gt;\r\n    &lt;script src=\"https:\/\/cdn.anychart.com\/releases\/8.11.0\/js\/anychart-map.min.js\"&gt;&lt;\/script&gt;\r\n    &lt;script src=\"https:\/\/cdn.anychart.com\/releases\/8.11.0\/geodata\/custom\/world\/world.js\"&gt;&lt;\/script&gt;\r\n    &lt;script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/proj4js\/2.8.0\/proj4.js\"&gt;&lt;\/script&gt;\r\n    &lt;script src=\"https:\/\/cdn.anychart.com\/releases\/8.11.0\/js\/anychart-ui.min.js\"&gt;&lt;\/script&gt;\r\n    &lt;link rel=\"stylesheet\" href=\"https:\/\/cdn.anychart.com\/releases\/8.11.0\/css\/anychart-ui.min.css\"&gt;\r\n    &lt;link rel=\"stylesheet\" href=\"https:\/\/cdn.anychart.com\/releases\/8.11.0\/fonts\/css\/anychart-font.min.css\"&gt;\r\n    &lt;style type=\"text\/css\"&gt;      \r\n      html, body, #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  &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        \/\/ set data for the destination countries\r\n        var data = [\r\n          { points: [28.610198, 77.207584, -30.592659, 145.943667], to: \"Australia\", total: 100009 },\r\n          { points: [28.610198, 77.207584, 45.411673, -75.69629], to: \"Canada\", total: 183310 },\r\n          { points: [28.610198, 77.207584, 52.511693, 13.403121], to: \"Germany\", total: 34864 },\r\n          { points: [28.610198, 77.207584, 23.5880, 58.3829], to: \"Oman\", total: 39550 },\r\n          { points: [28.610198, 77.207584, 25.2854, 51.5310], to: \"Qatar\", total: 46000 },\r\n          { points: [28.610198, 77.207584, 55.747362, 37.621273], to: \"Russian Federation\", total: 18039 },\r\n          { points: [28.610198, 77.207584, 24.710437, 46.675164], to: \"Saudi Arabia\", total: 65800 },\r\n          { points: [28.610198, 77.207584, 24.4539, 54.3773], to: \"United Arab Emirates\", total: 164000 },\r\n          { points: [28.610198, 77.207584, 52.667078, -0.955920], to: \"United Kingdom\", total: 55465 },\r\n          { points: [28.610198, 77.207584, 38.884053, -77.033513], to: \"United States\", total: 465791 },\r\n        ]\r\n        \/\/ create a connector map chart\r\n        var map = anychart.connector();\r\n        \/\/ include the world map geodata\r\n        map.geoData(anychart.maps.world);\r\n        \/\/ create onnector lines\r\n        var connectorSeries = map.connector(data);\r\n        \/\/ set labels for the connector lines\r\n        connectorSeries\r\n          .labels()\r\n          .enabled(true)\r\n          .position('100%')\r\n          .format(function () {\r\n            return this.getData('to')\r\n          });\r\n        \/\/ set arrow markers at the line end\r\n        connectorSeries\r\n          .markers()\r\n          .position('100%')\r\n          .size(12);\r\n        \/\/ set zoom controls\r\n        var zoomController = anychart.ui.zoom();\r\n        zoomController.target(map);\r\n        zoomController.render();\r\n        \/\/ set the map title\r\n        map.title('Top 10 Destination Countries for Indian Students Studying Abroad');\r\n        \/\/ set the container\r\n        map.container('container');\r\n        \/\/ draw the map\r\n        map.draw();\r\n      });\r\n    &lt;\/script&gt;\r\n  &lt;\/body&gt;\r\n&lt;\/html&gt;<\/code><\/pre>\n<h2>How to Customize JS Flow Map<\/h2>\n<p>Great job! It&#8217;s true that creating a basic interactive JavaScript flow map can be quite straightforward. Now, let&#8217;s move on to the next steps to enhance and personalize our flow map to make it more visually appealing and informative.<\/p>\n<p>In the upcoming steps, we will be making some quick and simple modifications to the code to add more features and customization options to the flow map. By doing so, we can engage our users more effectively and convey information more efficiently.<\/p>\n<p>So, let&#8217;s get started and take our JS flow map to the next level!<\/p>\n<h3>A. Improve the curvature and label positions<\/h3>\n<p>In our flow map, the studying patterns of Indian students in 10 different countries are represented by connector lines. However, with our data, the default settings cause overlapping of lines and some country names are hidden until zoomed in.<\/p>\n<p>To improve this, we can modify our dataset by adding a new property called &#8220;curvature&#8221; to adjust the curvature of individual connectors. Additionally, we can add the &#8220;label&#8221; property and set its values to display the labels at desired positions.<\/p>\n<pre class=\"javascript\"><code>var data = [\r\n  { points: [28.610198, 77.207584, -30.592659, 145.943667], to: \"Australia\", total: 100009, curvature: 0.5 },\r\n  { points: [28.610198, 77.207584, 45.411673, -75.69629], to: \"Canada\", total: 183310, curvature: 0.8, label: { offsetY: -30 } },\r\n  { points: [28.610198, 77.207584, 52.511693, 13.403121], to: \"Germany\", total: 34864, curvature: 0.3, label: { anchor: 'center-top', offsetY: -2 } },\r\n  { points: [28.610198, 77.207584, 23.5880, 58.3829], to: \"Oman\", total: 39550, curvature: -0.5, label: { anchor: 'left-top' } },\r\n  { points: [28.610198, 77.207584, 25.2854, 51.5310], to: \"Qatar\", total: 46000, curvature: 0.4, label: { anchor: 'right-top', offsetY: -20 } },\r\n  { points: [28.610198, 77.207584, 55.747362, 37.621273], to: \"Russian Federation\", total: 18039, curvature: 0.4, label: { anchor: 'left-bottom' } },\r\n  { points: [28.610198, 77.207584, 24.710437, 46.675164], to: \"Saudi Arabia\", total: 65800, curvature: 0.7, label: { offsetY: -5 } },\r\n  { points: [28.610198, 77.207584, 24.4539, 54.3773], to: \"United Arab Emirates\", total: 164000, curvature: 0, label: { anchor: 'left-top', offsetY: -15 } },\r\n  { points: [28.610198, 77.207584, 52.667078, -0.955920], to: \"United Kingdom\", total: 55465, curvature: 0.4, label: { anchor: 'right-top', offsetY: -25, offsetX: -10 } },\r\n  { points: [28.610198, 77.207584, 38.884053, -77.033513], to: \"USA\", total: 465791, curvature: -0.6 },\r\n];<\/code><\/pre>\n<p>By doing this, we can display the labels even if there is an overlap. It can be achieved with a single line of code.<\/p>\n<pre class=\"javascript\"><code>map.overlapMode(\"allow-overlap\");<\/code><\/pre>\n<p><iframe loading=\"lazy\" class=\"anychart-embed anychart-embed-ryGOIiQy\" src=\"https:\/\/playground.anychart.com\/ryGOIiQy\/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-ryGOIiQy{width:100%;height:600px;}\");\n})();<\/script><\/p>\n<h3>B. Enhance the tooltip<\/h3>\n<p>The current interactive flow map tooltip displays latitude and longitude, which is not very meaningful. To enhance the tooltip, we can display more relevant information.<\/p>\n<p>One way to do this is by displaying the destination country name and the total number of students in the tooltip. This way, users can easily understand the information displayed and make better sense of the flow map.<\/p>\n<pre class=\"javascript\"><code>connectorSeries\r\n  .tooltip()\r\n  .useHtml(true)\r\n  .format(function () {\r\n    return (\r\n      '&lt;h5 style=\"font-size:12px; font-weight:400; margin: 0.25rem 0;\"&gt;To:&lt;b&gt; ' + this.getData('to') + '&lt;\/b&gt;&lt;\/h5&gt;' +\r\n      '&lt;h5 style=\"font-size:12px; font-weight:400; margin: 0.25rem 0;\"&gt;Total Students: &lt;b&gt;' + this.getData('total').toLocaleString() + '&lt;\/b&gt;&lt;\/h5&gt;'\r\n    );\r\n  });<\/code><\/pre>\n<p><iframe loading=\"lazy\" class=\"anychart-embed anychart-embed-Axrn4oBR\" src=\"https:\/\/playground.anychart.com\/Axrn4oBR\/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-Axrn4oBR{width:100%;height:600px;}\");\n})();<\/script><\/p>\n<h3>C. Improve the title<\/h3>\n<p>To make our JS flow map\u2019s title more visually appealing, we can use HTML-based styling to make it stand out. This will help draw attention to the title and make it more noticeable to viewers.<\/p>\n<pre class=\"javascript\"><code>map.title()\r\n  .enabled(true)\r\n  .useHtml(true)\r\n  .text(\r\n    '&lt;span style=\"font-size:15px;font-weight:600;\"&gt;Top 10 Destination Countries for Indian Students Studying Abroad&lt;\/span&gt;&lt;br\/&gt;' +\r\n    '&lt;span style=\"font-size: 14px;\"&gt;The top destination is the U.S.&lt;\/span&gt;'\r\n  );<\/code><\/pre>\n<p><iframe loading=\"lazy\" class=\"anychart-embed anychart-embed-GYa91Vwk\" src=\"https:\/\/playground.anychart.com\/gfkjUHCF\/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-GYa91Vwk{width:100%;height:600px;}\");\n})();<\/script><\/p>\n<h3>D. Choose colors for the connectors and markers<\/h3>\n<p>To make some aesthetic changes, we can replace the default color of the connectors with a gradient color that fades from red to yellow.<\/p>\n<p>We can modify the Javascrit flow mapping code where we created the series connector and use the <code>fill()<\/code> and <code>stroke()<\/code> functions to apply the gradient color.<\/p>\n<pre class=\"javascript\"><code>var connectorSeries = map.connector(data)\r\n  .fill(['#e8dd09', 'red'])\r\n  .stroke(['#e8dd09', 'red']);\r\nconnectorSeries\r\n  .hovered()\r\n  .stroke('#808080')\r\n  .fill('#808080');\r\nconnectorSeries\r\n  .hovered()\r\n  .markers()\r\n  .stroke('#808080')\r\n  .fill('#808080');<\/code><\/pre>\n<p>With this change, the flow map will appear more visually appealing and engaging. However, if you prefer different colors, you can experiment and try out various color combinations.<\/p>\n<p><iframe loading=\"lazy\" class=\"anychart-embed anychart-embed-viks1Qdb\" src=\"https:\/\/playground.anychart.com\/viks1Qdb\/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-viks1Qdb{width:100%;height:600px;}\");\n})();<\/script><\/p>\n<h3>E. Change the color and thickness of connectors based on data<\/h3>\n<p>In our final customization step, we will make the connectors more interesting by changing their color and thickness based on the number of students, and add a legend for better understanding.<\/p>\n<p>To achieve this, we first group the countries into four categories based on the total number of students.<\/p>\n<ul>\n<li>Less than 50,000<\/li>\n<li>Between 50,000 and 100,000<\/li>\n<li>Between 100,000 and 200,000<\/li>\n<li>More than 200,000<\/li>\n<\/ul>\n<p>And we create a <code>filter_function()<\/code> to help filter the data according to these categories.<\/p>\n<pre class=\"javascript\"><code>function filter_function(val1, val2) {\r\n  if (val2)\r\n    return function (fieldVal) {\r\n      return val1 &lt;= fieldVal &amp;&amp; fieldVal &lt; val2;\r\n    };\r\n    else\r\n      return function (fieldVal) {\r\n        return val1 &lt;= fieldVal;\r\n      };\r\n}<\/code><\/pre>\n<p>Next, we create <code>createSeries()<\/code>, a function that takes in datasets\u00a0and configurations and creates connectors based on the settings provided.<\/p>\n<pre class=\"javascript\"><code>function createSeries(data, name, color, size) {\r\n\r\n  \/\/ create the connector lines\r\n  var connectorSeries = map.connector(data)\r\n    .name(name)\r\n    .fill(color)\r\n    .stroke(color)\r\n    .color(color);\r\n  connectorSeries\r\n    .hovered()\r\n    .stroke('#808080')\r\n    .fill('#808080');\r\n  connectorSeries\r\n    .hovered()\r\n    .markers()\r\n    .stroke('#808080')\r\n    .fill('#808080');\r\n\r\n  \/\/ set labels for the lines\r\n  connectorSeries\r\n    .labels()\r\n    .enabled(true)\r\n    .position('100%')\r\n    .fontColor('#2D2D2D')\r\n    .format(function () {\r\n      return this.getData('to')\r\n    });\r\n\r\n  \/\/ set arrow markers at the line end\r\n  connectorSeries\r\n    .markers()\r\n    .position('100%')\r\n    .size(12);\r\n\r\n  \/\/ configure the tooltip setting for the series\r\n  connectorSeries\r\n    .tooltip()\r\n    .useHtml(true)\r\n    .format(function () {\r\n      return (\r\n        '&lt;h5 style=\"font-size:12px; font-weight:400; margin: 0.25rem 0;\"&gt;To:&lt;b&gt; ' + this.getData('to') + '&lt;\/b&gt;&lt;\/h5&gt;' +\r\n        '&lt;h5 style=\"font-size:12px; font-weight:400; margin: 0.25rem 0;\"&gt;Total Students: &lt;b&gt;' + this.getData('total').toLocaleString() + '&lt;\/b&gt;&lt;\/h5&gt;'\r\n      );\r\n    });\r\n\r\n  \/\/ set the thickness of the connector line based on the number of students\r\n  connectorSeries\r\n     .startSize(size[0])\r\n     .endSize(size[1]);\r\n}<\/code><\/pre>\n<p>We also create a dataset from our data.<\/p>\n<pre class=\"javascript\"><code>var dataSet = anychart.data.set(data).mapAs();<\/code><\/pre>\n<p>And we filter it using the <code>filter_function()<\/code> and pass it to the <code>createSeries()<\/code> function to create our series.<\/p>\n<pre class=\"javascript\"><code>createSeries(dataSet.filter('total', filter_function(0, 50000)), 'Less than 50,000', '#A149FA', [1, 0]);\r\n\r\ncreateSeries(dataSet.filter('total', filter_function(50000, 100000)), '50,000 - 100,000', '#3B44F6', [2, 1]);\r\n\r\ncreateSeries(dataSet.filter('total', filter_function(100000, 200000)), '100,000 - 200,000', '#3EC70B', [4, 1]);\r\n\r\ncreateSeries(dataSet.filter('total', filter_function(200000, 500000)), 'More than 200,000', '#F7EC09', [6, 1]);<\/code><\/pre>\n<p>Lastly, we add legends for our flow map to help users understand the colors and thickness of the connectors.<\/p>\n<pre class=\"javascript\"><code>map.legend().enabled(true).position('bottom').padding([20, 0, 0, 0]).fontSize(10);\r\n\r\nmap.legend().title().enabled(true).text('Number of Students').fontSize(13).padding([0, 0, 5, 0]);<\/code><\/pre>\n<p>And, we have reached our destination. To build this amazing, interactive, JavaScript-based flow map.<\/p>\n<p><iframe loading=\"lazy\" class=\"anychart-embed anychart-embed-cZXHZPZG\" src=\"https:\/\/playground.anychart.com\/KD9Nys6w\/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-cZXHZPZG{width:100%;height:600px;}\");\n})();<\/script><\/p>\n<p>As a result, we can see that the colors and thickness of the connectors vary based on the number of students. The final interactive version of this JavaScript flow map can be explored in the <a href=\"https:\/\/playground.anychart.com\/KD9Nys6w\" target=\"_blank\" rel=\"nofollow\">AnyChart Playground<\/a>. You can also make further changes to the code and experiment with it.<\/p>\n<p>The full map code is available below:<\/p>\n<pre class=\"html\"><code>&lt;!DOCTYPE html&gt;\r\n&lt;html lang=\"en\"&gt;\r\n  &lt;head&gt;\r\n    &lt;meta charset=\"utf-8\"&gt;\r\n    &lt;title&gt;JavaScript Flow Map&lt;\/title&gt;\r\n    &lt;script src=\"https:\/\/cdn.anychart.com\/releases\/8.11.0\/js\/anychart-core.min.js\"&gt;&lt;\/script&gt;\r\n    &lt;script src=\"https:\/\/cdn.anychart.com\/releases\/8.11.0\/js\/anychart-map.min.js\"&gt;&lt;\/script&gt;\r\n    &lt;script src=\"https:\/\/cdn.anychart.com\/releases\/8.11.0\/geodata\/custom\/world\/world.js\"&gt;&lt;\/script&gt;\r\n    &lt;script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/proj4js\/2.8.0\/proj4.js\"&gt;&lt;\/script&gt;\r\n    &lt;script src=\"https:\/\/cdn.anychart.com\/releases\/8.11.0\/js\/anychart-ui.min.js\"&gt;&lt;\/script&gt;\r\n    &lt;link rel=\"stylesheet\" href=\"https:\/\/cdn.anychart.com\/releases\/8.11.0\/css\/anychart-ui.min.css\"&gt;\r\n    &lt;link rel=\"stylesheet\" href=\"https:\/\/cdn.anychart.com\/releases\/8.11.0\/fonts\/css\/anychart-font.min.css\"&gt;\r\n    &lt;style type=\"text\/css\"&gt;      \r\n      html, body, #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  &lt;body&gt;\r\n    &lt;div id=\"container\"&gt;&lt;\/div&gt;\r\n    &lt;script&gt;\r\nanychart.onDocumentReady(function () {\r\n  \/\/ set data for the destination countries\r\n  var data = [\r\n    { points: [28.610198, 77.207584, -30.592659, 145.943667], to: \"Australia\", total: 100009, curvature: 0.5 },\r\n    { points: [28.610198, 77.207584, 45.411673, -75.69629], to: \"Canada\", total: 183310, curvature: 0.8, label: {offsetY: -30} },\r\n    { points: [28.610198, 77.207584, 52.511693, 13.403121], to: \"Germany\", total: 34864, curvature: 0.3, label: {anchor: 'center-top', offsetY: -2} },\r\n    { points: [28.610198, 77.207584, 23.5880, 58.3829], to: \"Oman\", total: 39550, curvature: -0.5, label: {anchor: 'left-top'} },\r\n    { points: [28.610198, 77.207584, 25.2854, 51.5310], to: \"Qatar\", total: 46000, curvature: 0.4, label: {anchor: 'right-top', offsetY: -20} },\r\n    { points: [28.610198, 77.207584, 55.747362, 37.621273], to: \"Russian Federation\", total: 18039, curvature: 0.4, label: {anchor: 'left-bottom'} },\r\n    { points: [28.610198, 77.207584, 24.710437, 46.675164], to: \"Saudi Arabia\", total: 65800, curvature: 0.7, label: {offsetY: -5} },\r\n    { points: [28.610198, 77.207584, 24.4539, 54.3773], to: \"United Arab Emirates\", total: 164000, curvature: 0, label: {anchor: 'left-top', offsetY: -15} },\r\n    { points: [28.610198, 77.207584, 52.667078, -0.955920], to: \"United Kingdom\", total: 55465, curvature: 0.4, label: {anchor: 'right-top', offsetY: -25, offsetX: -10} },\r\n    { points: [28.610198, 77.207584, 38.884053, -77.033513], to: \"USA\", total: 465791, curvature: -0.6 },\r\n  ]\r\n  \/\/ create map chart\r\n  var map = anychart.connector();\r\n  \/\/ create a dataset from the data\r\n  var dataSet = anychart.data.set(data).mapAs();\r\n  \/\/ include the world map geodata\r\n  map.geoData(anychart.maps.world);\r\n  \/\/ create 4 series, filtering the data by the number of students\r\n  createSeries(dataSet.filter('total', filter_function(0, 50000)), 'Less than 50,000', '#A149FA', [1, 0]);\r\n  createSeries(dataSet.filter('total', filter_function(50000, 100000)), '50,000 - 100,000', '#3B44F6', [2, 1]);\r\n  createSeries(dataSet.filter('total', filter_function(100000, 200000)), '100,000 - 200,000', '#3EC70B', [4, 1]);\r\n  createSeries(dataSet.filter('total', filter_function(200000, 500000)), 'More than 200,000', '#F7EC09', [6, 1]);\r\n  \/\/ function to create and configure the series\r\n  function createSeries(data, name, color, size) {\r\n    \/\/ create the connector lines\r\n    var connectorSeries = map.connector(data)\r\n      .name(name)\r\n      .fill(color)\r\n      .stroke(color)\r\n      .color(color);\r\n    connectorSeries\r\n      .hovered()\r\n      .stroke('#808080')\r\n      .fill('#808080');\r\n    connectorSeries\r\n      .hovered()\r\n      .markers()\r\n      .stroke('#808080')\r\n      .fill('#808080');\r\n    \/\/ set labels for the lines\r\n    connectorSeries\r\n      .labels()\r\n      .enabled(true)\r\n      .position('100%')\r\n      .fontColor('#2D2D2D')\r\n      .format(function () {\r\n        return this.getData('to')\r\n      });\r\n    \/\/ set arrow markers at the line end\r\n    connectorSeries\r\n      .markers()\r\n      .position('100%')\r\n      .size(12);\r\n    \/\/ configure the tooltip setting for the series\r\n    connectorSeries\r\n      .tooltip()\r\n      .useHtml(true)\r\n      .format(function () {\r\n        return (\r\n          '&lt;h5 style=\"font-size:12px; font-weight:400; margin: 0.25rem 0;\"&gt;To:&lt;b&gt; ' + this.getData('to') + '&lt;\/b&gt;&lt;\/h5&gt;' +\r\n          '&lt;h5 style=\"font-size:12px; font-weight:400; margin: 0.25rem 0;\"&gt;Total Students: &lt;b&gt;' + this.getData('total').toLocaleString() + '&lt;\/b&gt;&lt;\/h5&gt;'\r\n          );\r\n      });\r\n    \/\/ set the thickness of the connector line based on the number of students\r\n    connectorSeries\r\n      .startSize(size[0])\r\n      .endSize(size[1]);\r\n  }\r\n  \/\/ set zoom controls\r\n  var zoomController = anychart.ui.zoom();\r\n  zoomController.target(map);\r\n  zoomController.render();\r\n  \/\/ display all labels even if there is an overlap\r\n  map.overlapMode(\"allow-overlap\");\r\n  \/\/ set the map chart title\r\n  map.title()\r\n    .enabled(true)\r\n    .useHtml(true)\r\n    .text(\r\n      '&lt;span style=\"font-size:15px;font-weight:600;\"&gt;Top 10 Destination Countries for Indian Students Studying Abroad&lt;\/span&gt;&lt;br\/&gt;' +\r\n      '&lt;span style=\"font-size: 14px;\"&gt;The top destination is the U.S.&lt;\/span&gt;'\r\n    );\r\n  \/\/ turn on the legend\r\n  map.legend().enabled(true).position('bottom').padding([20, 0, 0, 0]).fontSize(10);\r\n  map.legend().title().enabled(true).text('Number of Students').fontSize(13).padding([0, 0, 5, 0]);\r\n  \/\/ set the container\r\n  map.container('container');\r\n  \/\/ draw the map\r\n  map.draw();\r\n});\r\n\/\/ data filtering function\r\nfunction filter_function(val1, val2) {\r\n  if (val2)\r\n    return function (fieldVal) {\r\n      return val1 &lt;= fieldVal &amp;&amp; fieldVal &lt; val2;\r\n    };\r\n  else\r\n    return function (fieldVal) {\r\n      return val1 &lt;= fieldVal;\r\n    };\r\n}\r\n    &lt;\/script&gt;\r\n  &lt;\/body&gt;\r\n&lt;\/html&gt;<\/code><\/pre>\n<h2>Conclusion<\/h2>\n<p>Creating flow maps with JavaScript is a fun and easy process. I encourage you to explore other <a href=\"https:\/\/www.anychart.com\/products\/anymap\/gallery\/Maps_Connectors\/\">connector and flow map examples<\/a> to gain inspiration for your own map.<\/p>\n<p>If you have any queries or encounter any issues, don&#8217;t hesitate to ask for help right here in the comments.<\/p>\n<p>Good luck and have fun building your own JavaScript flow map!<\/p>\n<hr \/>\n<p><strong><em>AnyChart thanks Awan Sretha for this amazing original <strong>Flow Map<\/strong> tutorial!<\/p>\n<p>Don&#8217;t miss more <a href=\"https:\/\/www.anychart.com\/blog\/category\/javascript-chart-tutorials\/\">JavaScript charting tutorials<\/a> on our blog!<\/p>\n<p>Do you want to write an awesome guest post? <a href=\"https:\/\/www.anychart.com\/support\/\">Let us know<\/a>!<\/em><\/strong><\/p>\n<hr \/>\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>Flow maps are a powerful way to represent the movement of objects between different geographic locations, and with JavaScript, creating an interactive flow map is easier than you might think. Flow maps combine the functionality of a map and a flow diagram; this type of visualization shows the direction of movement of people, goods, money, [&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":22,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,66,23,13,279,4],"tags":[619,618,92,260,284,232,471,266,620,3352,509,1293,2906,2907,294,2838,54,1389,256,3377,1111,844,165,1370,133,774,775,1498,231,3376,3529,2652,2050,236,2529,1762,150,934,146,809,36,907,141,249,81,142,96,99,67,2904,2398,147,2901,2649,2648,2903,2655,68,1728,2870,3172,2654,237,3099,2738,3528,172,807,808,954,3100,2816,1763,804,2657],"class_list":["post-16427","post","type-post","status-publish","format-standard","hentry","category-anychart-charting-component","category-anymap","category-html5","category-javascript","category-javascript-chart-tutorials","category-tips-and-tricks","tag-analysis","tag-analytics","tag-anymap","tag-best-data-visualization-examples","tag-chart-examples","tag-connector-map","tag-data-analysis","tag-data-analytics","tag-data-analytics-examples","tag-data-graphic","tag-data-graphics","tag-data-map","tag-data-mapping","tag-data-maps","tag-data-science","tag-data-visualisation","tag-data-visualization","tag-data-visualization-best-pracices","tag-data-visualization-examples","tag-data-visualization-guide","tag-data-visualization-practice","tag-data-visualization-tutorial","tag-data-visualizations","tag-data-viz-examples","tag-dataviz","tag-dataviz-examples","tag-dataviz-projects","tag-example","tag-flow-map","tag-flow-visualization","tag-geo-map","tag-geodata","tag-geospatial-analysis","tag-geovisualization","tag-government-of-india","tag-guest-post","tag-html5-maps","tag-india","tag-interactive-data-visualization","tag-interactive-maps","tag-javascript","tag-javascript-chart-tutorial","tag-javascript-charting","tag-javascript-charting-api","tag-javascript-charting-library","tag-javascript-graphics","tag-javascript-graphics-library","tag-javascript-library","tag-javascript-map","tag-javascript-map-tutorial","tag-javascript-mapping-library","tag-javascript-maps","tag-javascript-route-map","tag-js-connector-map","tag-js-flow-map","tag-js-map","tag-js-mapping","tag-js-maps","tag-map","tag-map-design","tag-map-development","tag-mapping","tag-maps","tag-storytelling-examples","tag-student-data","tag-students","tag-tutorial","tag-visual-analysis","tag-visual-analytics","tag-visual-data-analytics","tag-visual-storytelling-examples","tag-web-design","tag-web-developers","tag-web-development","tag-web-maps","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 Interactive Flow Map with JavaScript: Step-by-Step Tutorial<\/title>\n<meta name=\"description\" content=\"Learn how to create an interactive flow map using JavaScript. Follow along with our simple tutorial, visualizing top destination countries for Indian students.\" \/>\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\/2023\/03\/22\/flow-map\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create a Flow Map with JavaScript: Step-by-Step Tutorial\" \/>\n<meta property=\"og:description\" content=\"Learn how to create an interactive flow map using JavaScript. Follow along with our simple tutorial, visualizing top destination countries for Indian students.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.anychart.com\/blog\/2023\/03\/22\/flow-map\/\" \/>\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=\"2023-03-22T16:17:14+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-03-22T16:40:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2023\/03\/flow-map-javascript-social.png\" \/>\n<meta name=\"author\" content=\"Awan Shrestha\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"Create a Flow Map with JavaScript: Step-by-Step Tutorial\" \/>\n<meta name=\"twitter:description\" content=\"Learn how to create an interactive flow map using JavaScript. Follow along with our simple tutorial, visualizing top destination countries for Indian students.\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2023\/03\/flow-map-javascript-social.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=\"Awan Shrestha\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"19 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.anychart.com\/blog\/2023\/03\/22\/flow-map\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/2023\/03\/22\/flow-map\/\"},\"author\":{\"name\":\"Awan Shrestha\",\"@id\":\"https:\/\/www.anychart.com\/blog\/#\/schema\/person\/3f107fdcb3fe326a63cd52812f5287c1\"},\"headline\":\"Creating Interactive Flow Maps with JavaScript\",\"datePublished\":\"2023-03-22T16:17:14+00:00\",\"dateModified\":\"2023-03-22T16:40:35+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/2023\/03\/22\/flow-map\/\"},\"wordCount\":1779,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/2023\/03\/22\/flow-map\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2023\/03\/flow-map-javascript.png\",\"keywords\":[\"analysis\",\"analytics\",\"AnyMap\",\"best data visualization examples\",\"chart examples\",\"connector map\",\"data analysis\",\"data analytics\",\"data analytics examples\",\"data graphic\",\"data graphics\",\"data map\",\"data mapping\",\"data maps\",\"data science\",\"data visualisation\",\"Data Visualization\",\"data visualization best practices\",\"data visualization examples\",\"data visualization guide\",\"data visualization practice\",\"data visualization tutorial\",\"data visualizations\",\"data viz examples\",\"dataviz\",\"dataviz examples\",\"dataviz projects\",\"example\",\"flow map\",\"flow visualization\",\"geo map\",\"geodata\",\"geospatial analysis\",\"geovisualization\",\"Government of India\",\"guest post\",\"html5 maps\",\"India\",\"interactive data visualization\",\"interactive maps\",\"JavaScript\",\"javascript chart tutorial\",\"javascript charting\",\"javascript charting api\",\"JavaScript charting library\",\"javascript graphics\",\"JavaScript graphics library\",\"JavaScript library\",\"javascript map\",\"javascript map tutorial\",\"JavaScript mapping library\",\"javascript maps\",\"javascript route map\",\"js connector map\",\"js flow map\",\"js map\",\"js mapping\",\"js maps\",\"map\",\"map design\",\"map development\",\"mapping\",\"maps\",\"storytelling examples\",\"student data\",\"students\",\"tutorial\",\"visual analysis\",\"visual analytics\",\"visual data analytics\",\"visual storytelling examples\",\"web design\",\"web developers\",\"web development\",\"web maps\"],\"articleSection\":[\"AnyChart Charting Component\",\"AnyMap\",\"HTML5\",\"JavaScript\",\"JavaScript Chart Tutorials\",\"Tips and Tricks\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.anychart.com\/blog\/2023\/03\/22\/flow-map\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.anychart.com\/blog\/2023\/03\/22\/flow-map\/\",\"url\":\"https:\/\/www.anychart.com\/blog\/2023\/03\/22\/flow-map\/\",\"name\":\"Create Interactive Flow Map with JavaScript: Step-by-Step Tutorial\",\"isPartOf\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/2023\/03\/22\/flow-map\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/2023\/03\/22\/flow-map\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2023\/03\/flow-map-javascript.png\",\"datePublished\":\"2023-03-22T16:17:14+00:00\",\"dateModified\":\"2023-03-22T16:40:35+00:00\",\"author\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/#\/schema\/person\/3f107fdcb3fe326a63cd52812f5287c1\"},\"description\":\"Learn how to create an interactive flow map using JavaScript. Follow along with our simple tutorial, visualizing top destination countries for Indian students.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/2023\/03\/22\/flow-map\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.anychart.com\/blog\/2023\/03\/22\/flow-map\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.anychart.com\/blog\/2023\/03\/22\/flow-map\/#primaryimage\",\"url\":\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2023\/03\/flow-map-javascript.png\",\"contentUrl\":\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2023\/03\/flow-map-javascript.png\",\"width\":1366,\"height\":768},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.anychart.com\/blog\/2023\/03\/22\/flow-map\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.anychart.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Creating Interactive Flow Maps with JavaScript\"}]},{\"@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\/3f107fdcb3fe326a63cd52812f5287c1\",\"name\":\"Awan Shrestha\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.anychart.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/02ebd18c927547ca82372246dddcc3aebfa98928cb91405eef1a63ece7f17518?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/02ebd18c927547ca82372246dddcc3aebfa98928cb91405eef1a63ece7f17518?s=96&r=g\",\"caption\":\"Awan Shrestha\"},\"url\":\"https:\/\/www.anychart.com\/blog\/author\/awan-shrestha\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Create Interactive Flow Map with JavaScript: Step-by-Step Tutorial","description":"Learn how to create an interactive flow map using JavaScript. Follow along with our simple tutorial, visualizing top destination countries for Indian students.","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\/2023\/03\/22\/flow-map\/","og_locale":"en_US","og_type":"article","og_title":"Create a Flow Map with JavaScript: Step-by-Step Tutorial","og_description":"Learn how to create an interactive flow map using JavaScript. Follow along with our simple tutorial, visualizing top destination countries for Indian students.","og_url":"https:\/\/www.anychart.com\/blog\/2023\/03\/22\/flow-map\/","og_site_name":"AnyChart News","article_publisher":"https:\/\/www.facebook.com\/AnyCharts","article_published_time":"2023-03-22T16:17:14+00:00","article_modified_time":"2023-03-22T16:40:35+00:00","og_image":[{"url":"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2023\/03\/flow-map-javascript-social.png","type":"","width":"","height":""}],"author":"Awan Shrestha","twitter_card":"summary_large_image","twitter_title":"Create a Flow Map with JavaScript: Step-by-Step Tutorial","twitter_description":"Learn how to create an interactive flow map using JavaScript. Follow along with our simple tutorial, visualizing top destination countries for Indian students.","twitter_image":"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2023\/03\/flow-map-javascript-social.png","twitter_creator":"@AnyChart","twitter_site":"@AnyChart","twitter_misc":{"Written by":"Awan Shrestha","Est. reading time":"19 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.anychart.com\/blog\/2023\/03\/22\/flow-map\/#article","isPartOf":{"@id":"https:\/\/www.anychart.com\/blog\/2023\/03\/22\/flow-map\/"},"author":{"name":"Awan Shrestha","@id":"https:\/\/www.anychart.com\/blog\/#\/schema\/person\/3f107fdcb3fe326a63cd52812f5287c1"},"headline":"Creating Interactive Flow Maps with JavaScript","datePublished":"2023-03-22T16:17:14+00:00","dateModified":"2023-03-22T16:40:35+00:00","mainEntityOfPage":{"@id":"https:\/\/www.anychart.com\/blog\/2023\/03\/22\/flow-map\/"},"wordCount":1779,"commentCount":0,"image":{"@id":"https:\/\/www.anychart.com\/blog\/2023\/03\/22\/flow-map\/#primaryimage"},"thumbnailUrl":"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2023\/03\/flow-map-javascript.png","keywords":["analysis","analytics","AnyMap","best data visualization examples","chart examples","connector map","data analysis","data analytics","data analytics examples","data graphic","data graphics","data map","data mapping","data maps","data science","data visualisation","Data Visualization","data visualization best practices","data visualization examples","data visualization guide","data visualization practice","data visualization tutorial","data visualizations","data viz examples","dataviz","dataviz examples","dataviz projects","example","flow map","flow visualization","geo map","geodata","geospatial analysis","geovisualization","Government of India","guest post","html5 maps","India","interactive data visualization","interactive maps","JavaScript","javascript chart tutorial","javascript charting","javascript charting api","JavaScript charting library","javascript graphics","JavaScript graphics library","JavaScript library","javascript map","javascript map tutorial","JavaScript mapping library","javascript maps","javascript route map","js connector map","js flow map","js map","js mapping","js maps","map","map design","map development","mapping","maps","storytelling examples","student data","students","tutorial","visual analysis","visual analytics","visual data analytics","visual storytelling examples","web design","web developers","web development","web maps"],"articleSection":["AnyChart Charting Component","AnyMap","HTML5","JavaScript","JavaScript Chart Tutorials","Tips and Tricks"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.anychart.com\/blog\/2023\/03\/22\/flow-map\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.anychart.com\/blog\/2023\/03\/22\/flow-map\/","url":"https:\/\/www.anychart.com\/blog\/2023\/03\/22\/flow-map\/","name":"Create Interactive Flow Map with JavaScript: Step-by-Step Tutorial","isPartOf":{"@id":"https:\/\/www.anychart.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.anychart.com\/blog\/2023\/03\/22\/flow-map\/#primaryimage"},"image":{"@id":"https:\/\/www.anychart.com\/blog\/2023\/03\/22\/flow-map\/#primaryimage"},"thumbnailUrl":"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2023\/03\/flow-map-javascript.png","datePublished":"2023-03-22T16:17:14+00:00","dateModified":"2023-03-22T16:40:35+00:00","author":{"@id":"https:\/\/www.anychart.com\/blog\/#\/schema\/person\/3f107fdcb3fe326a63cd52812f5287c1"},"description":"Learn how to create an interactive flow map using JavaScript. Follow along with our simple tutorial, visualizing top destination countries for Indian students.","breadcrumb":{"@id":"https:\/\/www.anychart.com\/blog\/2023\/03\/22\/flow-map\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.anychart.com\/blog\/2023\/03\/22\/flow-map\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.anychart.com\/blog\/2023\/03\/22\/flow-map\/#primaryimage","url":"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2023\/03\/flow-map-javascript.png","contentUrl":"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2023\/03\/flow-map-javascript.png","width":1366,"height":768},{"@type":"BreadcrumbList","@id":"https:\/\/www.anychart.com\/blog\/2023\/03\/22\/flow-map\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.anychart.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Creating Interactive Flow Maps with JavaScript"}]},{"@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\/3f107fdcb3fe326a63cd52812f5287c1","name":"Awan Shrestha","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.anychart.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/02ebd18c927547ca82372246dddcc3aebfa98928cb91405eef1a63ece7f17518?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/02ebd18c927547ca82372246dddcc3aebfa98928cb91405eef1a63ece7f17518?s=96&r=g","caption":"Awan Shrestha"},"url":"https:\/\/www.anychart.com\/blog\/author\/awan-shrestha\/"}]}},"_links":{"self":[{"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/posts\/16427","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\/22"}],"replies":[{"embeddable":true,"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/comments?post=16427"}],"version-history":[{"count":29,"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/posts\/16427\/revisions"}],"predecessor-version":[{"id":16459,"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/posts\/16427\/revisions\/16459"}],"wp:attachment":[{"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/media?parent=16427"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/categories?post=16427"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/tags?post=16427"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}