{"id":13572,"date":"2021-09-21T10:21:46","date_gmt":"2021-09-21T10:21:46","guid":{"rendered":"https:\/\/www.anychart.com\/blog\/?p=13572"},"modified":"2023-07-29T13:12:32","modified_gmt":"2023-07-29T13:12:32","slug":"connector-map-javascript","status":"publish","type":"post","link":"https:\/\/www.anychart.com\/blog\/2021\/09\/21\/connector-map-javascript\/","title":{"rendered":"How to Build Interactive Connector Map with JavaScript"},"content":{"rendered":"<p><a href=\"https:\/\/www.anychart.com\/blog\/2021\/09\/21\/connector-map-javascript\/\"><img decoding=\"async\" src=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2021\/09\/connector-map-javascript.png\" alt=\"Building an Interactive Connector Map for a Web Page or App with JavaScript HTML5\" width=\"100%\" class=\"alignnone size-full wp-image-13661\" srcset=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2021\/09\/connector-map-javascript.png 1500w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2021\/09\/connector-map-javascript-300x169.png 300w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2021\/09\/connector-map-javascript-768x432.png 768w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2021\/09\/connector-map-javascript-1024x575.png 1024w\" sizes=\"(max-width: 1500px) 100vw, 1500px\" \/><\/a>A <a href=\"https:\/\/www.anychart.com\/chartopedia\/chart-type\/connector-map\/\">connector map<\/a> is a set of straight or curved lines that link points on a geographical map. It is commonly used to\u00a0graphically\u00a0represent routes or any other connections between locations.\u00a0Would you like to learn how to build an attractive data visualization like that for a web page or app?<\/p>\n<p>Actually, it is easy to create an interactive connector map\u00a0using JavaScript.\u00a0And I\u00a0am ready to show you how right now! Follow along with this tutorial as I depict the cycling path of the <a href=\"https:\/\/en.wikipedia.org\/wiki\/2021_Tour_de_France\" target=\"_blank\" rel=\"nofollow\">2021 Tour de France<\/a> in the form of a JS connector map and thoroughly explain all steps.<\/p>\n<p><!--more Read the JS charting tutorial \u00bb--><\/p>\n<p>Here is a preview to get you excited for the ride, the beautiful interactive JavaScript connector map that will have been built by the end of the tutorial!<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2021\/09\/connector-map-js-preview.png\" alt=\"Final Interactive JS Connector Map Preview\" width=\"100%\" class=\"alignnone size-full wp-image-13660\" srcset=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2021\/09\/connector-map-js-preview.png 1100w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2021\/09\/connector-map-js-preview-300x172.png 300w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2021\/09\/connector-map-js-preview-768x440.png 768w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2021\/09\/connector-map-js-preview-1024x586.png 1024w\" sizes=\"(max-width: 1100px) 100vw, 1100px\" \/><\/p>\n<h2>Creating JS Connector Map in Four Basic Steps<\/h2>\n<p>Building a connector map with JavaScript is a bit more complex than other basic charts. But it becomes simpler when we use a JS charting library that can provide an out-of-the-box option to create it. In this tutorial, I will use <a href=\"https:\/\/www.anychart.com\/\">AnyChart<\/a>, one such library that has a special <a href=\"https:\/\/www.anychart.com\/products\/anymap\/\">AnyMap<\/a> product with good <a href=\"https:\/\/docs.anychart.com\/Maps\/Quick_Start\" target=\"_blank\" rel=\"nofollow\">mapping documentation<\/a> to help develop a connector map with ease, and I\u2019ll explain the entire process from start to finish so you perfectly understand what each step and line of code do.<\/p>\n<p>Get ready to build a stunning, interactive JavaScript connector map in four basic steps.<\/p>\n<h3>1. Creating an HTML page<\/h3>\n<p>Firstly I require a blank HTML page to hold my connector map. I add a <code>&lt;div&gt;<\/code> element with a unique id in the <code>&lt;body&gt;<\/code> of my HTML page, which I will reference later.<\/p>\n<p>I also set the width and height of the <code>&lt;div&gt;<\/code> to 100% using the <code>&lt;style&gt;<\/code> tag to make my map fit the entire screen. You can adjust these parameters based on your requirements.<\/p>\n<pre><code class=\"html\">&lt;html&gt;\r\n\u00a0\u00a0&lt;head&gt;\r\n\u00a0\u00a0\u00a0\u00a0&lt;title&gt;JavaScript Connector Map&lt;\/title&gt;\r\n\u00a0\u00a0\u00a0\u00a0&lt;style type=\"text\/css\"&gt;      \r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0html, body, #container { \r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0width: 100%; height: 100%; margin: 0; padding: 0; \r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0} \r\n\u00a0\u00a0\u00a0\u00a0&lt;\/style&gt;\r\n\u00a0\u00a0&lt;\/head&gt;\r\n\u00a0\u00a0&lt;body&gt;\r\n\u00a0\u00a0\u00a0\u00a0&lt;div id=\"container\"&gt;&lt;\/div&gt;\r\n\u00a0\u00a0&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/code><\/pre>\n<h3>2. Adding the necessary scripts<\/h3>\n<p>I am going to use the AnyChart library, so I need to add the necessary JS scripts in the <code>&lt;head&gt;<\/code> part of the HTML page.<\/p>\n<p>To create the connector map, I need AnyChart\u2019s \u2018<a href=\"https:\/\/docs.anychart.com\/Quick_Start\/Modules#core\" target=\"_blank\" rel=\"nofollow\">core<\/a>\u2019 and \u2018<a href=\"https:\/\/docs.anychart.com\/Quick_Start\/Modules#geo_maps\" target=\"_blank\" rel=\"nofollow\">map<\/a>\u2019 modules. Moreover, I also add the <a href=\"https:\/\/www.anychart.com\/download\/cdn#geodata\">geodata<\/a> of France since the route points are all there.<\/p>\n<p>One more script to wrap up the map-related additions is <a href=\"http:\/\/proj4js.org\/\" target=\"_blank\" rel=\"nofollow\">Proj4js<\/a>, a JavaScript library that ensures the plotting of coordinates over the appropriate geographical area.<\/p>\n<pre><code class=\"html\">&lt;html&gt;\r\n\u00a0\u00a0&lt;head&gt;\r\n\u00a0\u00a0\u00a0\u00a0&lt;title&gt;JavaScript Connector Map&lt;\/title&gt;\r\n\u00a0\u00a0\u00a0\u00a0&lt;script src=\"https:\/\/cdn.anychart.com\/geodata\/latest\/countries\/france\/france.js\"&gt;&lt;\/script&gt;\r\n\u00a0\u00a0\u00a0\u00a0&lt;script src=\"https:\/\/cdn.anychart.com\/releases\/8.10.0\/js\/anychart-core.min.js\"&gt;&lt;\/script&gt;\r\n\u00a0\u00a0\u00a0\u00a0&lt;script src=\"https:\/\/cdn.anychart.com\/releases\/8.10.0\/js\/anychart-map.min.js\"&gt;&lt;\/script&gt;\r\n\u00a0\u00a0\u00a0\u00a0&lt;script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/proj4js\/2.3.15\/proj4.js\"&gt;&lt;\/script&gt;\r\n\u00a0\u00a0\u00a0\u00a0&lt;style type=\"text\/css\"&gt;      \r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0html, body, #container { \r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0width: 100%; height: 100%; margin: 0; padding: 0; \r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0} \r\n\u00a0\u00a0\u00a0\u00a0&lt;\/style&gt;\r\n\u00a0\u00a0&lt;\/head&gt;\r\n\u00a0\u00a0&lt;body&gt;  \r\n\u00a0\u00a0\u00a0\u00a0&lt;div id=\"container\"&gt;&lt;\/div&gt;\r\n\u00a0\u00a0\u00a0\u00a0&lt;script&gt;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ All the code for the JS connector map will come here\r\n\u00a0\u00a0\u00a0\u00a0&lt;\/script&gt;\r\n\u00a0\u00a0&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/code><\/pre>\n<h3>3. Preparing the data<\/h3>\n<p>I collect the data for the cycling route from the <a href=\"https:\/\/www.letour.fr\/en\/overall-route\" target=\"_blank\" rel=\"nofollow\">official website<\/a> of the Tour de France. A JS connector map requires the data to be in a certain format, so I created a specific dataset by adding the data in the required format. You can check out the file <a href=\"https:\/\/gist.githubusercontent.com\/shacheeswadia\/4a2e84185d754984681a89194b4282df\/raw\/ec70b11e8f68e5e6df60cff15bff8dd5b05ce22a\/connector-map.json\" target=\"_blank\" rel=\"nofollow\">here<\/a>.<\/p>\n<p>In a connector map dataset, the main thing to remember is that the start and end points are defined by the latitude and longitude of each location where the latitude is defined first and then the longitude. For your information, I took the latitude and longitude information for each point from <a href=\"https:\/\/www.latlong.net\/\" target=\"_blank\" rel=\"nofollow\">LatLong.net<\/a>.<\/p>\n<p>To use the data in the code, I need to include the handy <a href=\"https:\/\/docs.anychart.com\/Quick_Start\/Modules#data_adapter\" target=\"_blank\" rel=\"nofollow\">Data Adapter<\/a> script that comes with the AnyChart JavaScript charting library to load the file.<\/p>\n<pre><code class=\"html\">&lt;script src=\"https:\/\/cdn.anychart.com\/releases\/8.10.0\/js\/anychart-data-adapter.min.js\"&gt;&lt;\/script&gt;\r\n<\/code><\/pre>\n<h3>4. Writing the JS code to draw the connector map<\/h3>\n<p>Now is the time for the final and most important stage of the race, which is writing the main lines of JavaScript code for generating the connector map itself.<\/p>\n<p>To begin with, I enclose all the code inside the <code>anychart.onDocumentReady()<\/code> function to ensure that it is executed only when the web page is fully loaded. Then I add the data using the <code>anychart.data.loadJsonFile()<\/code> function.<\/p>\n<pre><code class=\"html\">&lt;script&gt;\r\n\u00a0\u00a0anychart.onDocumentReady(function () {\r\n\u00a0\u00a0\u00a0\u00a0anychart.data.loadJsonFile(\r\n'https:\/\/gist.githubusercontent.com\/shacheeswadia\/4a2e84185d754984681a89194b4282df\/raw\/ec70b11e8f68e5e6df60cff15bff8dd5b05ce22a\/connector-map.json', function (data) {\r\n\u00a0\u00a0\u00a0\u00a0});\r\n\u00a0\u00a0});\r\n&lt;\/script&gt;\r\n<\/code><\/pre>\n<p>To create a connector map, I use the <code>connector()<\/code> function and set the geodata of France. Next, I just provide the map with a title.<\/p>\n<pre><code class=\"javascript\">\/\/ create a connector map chart\r\nvar map = anychart.connector();\r\n\r\n\/\/ set the geodata for france\r\nmap.geoData('anychart.maps.france');\r\n\r\n\/\/ add a title for the map\r\nmap\r\n  .title('Tour de France 2021 Route Map');<\/code><\/pre>\n<p>Before showing the connections, I plot all the places on the route using the <code>marker()<\/code> function. I use the circle marker and fill it with the red color of the French flag.<\/p>\n<pre><code class=\"javascript\">\/\/ create a marker series for the place names\r\nvar citiesSeries = map\r\n  .marker(data[0]['citiesData'])\r\n  .type('circle')\r\n  .fill('#c51923')\r\n  .stroke(0);<\/code><\/pre>\n<p>Now I represent the various connections using a helper function that accepts the map, the name of the series, and the data. You will see later on in this tutorial why I have made five different series. In the helper function, I create the links with the <code>connector()<\/code> function and set the color of the lines to the blue color of the French flag.<\/p>\n<pre><code class=\"javascript\">\/\/ create individual series\r\ncreateSeries(map, 'Hilly', data[1]['hillyData']);\r\ncreateSeries(map, 'Mountain', data[2]['mountainData']);\r\ncreateSeries(map, 'Flat', data[3]['flatData']);\r\ncreateSeries(map, 'Individual Time Trial', data[4]['timeTrialData']);\r\ncreateSeries(map, 'Connector', data[5]['connectorData']);\r\n\r\n...\r\n\r\n\/\/ a helper function to create several series\r\nfunction createSeries(map, name, data) {\r\n  \/\/ configure and customize the series\r\n  var connectorSeries = map\r\n    .connector(data)\r\n    .stroke('#3e5ca6')\r\n    .fill('#3e5ca6');\r\n}<\/code><\/pre>\n<p>In the last two steps, I reference the container div to display the chart and draw the map.<\/p>\n<pre><code class=\"javascript\">\/\/ set the container id for the map\r\nmap.container('container');\r\n\r\n\/\/ command to draw the resulting connector map\r\nmap.draw();<\/code><\/pre>\n<p>And that\u2019s the finish line! A beautiful JavaScript connector map is all ready!<\/p>\n<p><iframe loading=\"lazy\" class=\"anychart-embed anychart-embed-6Tsj5OI8\" src=\"https:\/\/playground.anychart.com\/6Tsj5OI8\/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-6Tsj5OI8{width:100%;height:600px;}\");\n})();<\/script><\/p>\n<p><strong>Here is the complete code and you can also check it out on <a href=\"https:\/\/playground.anychart.com\/6Tsj5OI8\/\" target=\"_blank\" rel=\"nofollow\">AnyChart Playground<\/a>.<\/strong><\/p>\n<pre><code class=\"html\">&lt;html&gt;\r\n\u00a0\u00a0&lt;head&gt;\r\n\u00a0\u00a0\u00a0\u00a0&lt;title&gt;JavaScript Connector Map&lt;\/title&gt;\r\n\u00a0\u00a0\u00a0\u00a0&lt;script src=\"https:\/\/cdn.anychart.com\/geodata\/latest\/countries\/france\/france.js\"&gt;&lt;\/script&gt;\r\n\u00a0\u00a0\u00a0\u00a0&lt;script src=\"https:\/\/cdn.anychart.com\/releases\/8.10.0\/js\/anychart-core.min.js\"&gt;&lt;\/script&gt;\r\n\u00a0\u00a0\u00a0\u00a0&lt;script src=\"https:\/\/cdn.anychart.com\/releases\/8.10.0\/js\/anychart-map.min.js\"&gt;&lt;\/script&gt;\r\n\u00a0\u00a0\u00a0\u00a0&lt;script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/proj4js\/2.3.15\/proj4.js\"&gt;&lt;\/script&gt;\r\n\u00a0\u00a0\u00a0\u00a0&lt;script src=\"https:\/\/cdn.anychart.com\/releases\/8.10.0\/js\/anychart-data-adapter.min.js\"&gt;&lt;\/script&gt;\r\n\u00a0\u00a0\u00a0\u00a0&lt;style type=\"text\/css\"&gt;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0html,\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0body,\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0#container {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0width: 100%;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0height: 100%;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0margin: 0;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0padding: 0;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\r\n\u00a0\u00a0\u00a0\u00a0&lt;\/style&gt;\r\n\u00a0\u00a0&lt;\/head&gt;\r\n\u00a0\u00a0&lt;body&gt;\r\n\u00a0\u00a0\u00a0\u00a0&lt;div id=\"container\"&gt;&lt;\/div&gt;\r\n\u00a0\u00a0\u00a0\u00a0&lt;script&gt;\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0anychart.onDocumentReady(function () {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0anychart.data.loadJsonFile(\r\n'https:\/\/gist.githubusercontent.com\/shacheeswadia\/4a2e84185d754984681a89194b4282df\/raw\/ec70b11e8f68e5e6df60cff15bff8dd5b05ce22a\/connector-map.json', function (data) {\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ create a connector map chart\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0var map = anychart.connector();\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ set the geodata for france\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0map.geoData('anychart.maps.france');\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ add a title for the map\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0map\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.title('Tour de France 2021 Route Map');\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ create a marker series for the place names\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0var citiesSeries = map\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.marker(data[0]['citiesData'])\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.type('circle')\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.fill('#c51923')\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.stroke(0);\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ create individual series\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0createSeries(map, 'Hilly', data[1]['hillyData']);\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0createSeries(map, 'Mountain', data[2]['mountainData']);\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0createSeries(map, 'Flat', data[3]['flatData']);\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0createSeries(map, 'Individual Time Trial', data[4]['timeTrialData']);\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0createSeries(map, 'Connector', data[5]['connectorData']);\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ sets the container id for the map\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0map.container('container');\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ command to draw the resulting connector map\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0map.draw();\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0});\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0});\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ a helper function to create several series\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0function createSeries(map, name, data) {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ configure and customize the series\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0var connectorSeries = map\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.connector(data)\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.stroke('#3e5ca6')\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.fill('#3e5ca6');\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\r\n\r\n\u00a0\u00a0\u00a0\u00a0&lt;\/script&gt;\r\n\u00a0\u00a0&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/code><\/pre>\n<h2>Customizing JavaScript Connector Map<\/h2>\n<p>I think the current connector map already looks great. But we can certainly pack in more information and also improve it aesthetically. So pedal on with me to see how a JavaScript-based connector map visualization can be customized and become even more awesome.<\/p>\n<h3>1. Setting the colors according to the stage route terrain<\/h3>\n<p>The cycling route of the Tour de France passes through different types of terrain, and I want to highlight them on the connector map using an individual color for each. This is why I previously created five different series: now I can individually customize each of them.<\/p>\n<p>So, I add a color parameter to the helper function and include the respective color code when calling the function for each series.<\/p>\n<p>I also increase the width of the connector lines by setting the stroke width value in the helper function.<\/p>\n<pre><code class=\"javascript\">\/\/ create individual series\r\ncreateSeries(map, 'Hilly', data[1]['hillyData'], '#57ae12');\r\ncreateSeries(map, 'Mountain', data[2]['mountainData'], '#318053');\r\ncreateSeries(map, 'Flat', data[3]['flatData'], '#a4664d');\r\ncreateSeries(map, 'Individual Time Trial', data[4]['timeTrialData'], '#ef6c00');\r\ncreateSeries(map, 'Connector', data[5]['connectorData'], '#fac233');\r\n\r\n...\r\n\r\n\/\/ a helper function to create several series\r\nfunction createSeries(map, name, data, color) {\r\n  \/\/ configure and customize the series\r\n  var connectorSeries = map\r\n    .connector(data)\r\n    .stroke(function (d) {\r\n      return {\r\n        color: color,\r\n        thickness: 2\r\n      }\r\n    })\r\n    .fill(color);\r\n}<\/code><\/pre>\n<p>Then I modify the place marker color and change it from red to blue.<\/p>\n<pre><code class=\"javascript\">\/\/ create a marker series for the place names\r\nvar citiesSeries = map\r\n  .marker(data[0]['citiesData'])\r\n  .type('circle')\r\n  .fill('#3e5ca6')\r\n  .stroke(0);<\/code><\/pre>\n<p>Because I\u2019ve added different colors for different stage types, I need to include a legend to indicate which color represents which type. You can select and deselect the legend items to display or hide the routes of the encoded terrain or, for instance, individual time trials.<\/p>\n<p>So, I add the legend and exclude the route stops since they are all of the same color. In the helper function, I set the legend shape and color.<\/p>\n<pre><code class=\"javascript\">\/\/ turn on the legend\r\nmap.legend(true);\r\n\r\n\/\/ exclude cities from the legend\r\ncitiesSeries.legendItem(false);\r\n\r\n...\r\n\r\n\/\/ set the legend shape and color\r\nconnectorSeries.legendItem({\r\n  iconType: 'circle',\r\n  iconFill: color\r\n});<\/code><\/pre>\n<p>It might look complicated at first glance if you are a beginner. But these quick actions actually enhance the connector map and make it so much more informative. So do not let all this code bonk you. Load up, keep your focus, go through each line to digest, and you will be able to grasp what is happening.<\/p>\n<h3>2. Formatting the labels<\/h3>\n<p>If you noticed, in the initial version of the map, the names of the places overlap with the connector lines quite a bit. To reduce that overlap and improve readability, I adjust the labels.<\/p>\n<pre><code class=\"javascript\">\/\/ customize the labels for the city names series\r\ncitiesSeries\r\n  .labels()\r\n  .enabled(true)\r\n  .position('center-bottom')\r\n  .fontColor('#263238')\r\n  .offsetY(0)\r\n  .offsetX(5)\r\n  .anchor('left-center')\r\n  .format('{%name}');<\/code><\/pre>\n<h3>3. Changing the curvature of the connector lines<\/h3>\n<p>There is an option to change the connectors from the default arc-like lines to straight lines by zeroing the curvature.<\/p>\n<pre><code class=\"javascript\">\/\/ configure and customize the series\r\nvar connectorSeries = map\r\n  .connector(data)\r\n  .stroke(function (d) {\r\n    return {\r\n      color: color,\r\n      thickness: 2\r\n    }\r\n  })\r\n  .fill(color)\r\n  .curvature(0);<\/code><\/pre>\n<p><strong>You can see here how that looks and also check out the interactive version of this variation with its full code on <a href=\"https:\/\/playground.anychart.com\/mQpaROde\/\" target=\"_blank\" rel=\"nofollow\">AnyChart Playground<\/a>.<\/strong><\/p>\n<p><iframe loading=\"lazy\" class=\"anychart-embed anychart-embed-mQpaROde\" src=\"https:\/\/playground.anychart.com\/mQpaROde\/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-mQpaROde{width:100%;height:600px;}\");\n})();<\/script><\/p>\n<p>But honestly, I like the previous way of connector visualization more. So I undo the curvature adjustment and revert to the initial curved lines.<\/p>\n<h3>4. Formatting the connector line type<\/h3>\n<p>In the cycling route, some lines simply connect one stage\u2019s finishing town with the next stage\u2019s starting town and are not part of the race tracks. I indicate those connections as dashed lines by adding a boolean parameter to the helper function. If the boolean value is true, I add the dash value in the stroke attribute.<\/p>\n<pre><code class=\"javascript\">\/\/ create individual series\r\ncreateSeries(map, 'Hilly', data[1]['hillyData'], '#57ae12', false);\r\ncreateSeries(map, 'Mountain', data[2]['mountainData'], '#318053', false);\r\ncreateSeries(map, 'Flat', data[3]['flatData'], '#a4664d', false);\r\ncreateSeries(map, 'Individual Time Trial', data[4]['timeTrialData'], '#ef6c00', false);\r\ncreateSeries(map, 'Connector', data[5]['connectorData'], '#fac233', true);\r\n\r\n...\r\n\r\n\/\/ configure and customize the connector series\r\nvar connectorSeries = map\r\n  .connector(data)\r\n  .stroke(function (d) {\r\n    return {\r\n      color: color,\r\n      thickness: 2,\r\n      dash: isConnector ? '3 6' : '0'\r\n    }\r\n  })\r\n  .fill(color)\r\n  .name(name);<\/code><\/pre>\n<h3>5. Enhancing the tooltip<\/h3>\n<p>By default, the tooltip of the JavaScript connector map created so far displays the latitude and longitude of the cities and towns where stages start and finish, which is not very useful. So, I modify the connector tooltip in the helper function using HTML to show the names of the start and end points for each connecting line. I also disable the tooltip of the place series since there is no need for any extra information for each stop.<\/p>\n<pre><code class=\"javascript\">\/\/ customize the destination series tooltip\r\nconnectorSeries\r\n  .tooltip()\r\n  .format('{%full}')\r\n  .title({ useHtml: true })\r\n  .titleFormat(\r\n    '{%number}. &lt;span style=\"font-size: 13px; color: #E1E1E1\"; padding: 10px&gt;{%short}&lt;\/span&gt;'\r\n  );\r\n\r\n...\r\n\r\n\/\/ create a marker series for the place names\r\nvar citiesSeries = map\r\n  .marker(data[0]['citiesData'])\r\n  .type('circle')\r\n  .fill('#3e5ca6')\r\n  .stroke(0)\r\n  .tooltip(false);<\/code><\/pre>\n<h3>6. Modifying the marker size<\/h3>\n<p>I also want to reduce the arrow marker size on the connecting lines to make it more subtle. This requires a simple one-line addition in the helper function.<\/p>\n<pre><code class=\"javascript\">\/\/ set the marker size\r\nvar markers = connectorSeries.markers().size(10);<\/code><\/pre>\n<h3>7. Enhancing the title<\/h3>\n<p>Lastly, I simply make the title more informative and customize the text. This code is similar to the tooltip personalization code, both making use of HTML.<\/p>\n<pre><code class=\"javascript\">\/\/ set a title for the map and customize it\r\nmap\r\n  .title()\r\n  .enabled(true)\r\n  .useHtml(true)\r\n  .fontColor('#263238')\r\n  .text(\r\n    'Tour de France 2021 Route Map&lt;br\/&gt;' +\r\n    '&lt;span style=\"color:#a3a3a3; font-size: 14px;\"&gt;Indicating stage terrain&lt;\/span&gt;'\r\n  );<\/code><\/pre>\n<p>That\u2019s all \u2014 bonus points achieved! An absolutely lovely and insightful JavaScript (HTML5) connector map is built to showcase the 2021 cycling route of the Tour de France, one of the most prestigious annual bicycle races!<\/p>\n<p><iframe loading=\"lazy\" class=\"anychart-embed anychart-embed-S9xXAHth\" src=\"https:\/\/playground.anychart.com\/S9xXAHth\/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-S9xXAHth{width:100%;height:600px;}\");\n})();<\/script><\/p>\n<p><strong>The complete code of the polished version is right here and also on <a href=\"https:\/\/playground.anychart.com\/S9xXAHth\/\" target=\"_blank\" rel=\"nofollow\">AnyChart Playground<\/a>.<\/strong><\/p>\n<pre><code class=\"html\">&lt;html&gt;\r\n\u00a0\u00a0&lt;head&gt;\r\n\u00a0\u00a0\u00a0\u00a0&lt;title&gt;JavaScript Connector Map&lt;\/title&gt;\r\n\u00a0\u00a0\u00a0\u00a0&lt;script src=\"https:\/\/cdn.anychart.com\/geodata\/latest\/countries\/france\/france.js\"&gt;&lt;\/script&gt;\r\n\u00a0\u00a0\u00a0\u00a0&lt;script src=\"https:\/\/cdn.anychart.com\/releases\/8.10.0\/js\/anychart-core.min.js\"&gt;&lt;\/script&gt;\r\n\u00a0\u00a0\u00a0\u00a0&lt;script src=\"https:\/\/cdn.anychart.com\/releases\/8.10.0\/js\/anychart-map.min.js\"&gt;&lt;\/script&gt;\r\n\u00a0\u00a0\u00a0\u00a0&lt;script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/proj4js\/2.3.15\/proj4.js\"&gt;&lt;\/script&gt;\r\n\u00a0\u00a0\u00a0\u00a0&lt;script src=\"https:\/\/cdn.anychart.com\/releases\/8.10.0\/js\/anychart-data-adapter.min.js\"&gt;&lt;\/script&gt;\r\n\u00a0\u00a0\u00a0\u00a0&lt;style type=\"text\/css\"&gt;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0html,\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0body,\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0#container {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0width: 100%;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0height: 100%;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0margin: 0;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0padding: 0;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\r\n\u00a0\u00a0\u00a0\u00a0&lt;\/style&gt;\r\n\u00a0\u00a0&lt;\/head&gt;\r\n\u00a0\u00a0&lt;body&gt;\r\n\u00a0\u00a0\u00a0\u00a0&lt;div id=\"container\"&gt;&lt;\/div&gt;\r\n\u00a0\u00a0\u00a0\u00a0&lt;script&gt;\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0anychart.onDocumentReady(function () {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0anychart.data.loadJsonFile(\r\n'https:\/\/gist.githubusercontent.com\/shacheeswadia\/4a2e84185d754984681a89194b4282df\/raw\/ec70b11e8f68e5e6df60cff15bff8dd5b05ce22a\/connector-map.json', function (data) {\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ create a connector map chart\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0var map = anychart.connector();\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ set the geodata for france\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0map.geoData('anychart.maps.france');\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ add a title for the map and customize it\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0map\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.title()\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.enabled(true)\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.useHtml(true)\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.fontColor('#263238')\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.text(\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'Tour de France 2021 Route Map&lt;br\/&gt;' +\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'&lt;span style=\"color:#a3a3a3; font-size: 14px;\"&gt;Indicating stage terrain&lt;\/span&gt;'\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0);\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ create a marker series for the place names\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0var citiesSeries = map\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.marker(data[0]['citiesData'])\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.type('circle')\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.fill('#3e5ca6')\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.stroke(0)\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.tooltip(false);\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ create individual series\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0createSeries(map, 'Hilly', data[1]['hillyData'], '#57ae12', false);\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0createSeries(map, 'Mountain', data[2]['mountainData'], '#318053', false);\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0createSeries(map, 'Flat', data[3]['flatData'], '#a4664d', false);\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0createSeries(map, 'Individual Time Trial', data[4]['timeTrialData'], '#ef6c00', false);\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0createSeries(map, 'Connector', data[5]['connectorData'], '#fac233', true);\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ customize the labels for the city names series\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0citiesSeries\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.labels()\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.enabled(true)\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.position('center-bottom')\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.fontColor('#263238')\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.offsetY(0)\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.offsetX(5)\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.anchor('left-center')\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.format('{%name}');\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ turn on the legend\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0map.legend(true);\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ exclude cities from the legend\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0citiesSeries.legendItem(false);\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ set the container id for the map\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0map.container('container');\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ command to draw the resulting connector map\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0map.draw();\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0});\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0});\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ a helper function to create several series\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0function createSeries(map, name, data, color, isConnector) {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ configure and customize the series\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0var connectorSeries = map\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.connector(data)\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.stroke(function (d) {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0return {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0color: color,\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0thickness: 2,\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0dash: isConnector ? '3 6' : '0'\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0})\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.fill(color)\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.name(name);\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ set the legend shape and color\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0connectorSeries.legendItem({\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0iconType: 'circle',\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0iconFill: color\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0});\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ set the marker size\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0var markers = connectorSeries.markers().size(10);\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ customize the destination series tooltips\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0connectorSeries\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.tooltip()\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.format('{%full}')\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.title({ useHtml: true })\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.titleFormat(\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'{%number}. &lt;span style=\"font-size: 13px; color: #E1E1E1\"; padding: 10px&gt;{%short}&lt;\/span&gt;'\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0);\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\r\n\r\n\u00a0\u00a0\u00a0\u00a0&lt;\/script&gt;\r\n\u00a0\u00a0&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/code><\/pre>\n<h2>Conclusion<\/h2>\n<p>As you could see in this tutorial, creating interactive JavaScript connector maps is actually hassle-free and fast. Feel free to delve into the <a href=\"https:\/\/docs.anychart.com\/Maps\/Connector_Maps\" target=\"_blank\" rel=\"nofollow\">connector map documentation<\/a> if you want to learn how to implement something else or look at <a href=\"https:\/\/docs.anychart.com\/Quick_Start\/Supported_Charts_Types\" target=\"_blank\" rel=\"nofollow\">other chart types<\/a>.<\/p>\n<p>Be it competitive sports or interactive data visualization, practice is what makes one excel. So, go on and practice building JS graphics as much as you can. Do ask me questions regarding this tutorial or other data visuals, if any.<\/p>\n<hr \/>\n<p><strong><em>See more about connector maps on <a href=\"https:\/\/www.anychart.com\/chartopedia\/chart-type\/connector-map\/\">Chartopedia<\/a> and\u00a0don&#8217;t miss other <a href=\"https:\/\/www.anychart.com\/blog\/category\/javascript-chart-tutorials\/\">JavaScript charting tutorials<\/a>.<\/em><\/strong><\/p>\n<hr \/>\n<p><strong><em>If you&#8217;ve got an idea for a cool guest post, you are more than welcome to <a href=\"https:\/\/www.anychart.com\/support\/\">let us know<\/a><\/em><\/strong>.<\/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>A connector map is a set of straight or curved lines that link points on a geographical map. It is commonly used to\u00a0graphically\u00a0represent routes or any other connections between locations.\u00a0Would you like to learn how to build an attractive data visualization like that for a web page or app? Actually, it is easy to create [&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":20,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,66,23,13,279,4],"tags":[53,92,260,2896,2894,2895,284,258,1707,232,471,266,620,1292,880,806,1759,509,1293,2906,2907,294,2220,54,1389,1760,2757,256,1111,842,1379,844,165,313,1120,2652,1528,1530,2050,1527,236,2897,1762,2013,2014,32,55,150,144,146,809,151,36,907,141,249,81,57,142,99,67,2904,2398,147,2901,58,65,56,2649,2903,2655,68,2902,1937,2335,1938,2396,1859,1728,2870,340,2654,237,2900,835,2898,30,2893,2899,172,1939,2816,1763,804,2657],"class_list":["post-13572","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-anychart","tag-anymap","tag-best-data-visualization-examples","tag-bicycle-race","tag-bicycles","tag-bikes","tag-chart-examples","tag-charts","tag-christmas-data","tag-connector-map","tag-data-analysis","tag-data-analytics","tag-data-analytics-examples","tag-data-chart","tag-data-charting","tag-data-charts","tag-data-design","tag-data-graphics","tag-data-map","tag-data-mapping","tag-data-maps","tag-data-science","tag-data-visual","tag-data-visualization","tag-data-visualization-best-pracices","tag-data-visualization-design","tag-data-visualization-development","tag-data-visualization-examples","tag-data-visualization-practice","tag-data-visualization-task","tag-data-visualization-tool","tag-data-visualization-tutorial","tag-data-visualizations","tag-data-visuals","tag-france","tag-geodata","tag-geography","tag-geoscience","tag-geospatial-analysis","tag-geospatial-technologies","tag-geovisualization","tag-grand-tours","tag-guest-post","tag-html","tag-html-charts","tag-html5","tag-html5-charts","tag-html5-maps","tag-infographics","tag-interactive-data-visualization","tag-interactive-maps","tag-interactive-visualizations","tag-javascript","tag-javascript-chart-tutorial","tag-javascript-charting","tag-javascript-charting-api","tag-javascript-charting-library","tag-javascript-charts","tag-javascript-graphics","tag-javascript-library","tag-javascript-map","tag-javascript-map-tutorial","tag-javascript-mapping-library","tag-javascript-maps","tag-javascript-route-map","tag-js-chart","tag-js-charting","tag-js-charts","tag-js-connector-map","tag-js-map","tag-js-mapping","tag-js-maps","tag-js-route-map","tag-json","tag-json-charts","tag-json-data-visualization","tag-json-map","tag-location-data-visualization","tag-map","tag-map-design","tag-map-visualizations","tag-mapping","tag-maps","tag-route-map","tag-sports","tag-sports-data-visualization","tag-tips-and-tricks","tag-tour-de-france","tag-tour-de-france-route","tag-tutorial","tag-visualizing-json-data","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>How to Build Interactive Connector Map with JavaScript<\/title>\n<meta name=\"description\" content=\"Learn how to create a cool interactive Connector Map for a web page or app with JavaScript (HTML5). Watching the 2021 Tour de France route being visualized.\" \/>\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\/2021\/09\/21\/connector-map-javascript\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Build Connector Map with JavaScript\" \/>\n<meta property=\"og:description\" content=\"Learn how to create a cool interactive Connector Map with JavaScript (HTML5). Watching the 2021 Tour de France route being visualized.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.anychart.com\/blog\/2021\/09\/21\/connector-map-javascript\/\" \/>\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=\"2021-09-21T10:21:46+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-07-29T13:12:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2021\/09\/javascript-connector-map-social.png\" \/>\n<meta name=\"author\" content=\"Shachee Swadia\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"How to Build Connector Map with JavaScript\" \/>\n<meta name=\"twitter:description\" content=\"Learn how to create a cool interactive Connector Map with JavaScript (HTML5). Watching the 2021 Tour de France route being visualized.\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2021\/09\/javascript-connector-map-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=\"Shachee Swadia\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"15 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.anychart.com\/blog\/2021\/09\/21\/connector-map-javascript\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/2021\/09\/21\/connector-map-javascript\/\"},\"author\":{\"name\":\"Shachee Swadia\",\"@id\":\"https:\/\/www.anychart.com\/blog\/#\/schema\/person\/273255f98371177b5ac1f4775610bb51\"},\"headline\":\"How to Build Interactive Connector Map with JavaScript\",\"datePublished\":\"2021-09-21T10:21:46+00:00\",\"dateModified\":\"2023-07-29T13:12:32+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/2021\/09\/21\/connector-map-javascript\/\"},\"wordCount\":1545,\"commentCount\":2,\"image\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/2021\/09\/21\/connector-map-javascript\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2021\/09\/connector-map-javascript.png\",\"keywords\":[\"AnyChart\",\"AnyMap\",\"best data visualization examples\",\"bicycle race\",\"bicycles\",\"bikes\",\"chart examples\",\"charts\",\"Christmas data\",\"connector map\",\"data analysis\",\"data analytics\",\"data analytics examples\",\"data chart\",\"data charting\",\"data charts\",\"data design\",\"data graphics\",\"data map\",\"data mapping\",\"data maps\",\"data science\",\"data visual\",\"Data Visualization\",\"data visualization best practices\",\"data visualization design\",\"data visualization development\",\"data visualization examples\",\"data visualization practice\",\"data visualization task\",\"data visualization tool\",\"data visualization tutorial\",\"data visualizations\",\"data visuals\",\"France\",\"geodata\",\"geography\",\"geoscience\",\"geospatial analysis\",\"geospatial technologies\",\"geovisualization\",\"Grand Tours\",\"guest post\",\"HTML\",\"HTML charts\",\"HTML5\",\"html5 charts\",\"html5 maps\",\"infographics\",\"interactive data visualization\",\"interactive maps\",\"interactive visualizations\",\"JavaScript\",\"javascript chart tutorial\",\"javascript charting\",\"javascript charting api\",\"JavaScript charting library\",\"javascript charts\",\"javascript graphics\",\"JavaScript library\",\"javascript map\",\"javascript map tutorial\",\"JavaScript mapping library\",\"javascript maps\",\"javascript route map\",\"js chart\",\"js charting\",\"js charts\",\"js connector map\",\"js map\",\"js mapping\",\"js maps\",\"js route map\",\"JSON\",\"JSON charts\",\"JSON data visualization\",\"JSON map\",\"location data visualization\",\"map\",\"map design\",\"map visualizations\",\"mapping\",\"maps\",\"route map\",\"sports\",\"sports data visualization\",\"Tips and tricks\",\"Tour de France\",\"Tour de France route\",\"tutorial\",\"visualizing JSON data\",\"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\/2021\/09\/21\/connector-map-javascript\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.anychart.com\/blog\/2021\/09\/21\/connector-map-javascript\/\",\"url\":\"https:\/\/www.anychart.com\/blog\/2021\/09\/21\/connector-map-javascript\/\",\"name\":\"How to Build Interactive Connector Map with JavaScript\",\"isPartOf\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/2021\/09\/21\/connector-map-javascript\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/2021\/09\/21\/connector-map-javascript\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2021\/09\/connector-map-javascript.png\",\"datePublished\":\"2021-09-21T10:21:46+00:00\",\"dateModified\":\"2023-07-29T13:12:32+00:00\",\"author\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/#\/schema\/person\/273255f98371177b5ac1f4775610bb51\"},\"description\":\"Learn how to create a cool interactive Connector Map for a web page or app with JavaScript (HTML5). Watching the 2021 Tour de France route being visualized.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/2021\/09\/21\/connector-map-javascript\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.anychart.com\/blog\/2021\/09\/21\/connector-map-javascript\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.anychart.com\/blog\/2021\/09\/21\/connector-map-javascript\/#primaryimage\",\"url\":\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2021\/09\/connector-map-javascript.png\",\"contentUrl\":\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2021\/09\/connector-map-javascript.png\",\"width\":1500,\"height\":843},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.anychart.com\/blog\/2021\/09\/21\/connector-map-javascript\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.anychart.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Build Interactive Connector Map 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\/273255f98371177b5ac1f4775610bb51\",\"name\":\"Shachee Swadia\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.anychart.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/50ebd5c61e4e46e052898a5ddbcef5996666132cf07c614be4725f028ec7eae3?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/50ebd5c61e4e46e052898a5ddbcef5996666132cf07c614be4725f028ec7eae3?s=96&r=g\",\"caption\":\"Shachee Swadia\"},\"url\":\"https:\/\/www.anychart.com\/blog\/author\/shachee-swadia\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Build Interactive Connector Map with JavaScript","description":"Learn how to create a cool interactive Connector Map for a web page or app with JavaScript (HTML5). Watching the 2021 Tour de France route being visualized.","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\/2021\/09\/21\/connector-map-javascript\/","og_locale":"en_US","og_type":"article","og_title":"How to Build Connector Map with JavaScript","og_description":"Learn how to create a cool interactive Connector Map with JavaScript (HTML5). Watching the 2021 Tour de France route being visualized.","og_url":"https:\/\/www.anychart.com\/blog\/2021\/09\/21\/connector-map-javascript\/","og_site_name":"AnyChart News","article_publisher":"https:\/\/www.facebook.com\/AnyCharts","article_published_time":"2021-09-21T10:21:46+00:00","article_modified_time":"2023-07-29T13:12:32+00:00","og_image":[{"url":"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2021\/09\/javascript-connector-map-social.png","type":"","width":"","height":""}],"author":"Shachee Swadia","twitter_card":"summary_large_image","twitter_title":"How to Build Connector Map with JavaScript","twitter_description":"Learn how to create a cool interactive Connector Map with JavaScript (HTML5). Watching the 2021 Tour de France route being visualized.","twitter_image":"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2021\/09\/javascript-connector-map-social.png","twitter_creator":"@AnyChart","twitter_site":"@AnyChart","twitter_misc":{"Written by":"Shachee Swadia","Est. reading time":"15 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.anychart.com\/blog\/2021\/09\/21\/connector-map-javascript\/#article","isPartOf":{"@id":"https:\/\/www.anychart.com\/blog\/2021\/09\/21\/connector-map-javascript\/"},"author":{"name":"Shachee Swadia","@id":"https:\/\/www.anychart.com\/blog\/#\/schema\/person\/273255f98371177b5ac1f4775610bb51"},"headline":"How to Build Interactive Connector Map with JavaScript","datePublished":"2021-09-21T10:21:46+00:00","dateModified":"2023-07-29T13:12:32+00:00","mainEntityOfPage":{"@id":"https:\/\/www.anychart.com\/blog\/2021\/09\/21\/connector-map-javascript\/"},"wordCount":1545,"commentCount":2,"image":{"@id":"https:\/\/www.anychart.com\/blog\/2021\/09\/21\/connector-map-javascript\/#primaryimage"},"thumbnailUrl":"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2021\/09\/connector-map-javascript.png","keywords":["AnyChart","AnyMap","best data visualization examples","bicycle race","bicycles","bikes","chart examples","charts","Christmas data","connector map","data analysis","data analytics","data analytics examples","data chart","data charting","data charts","data design","data graphics","data map","data mapping","data maps","data science","data visual","Data Visualization","data visualization best practices","data visualization design","data visualization development","data visualization examples","data visualization practice","data visualization task","data visualization tool","data visualization tutorial","data visualizations","data visuals","France","geodata","geography","geoscience","geospatial analysis","geospatial technologies","geovisualization","Grand Tours","guest post","HTML","HTML charts","HTML5","html5 charts","html5 maps","infographics","interactive data visualization","interactive maps","interactive visualizations","JavaScript","javascript chart tutorial","javascript charting","javascript charting api","JavaScript charting library","javascript charts","javascript graphics","JavaScript library","javascript map","javascript map tutorial","JavaScript mapping library","javascript maps","javascript route map","js chart","js charting","js charts","js connector map","js map","js mapping","js maps","js route map","JSON","JSON charts","JSON data visualization","JSON map","location data visualization","map","map design","map visualizations","mapping","maps","route map","sports","sports data visualization","Tips and tricks","Tour de France","Tour de France route","tutorial","visualizing JSON data","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\/2021\/09\/21\/connector-map-javascript\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.anychart.com\/blog\/2021\/09\/21\/connector-map-javascript\/","url":"https:\/\/www.anychart.com\/blog\/2021\/09\/21\/connector-map-javascript\/","name":"How to Build Interactive Connector Map with JavaScript","isPartOf":{"@id":"https:\/\/www.anychart.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.anychart.com\/blog\/2021\/09\/21\/connector-map-javascript\/#primaryimage"},"image":{"@id":"https:\/\/www.anychart.com\/blog\/2021\/09\/21\/connector-map-javascript\/#primaryimage"},"thumbnailUrl":"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2021\/09\/connector-map-javascript.png","datePublished":"2021-09-21T10:21:46+00:00","dateModified":"2023-07-29T13:12:32+00:00","author":{"@id":"https:\/\/www.anychart.com\/blog\/#\/schema\/person\/273255f98371177b5ac1f4775610bb51"},"description":"Learn how to create a cool interactive Connector Map for a web page or app with JavaScript (HTML5). Watching the 2021 Tour de France route being visualized.","breadcrumb":{"@id":"https:\/\/www.anychart.com\/blog\/2021\/09\/21\/connector-map-javascript\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.anychart.com\/blog\/2021\/09\/21\/connector-map-javascript\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.anychart.com\/blog\/2021\/09\/21\/connector-map-javascript\/#primaryimage","url":"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2021\/09\/connector-map-javascript.png","contentUrl":"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2021\/09\/connector-map-javascript.png","width":1500,"height":843},{"@type":"BreadcrumbList","@id":"https:\/\/www.anychart.com\/blog\/2021\/09\/21\/connector-map-javascript\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.anychart.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Build Interactive Connector Map 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\/273255f98371177b5ac1f4775610bb51","name":"Shachee Swadia","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.anychart.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/50ebd5c61e4e46e052898a5ddbcef5996666132cf07c614be4725f028ec7eae3?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/50ebd5c61e4e46e052898a5ddbcef5996666132cf07c614be4725f028ec7eae3?s=96&r=g","caption":"Shachee Swadia"},"url":"https:\/\/www.anychart.com\/blog\/author\/shachee-swadia\/"}]}},"_links":{"self":[{"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/posts\/13572","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\/20"}],"replies":[{"embeddable":true,"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/comments?post=13572"}],"version-history":[{"count":27,"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/posts\/13572\/revisions"}],"predecessor-version":[{"id":15520,"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/posts\/13572\/revisions\/15520"}],"wp:attachment":[{"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/media?parent=13572"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/categories?post=13572"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/tags?post=13572"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}