{"id":10399,"date":"2020-05-27T10:48:12","date_gmt":"2020-05-27T10:48:12","guid":{"rendered":"https:\/\/www.anychart.com\/blog\/?p=10399"},"modified":"2022-08-13T10:59:30","modified_gmt":"2022-08-13T10:59:30","slug":"scatter-plot-js-tutorial","status":"publish","type":"post","link":"https:\/\/www.anychart.com\/blog\/2020\/05\/27\/scatter-plot-js-tutorial\/","title":{"rendered":"Building JavaScript Scatter Plot Module"},"content":{"rendered":"<p><img decoding=\"async\" class=\"alignnone size-full wp-image-10403\" src=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/05\/js-scatter-plot.jpg\" alt=\"Tutorial title image of a JavaScript Scatter Plot module (scatter chart)\" width=\"100%\" srcset=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/05\/js-scatter-plot.jpg 1400w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/05\/js-scatter-plot-300x129.jpg 300w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/05\/js-scatter-plot-768x329.jpg 768w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/05\/js-scatter-plot-1024x439.jpg 1024w\" sizes=\"(max-width: 1400px) 100vw, 1400px\" \/>Scatter plots are a great way to visualize data. Data is represented as points on a Cartesian plane where the x and y coordinate of each point represents a variable. These charts let you investigate the relationship between two variables, detect outliers in the data set as well as detect trends. They are one of the most commonly used data visualization techniques and are a must have for your data visualization arsenal!<\/p>\n<p>In this tutorial, I will teach you how to build your very own interactive scatter plot charts using JavaScript.<\/p>\n<p>Ever wondered whether the population of the United States of America were dog people? Well, you\u2019re about to find out! To help you learn more about building scatter plots I will be using the <em>Cat vs Dog Popularity in US<\/em> dataset. This dataset contains the percentage of homes with dogs and cats for each US state.<\/p>\n<p><!--more Read the JS charting tutorial \u00bb--><\/p>\n<h2>How to Create JavaScript Scatter Plot<\/h2>\n<p>Building data visualizations can often be an overcomplicated endeavour (just ask anyone who uses Matplotlib), but if you use the right tools it can be quick and painless! There are many JavaScript libraries out there which can help you do this, they each have their own advantages, disadvantages and choosing the right one really depends on your use case and coding ability.<\/p>\n<p>For this tutorial I have chosen to use <a href=\"https:\/\/docs.anychart.com\/Basic_Charts\/Scatter_Plot\/Overview\" target=\"_blank\" rel=\"nofollow\">AnyChart JavaScript library<\/a>. I think AnyChart is perfect for newcomers to data visualizations and is good for both newbies to more intermediate coders. It&#8217;s really easy to get something up quickly and with little coding knowledge, however there is also a lot of room for customization. Plus, their documentation really holds your hand through the entire process.<\/p>\n<h3>1. Create an HTML page<\/h3>\n<p>The first thing I need to do is set up my html page.<\/p>\n<pre><code class=\"html\">&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n  &lt;head&gt;\r\n    &lt;title&gt;JavaScript Scatter Chart&lt;\/title&gt;\r\n  &lt;\/head&gt;\r\n  &lt;body&gt;\r\n    &lt;div id=\"container\" style=\"width: 100%; height: 500px\"&gt;&lt;\/div&gt;\r\n    &lt;script&gt;\r\n      \/\/ code for chart goes here.\r\n    &lt;\/script&gt;\r\n  &lt;\/body&gt;\r\n&lt;\/html&gt;<\/code><\/pre>\n<p>I create a blank page and then include a div element for the chart. I give this div the id &#8216;container&#8217; so I can easily reference it later. I also include style properties to ensure the div fills the entire page. (You can easily change this to suit your own use case).<\/p>\n<h3>2. Add the necessary scripts<\/h3>\n<p>Next up I add the necessary scripts. Because I am using a JavaScript library to help me build this chart I need to include the necessary scripts. These scripts will depend on which library I use and in this particular case I need to add AnyChart\u2019s \u2018base\u2019 and \u2018data-adapter\u2019 modules. The base module contains the charting library while the data-adapter module will allow me to load my data.<\/p>\n<pre><code class=\"html\">&lt;script src=\"https:\/\/cdn.anychart.com\/releases\/8.7.1\/js\/anychart-base.min.js\"&gt;&lt;\/script&gt;\r\n&lt;script src=\"https:\/\/cdn.anychart.com\/releases\/8.7.1\/js\/anychart-data-adapter.min.js\"&gt;&lt;\/script&gt;<\/code><\/pre>\n<h3>3. Loading the data<\/h3>\n<p>As mentioned above, I will be demonstrating how to build a scatter plot by visualizing the <em>Cat VS Dog Popularity in US<\/em> dataset. This dataset is available at <a href=\"https:\/\/data.world\/datanerd\/cat-vs-dog-popularity-in-u-s\" target=\"_blank\" rel=\"nofollow\">Data.world<\/a> which is a website dedicated to datasets. Data.world refers to itself as a data &#8216;catalogue&#8217; and allows you to explore other users&#8217; uploaded data as well as host your own. I&#8217;d encourage you to check this site out as it is a rich resource for anyone looking to visualize data.<\/p>\n<p>Different charting libraries will have different requirements for how they need their data presented. In our case AnyChart allows a number of data formats (JSONs, CSVs, Google Sheets etc) but requires the data be presented in a particular format. They need the x-axis variable to be named \u2018x\u2019 and the y-axis variable to be named \u2018value\u2019.<\/p>\n<p>To make this tutorial easier to follow I\u2019ve done all the pre-processing required (renamed columns and dropped unused columns) and made the resulting CSV available for download: <a href=\"https:\/\/raw.githubusercontent.com\/WaydeHerman\/ScatterPlot\/master\/data.csv\" target=\"_blank\" rel=\"nofollow\">here<\/a>.<\/p>\n<h3>4. Drawing the chart<\/h3>\n<p>Finally, with my page made and data ready, I can finally get to the fun part: drawing my chart.<\/p>\n<p>I will be placing the code for drawing my chart within the <code>anychart.data.loadCsvFile<\/code> and that within the <code>anychart.onDocumentReady()<\/code> function.<\/p>\n<p>These functions are asynchronous. Usually code is read and executed linearly but in some cases these functions take time. Uploading and parsing a CSV for example takes time.<\/p>\n<p>So by placing my code to draw my chart within <code>anychart.data.loadCsvFile<\/code> I am ensuring that the code to draw my chart is only executed once my data is loaded. And placing THAT within the <code>anychart.onDocumentReady()<\/code> function ensures that THAT code will only be executed once my page is loaded. This is probably the most complicated step so if you are confused at first, don\u2019t feel too bad.<\/p>\n<p><code>Anychart.scatter()<\/code> supports three different kinds of plots: bubbles, lines and markers. For now, I will be using markers as these are our standard scatter plot points.<\/p>\n<pre><code class=\"javascript\">anychart.onDocumentReady(function() {\r\n  anychart.data.loadCsvFile(\"data.csv\", function (data) {\r\n    \/\/ create the chart\r\n    chart = anychart.scatter();\r\n    \/\/ assign the data to a series\r\n    var series1 = chart.marker(data);\r\n    \/\/ set title\r\n    chart.title(\"% of Cats v Dogs per state\");\r\n    \/\/ set axes titles \r\n    chart.xAxis().title(\"% Cats\");\r\n    chart.yAxis().title(\"% Dogs\");\r\n    \/\/ draw chart\r\n    chart.container(\"container\").draw();\r\n  });\r\n})<\/code><\/pre>\n<p>which results in:<br \/>\n<img decoding=\"async\" class=\"alignnone size-full wp-image-10409\" src=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/05\/basic-js-scatter-plot.jpg\" alt=\"Basic interactive scatter plot chart in JS\" width=\"100%\" srcset=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/05\/basic-js-scatter-plot.jpg 1349w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/05\/basic-js-scatter-plot-300x158.jpg 300w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/05\/basic-js-scatter-plot-768x405.jpg 768w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/05\/basic-js-scatter-plot-1024x540.jpg 1024w\" sizes=\"(max-width: 1349px) 100vw, 1349px\" \/><\/p>\n<p>And that&#8217;s it! By following the above four steps I\u2019ve managed to build a fully functioning interactive JavaScript scatter plot. With everything included my code looks like this:<\/p>\n<pre><code class=\"html\">&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n  &lt;head&gt;\r\n    &lt;title&gt;JavaScript Scatter Chart&lt;\/title&gt;\r\n    &lt;script src=\"https:\/\/cdn.anychart.com\/releases\/8.7.1\/js\/anychart-base.min.js\"&gt;&lt;\/script&gt;\r\n    &lt;script src=\"https:\/\/cdn.anychart.com\/releases\/8.7.1\/js\/anychart-data-adapter.min.js\"&gt;&lt;\/script&gt;\r\n  &lt;\/head&gt;\r\n  &lt;body&gt;\r\n    &lt;div id=\"container\" style=\"width: 100%; height: 500px\"&gt;&lt;\/div&gt;\r\n    &lt;script&gt;\r\n      anychart.onDocumentReady(function() {\r\n        anychart.data.loadCsvFile(\"catsvdogs_new.csv\", function (data) {\r\n          \/\/ create the chart\r\n          chart = anychart.scatter();\r\n          \/\/ assign the data to a series\r\n          var series1 = chart.marker(data);\r\n          \/\/ set title\r\n          chart.title(\"% of Cats v Dogs per state\");\r\n          \/\/ set axes titles \r\n          chart.xAxis().title(\"% Cats\");\r\n          chart.yAxis().title(\"% Dogs\");\r\n          \/\/ draw chart\r\n          chart.container(\"container\").draw();\r\n        });\r\n      })\r\n    &lt;\/script&gt;\r\n  &lt;\/body&gt;\r\n&lt;\/html&gt;<\/code><\/pre>\n<p><a href=\"https:\/\/playground.anychart.com\/Kt0ayGuY\/\" target=\"_blank\" rel=\"nofollow\">Playground link<\/a><br \/>\n<a href=\"https:\/\/codepen.io\/waydeherman\/pen\/xxGaXdG\" target=\"_blank\" rel=\"nofollow\">CodePen link<\/a><\/p>\n<h2>How to Customize Scatter Chart Appearance<\/h2>\n<p>Data Visualizations are all about telling stories and it is the job of the data visualization developer to customize their visualizations to better tell these stories. You may want to make changes to make your chart more engaging, to highlight a particularly interesting aspect of the visualization or to add some functionality to help understand the data better.<\/p>\n<p>All decent charting libraries will come with good customization options to allow you to do this and AnyChart is no different. Using their API allows for a number of different and useful customizations. I\u2019ll try adding a few to get a bit more out of my Cats vs Dogs viz.<\/p>\n<h3>Adding grids<\/h3>\n<p>Grids are a very useful way of helping users understand your data. You can use <code>xGgrid()<\/code> and <code>yGgrid()<\/code> as well as <code>xMinorGrid()<\/code> and <code>yMinorGrid()<\/code> to create major and minor grids respectively. You can also customize their styling using the <code>stroke()<\/code> and <code>palette()<\/code> methods.<\/p>\n<p>The following code enables both major and minor grid and sets the parameters for their styling.<\/p>\n<pre><code class=\"javascript\">\/\/ enable major grids\r\nchart.xGrid(true);\r\nchart.yGrid(true);\r\n\/\/ configure the visual settings of major grids\r\nchart.xGrid().stroke({color: \"#212D40\", thickness: 0.3});\r\nchart.yGrid().stroke({color: \"#212D40\", thickness: 0.3});\r\n\/\/ enable minor grids\r\nchart.xMinorGrid(true);\r\nchart.yMinorGrid(true);\r\n\/\/ configure the visual settings of minor grids\r\nchart.xMinorGrid().stroke({color: \"#212D40\", thickness: 0.15, dash: 5});\r\nchart.yMinorGrid().stroke({color: \"#212D40\", thickness: 0.15, dash: 5});<\/code><\/pre>\n<h3>Adding a trend line<\/h3>\n<p>Trend lines, lines of best fit, and other lines can be used to aid user analysis of the data. By taking advantage of the supported series of <code>anychart.scatter()<\/code>, I can easily add a line to my chart.<\/p>\n<p>In my chart I think adding a 45-degree line could be a good idea. It would dissect the chart and would allow someone looking to easily spot whether a state was more of a dog state or a cat state.<\/p>\n<p>In order to add this line I first need to create the data, with one point at the origin and another further along, before assigning this data to a line series.<\/p>\n<pre><code class=\"javascript\">\/\/ add data for line\r\nvar data2 = [\r\n  {x: 0, value: 0},\r\n  {x: 60, value: 60}\r\n];\r\n\/\/ assign the line data to a line series\r\nvar series2 = chart.line(data2);<\/code><\/pre>\n<p>Which results in my chart looking like this:<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-10410\" src=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/05\/js-scatter-plot-chart-customization.jpg\" alt=\"JS scatter plot chart with grid and trendline\" width=\"100%\" srcset=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/05\/js-scatter-plot-chart-customization.jpg 1349w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/05\/js-scatter-plot-chart-customization-300x158.jpg 300w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/05\/js-scatter-plot-chart-customization-768x405.jpg 768w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/05\/js-scatter-plot-chart-customization-1024x540.jpg 1024w\" sizes=\"(max-width: 1349px) 100vw, 1349px\" \/><\/p>\n<p><a href=\"https:\/\/playground.anychart.com\/PQVE1AXB\/\" target=\"_blank\" rel=\"nofollow\">Playground link<\/a><br \/>\n<a href=\"https:\/\/codepen.io\/waydeherman\/pen\/jOPvGPK\" target=\"_blank\" rel=\"nofollow\">CodePen link<\/a><\/p>\n<p>As you can see, there is clearly a bias in the US towards dogs! Can you call the US a dog country? Well I don\u2019t make the rules!<\/p>\n<h3>Bubble chart<\/h3>\n<p>Scatter plots at default can only support two variables but sometimes it will be necessary to support more. There are a number of ways of extending these charts to do this including having the color of each point be dependent on an additional variable, either a range for numerical variables or distinct for categorical variables or by changing the size of the points depending on this third variable.<\/p>\n<p>By extending scatter plots using the size of the points you are changing a scatter plot into a bubble chart. With the right data these can look really impressive. They\u2019re also easy to implement with the same code I\u2019ve used to make my scatter plot.<\/p>\n<p>I simply change the series from a marker to a bubble. It really is that easy. (I also change the minimum and maximum size of our bubbles to make things a bit less messy).<\/p>\n<pre><code class=\"javascript\">\/\/ assign the data to a series\r\nvar series1 = chart.bubble(data);\r\n\/\/ adjust bubble min\/max size\r\nchart.minBubbleSize(\"2%\");\r\nchart.maxBubbleSize(\"10%\");<\/code><\/pre>\n<p>which results in this bubble chart:<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-10411\" src=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/05\/final-js-scatter-plot.jpg\" alt=\"Customized JavaScript Scatter Plot\" width=\"100%\" srcset=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/05\/final-js-scatter-plot.jpg 1349w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/05\/final-js-scatter-plot-300x158.jpg 300w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/05\/final-js-scatter-plot-768x405.jpg 768w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/05\/final-js-scatter-plot-1024x540.jpg 1024w\" sizes=\"(max-width: 1349px) 100vw, 1349px\" \/><\/p>\n<p><a href=\"https:\/\/playground.anychart.com\/LAW0krex\/\" target=\"_blank\" rel=\"nofollow\">Playground link<\/a><br \/>\n<a href=\"https:\/\/codepen.io\/waydeherman\/pen\/Exjewmx\" target=\"_blank\" rel=\"nofollow\">CodePen link<\/a><\/p>\n<p>How easy was that?&#8230;<\/p>\n<h2>Conclusion<\/h2>\n<p>As you now know, making a JavaScript scatter plot is quick and easy! They&#8217;re one of the most popular data visualizations and are very useful at exploring the relationships between two variables. In addition, with a bit of work they can easily be extended to show more variables.<\/p>\n<p>The chart I built here is really just scraping the surface of what scatter plots can be. Drop a comment below or hit me up on twitter and I\u2019d be more than happy to send you some examples of my personal favourites!<\/p>\n<hr \/>\n<p><strong>See next:<\/strong><\/p>\n<ul>\n<li>JS scatter plot\u00a0<a href=\"https:\/\/www.anychart.com\/products\/anychart\/gallery\/Scatter_Charts\/\">examples<\/a><\/li>\n<li>JS scatter plot\u00a0<a href=\"https:\/\/docs.anychart.com\/Basic_Charts\/Scatter_Plot\/Overview\/\" target=\"_blank\" rel=\"nofollow\">documentation<\/a><\/li>\n<li>More\u00a0<a href=\"https:\/\/www.anychart.com\/blog\/category\/javascript-chart-tutorials\/\">JS charting tutorials<\/a><\/li>\n<\/ul>\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>Scatter plots are a great way to visualize data. Data is represented as points on a Cartesian plane where the x and y coordinate of each point represents a variable. These charts let you investigate the relationship between two variables, detect outliers in the data set as well as detect trends. They are one of [&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":18,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,263,23,13,279,4],"tags":[53,845,2000,268,63,1995,1996,1994,284,127,258,282,471,266,509,54,461,1760,256,744,1379,844,165,1998,1999,1997,91,259,1762,32,55,144,36,907,141,81,57,1238,58,65,56,101,209,1761,459,30,172,309,954],"class_list":["post-10399","post","type-post","status-publish","format-standard","hentry","category-anychart-charting-component","category-big-data","category-html5","category-javascript","category-javascript-chart-tutorials","category-tips-and-tricks","tag-anychart","tag-best-data-visualization-software","tag-best-data-visualization-tool","tag-big-data-tools","tag-bubble-chart","tag-cat-data","tag-cat-data-visualization","tag-cats","tag-chart-examples","tag-chart-types","tag-charts","tag-data","tag-data-analysis","tag-data-analytics","tag-data-graphics","tag-data-visualization","tag-data-visualization-101","tag-data-visualization-design","tag-data-visualization-examples","tag-data-visualization-techniques","tag-data-visualization-tool","tag-data-visualization-tutorial","tag-data-visualizations","tag-dog-data","tag-dog-data-visualization","tag-dogs","tag-graphics","tag-graphs","tag-guest-post","tag-html5","tag-html5-charts","tag-infographics","tag-javascript","tag-javascript-chart-tutorial","tag-javascript-charting","tag-javascript-charting-library","tag-javascript-charts","tag-javascript-graph","tag-js-chart","tag-js-charting","tag-js-charts","tag-js-graphics","tag-scatter-chart","tag-scatter-plot","tag-statistics","tag-tips-and-tricks","tag-tutorial","tag-united-states","tag-visual-data-analytics","wpautop"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Scatter Plot Module Development JavaScript Charting Tutorial<\/title>\n<meta name=\"description\" content=\"Data visualization developer Wayde Herman shows how to create a JavaScript Scatter Plot module charting &#039;Cat vs Dog Popularity in US&#039; data for illustration.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.anychart.com\/blog\/2020\/05\/27\/scatter-plot-js-tutorial\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Building JavaScript Scatter Plot Module\" \/>\n<meta property=\"og:description\" content=\"A data visualization developer shows how to create a JavaScript Scatter Plot module charting &#039;Cat vs Dog Popularity in US&#039; data for illustration.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.anychart.com\/blog\/2020\/05\/27\/scatter-plot-js-tutorial\/\" \/>\n<meta property=\"og:site_name\" content=\"AnyChart News\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/AnyCharts\" \/>\n<meta property=\"article:published_time\" content=\"2020-05-27T10:48:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-08-13T10:59:30+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/05\/scatter-social.png\" \/>\n<meta name=\"author\" content=\"Wayde Herman\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"Building JavaScript Scatter Plot Module\" \/>\n<meta name=\"twitter:description\" content=\"A data visualization developer shows how to create a JavaScript Scatter Plot module charting &#039;Cat vs Dog Popularity in US&#039; data for illustration.\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/05\/scatter-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=\"Wayde Herman\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.anychart.com\/blog\/2020\/05\/27\/scatter-plot-js-tutorial\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/2020\/05\/27\/scatter-plot-js-tutorial\/\"},\"author\":{\"name\":\"Wayde Herman\",\"@id\":\"https:\/\/www.anychart.com\/blog\/#\/schema\/person\/d9447a42182ea80639bfcdde177e0f89\"},\"headline\":\"Building JavaScript Scatter Plot Module\",\"datePublished\":\"2020-05-27T10:48:12+00:00\",\"dateModified\":\"2022-08-13T10:59:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/2020\/05\/27\/scatter-plot-js-tutorial\/\"},\"wordCount\":1388,\"commentCount\":1,\"image\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/2020\/05\/27\/scatter-plot-js-tutorial\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/05\/js-scatter-plot.jpg\",\"keywords\":[\"AnyChart\",\"best data visualization software\",\"best data visualization tool\",\"big data tools\",\"bubble chart\",\"cat data\",\"cat data visualization\",\"cats\",\"chart examples\",\"chart types\",\"charts\",\"data\",\"data analysis\",\"data analytics\",\"data graphics\",\"Data Visualization\",\"data visualization 101\",\"data visualization design\",\"data visualization examples\",\"data visualization techniques\",\"data visualization tool\",\"data visualization tutorial\",\"data visualizations\",\"dog data\",\"dog data visualization\",\"dogs\",\"graphics\",\"graphs\",\"guest post\",\"HTML5\",\"html5 charts\",\"infographics\",\"JavaScript\",\"javascript chart tutorial\",\"javascript charting\",\"JavaScript charting library\",\"javascript charts\",\"javascript graph\",\"js chart\",\"js charting\",\"js charts\",\"JS graphics\",\"scatter chart\",\"scatter plot\",\"statistics\",\"Tips and tricks\",\"tutorial\",\"united states\",\"visual data analytics\"],\"articleSection\":[\"AnyChart Charting Component\",\"Big Data\",\"HTML5\",\"JavaScript\",\"JavaScript Chart Tutorials\",\"Tips and Tricks\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.anychart.com\/blog\/2020\/05\/27\/scatter-plot-js-tutorial\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.anychart.com\/blog\/2020\/05\/27\/scatter-plot-js-tutorial\/\",\"url\":\"https:\/\/www.anychart.com\/blog\/2020\/05\/27\/scatter-plot-js-tutorial\/\",\"name\":\"Scatter Plot Module Development JavaScript Charting Tutorial\",\"isPartOf\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/2020\/05\/27\/scatter-plot-js-tutorial\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/2020\/05\/27\/scatter-plot-js-tutorial\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/05\/js-scatter-plot.jpg\",\"datePublished\":\"2020-05-27T10:48:12+00:00\",\"dateModified\":\"2022-08-13T10:59:30+00:00\",\"author\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/#\/schema\/person\/d9447a42182ea80639bfcdde177e0f89\"},\"description\":\"Data visualization developer Wayde Herman shows how to create a JavaScript Scatter Plot module charting 'Cat vs Dog Popularity in US' data for illustration.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/2020\/05\/27\/scatter-plot-js-tutorial\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.anychart.com\/blog\/2020\/05\/27\/scatter-plot-js-tutorial\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.anychart.com\/blog\/2020\/05\/27\/scatter-plot-js-tutorial\/#primaryimage\",\"url\":\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/05\/js-scatter-plot.jpg\",\"contentUrl\":\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/05\/js-scatter-plot.jpg\",\"width\":1400,\"height\":600},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.anychart.com\/blog\/2020\/05\/27\/scatter-plot-js-tutorial\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.anychart.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Building JavaScript Scatter Plot Module\"}]},{\"@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\/d9447a42182ea80639bfcdde177e0f89\",\"name\":\"Wayde Herman\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.anychart.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/117ce313e0a18bbfaabbf201e21dfc14c7f633e1d57e32298ace464d25fc21aa?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/117ce313e0a18bbfaabbf201e21dfc14c7f633e1d57e32298ace464d25fc21aa?s=96&r=g\",\"caption\":\"Wayde Herman\"},\"url\":\"https:\/\/www.anychart.com\/blog\/author\/wayde-herman\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Scatter Plot Module Development JavaScript Charting Tutorial","description":"Data visualization developer Wayde Herman shows how to create a JavaScript Scatter Plot module charting 'Cat vs Dog Popularity in US' data for illustration.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.anychart.com\/blog\/2020\/05\/27\/scatter-plot-js-tutorial\/","og_locale":"en_US","og_type":"article","og_title":"Building JavaScript Scatter Plot Module","og_description":"A data visualization developer shows how to create a JavaScript Scatter Plot module charting 'Cat vs Dog Popularity in US' data for illustration.","og_url":"https:\/\/www.anychart.com\/blog\/2020\/05\/27\/scatter-plot-js-tutorial\/","og_site_name":"AnyChart News","article_publisher":"https:\/\/www.facebook.com\/AnyCharts","article_published_time":"2020-05-27T10:48:12+00:00","article_modified_time":"2022-08-13T10:59:30+00:00","og_image":[{"url":"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/05\/scatter-social.png","type":"","width":"","height":""}],"author":"Wayde Herman","twitter_card":"summary_large_image","twitter_title":"Building JavaScript Scatter Plot Module","twitter_description":"A data visualization developer shows how to create a JavaScript Scatter Plot module charting 'Cat vs Dog Popularity in US' data for illustration.","twitter_image":"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/05\/scatter-social.png","twitter_creator":"@AnyChart","twitter_site":"@AnyChart","twitter_misc":{"Written by":"Wayde Herman","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.anychart.com\/blog\/2020\/05\/27\/scatter-plot-js-tutorial\/#article","isPartOf":{"@id":"https:\/\/www.anychart.com\/blog\/2020\/05\/27\/scatter-plot-js-tutorial\/"},"author":{"name":"Wayde Herman","@id":"https:\/\/www.anychart.com\/blog\/#\/schema\/person\/d9447a42182ea80639bfcdde177e0f89"},"headline":"Building JavaScript Scatter Plot Module","datePublished":"2020-05-27T10:48:12+00:00","dateModified":"2022-08-13T10:59:30+00:00","mainEntityOfPage":{"@id":"https:\/\/www.anychart.com\/blog\/2020\/05\/27\/scatter-plot-js-tutorial\/"},"wordCount":1388,"commentCount":1,"image":{"@id":"https:\/\/www.anychart.com\/blog\/2020\/05\/27\/scatter-plot-js-tutorial\/#primaryimage"},"thumbnailUrl":"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/05\/js-scatter-plot.jpg","keywords":["AnyChart","best data visualization software","best data visualization tool","big data tools","bubble chart","cat data","cat data visualization","cats","chart examples","chart types","charts","data","data analysis","data analytics","data graphics","Data Visualization","data visualization 101","data visualization design","data visualization examples","data visualization techniques","data visualization tool","data visualization tutorial","data visualizations","dog data","dog data visualization","dogs","graphics","graphs","guest post","HTML5","html5 charts","infographics","JavaScript","javascript chart tutorial","javascript charting","JavaScript charting library","javascript charts","javascript graph","js chart","js charting","js charts","JS graphics","scatter chart","scatter plot","statistics","Tips and tricks","tutorial","united states","visual data analytics"],"articleSection":["AnyChart Charting Component","Big Data","HTML5","JavaScript","JavaScript Chart Tutorials","Tips and Tricks"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.anychart.com\/blog\/2020\/05\/27\/scatter-plot-js-tutorial\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.anychart.com\/blog\/2020\/05\/27\/scatter-plot-js-tutorial\/","url":"https:\/\/www.anychart.com\/blog\/2020\/05\/27\/scatter-plot-js-tutorial\/","name":"Scatter Plot Module Development JavaScript Charting Tutorial","isPartOf":{"@id":"https:\/\/www.anychart.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.anychart.com\/blog\/2020\/05\/27\/scatter-plot-js-tutorial\/#primaryimage"},"image":{"@id":"https:\/\/www.anychart.com\/blog\/2020\/05\/27\/scatter-plot-js-tutorial\/#primaryimage"},"thumbnailUrl":"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/05\/js-scatter-plot.jpg","datePublished":"2020-05-27T10:48:12+00:00","dateModified":"2022-08-13T10:59:30+00:00","author":{"@id":"https:\/\/www.anychart.com\/blog\/#\/schema\/person\/d9447a42182ea80639bfcdde177e0f89"},"description":"Data visualization developer Wayde Herman shows how to create a JavaScript Scatter Plot module charting 'Cat vs Dog Popularity in US' data for illustration.","breadcrumb":{"@id":"https:\/\/www.anychart.com\/blog\/2020\/05\/27\/scatter-plot-js-tutorial\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.anychart.com\/blog\/2020\/05\/27\/scatter-plot-js-tutorial\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.anychart.com\/blog\/2020\/05\/27\/scatter-plot-js-tutorial\/#primaryimage","url":"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/05\/js-scatter-plot.jpg","contentUrl":"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/05\/js-scatter-plot.jpg","width":1400,"height":600},{"@type":"BreadcrumbList","@id":"https:\/\/www.anychart.com\/blog\/2020\/05\/27\/scatter-plot-js-tutorial\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.anychart.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Building JavaScript Scatter Plot Module"}]},{"@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\/d9447a42182ea80639bfcdde177e0f89","name":"Wayde Herman","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.anychart.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/117ce313e0a18bbfaabbf201e21dfc14c7f633e1d57e32298ace464d25fc21aa?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/117ce313e0a18bbfaabbf201e21dfc14c7f633e1d57e32298ace464d25fc21aa?s=96&r=g","caption":"Wayde Herman"},"url":"https:\/\/www.anychart.com\/blog\/author\/wayde-herman\/"}]}},"_links":{"self":[{"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/posts\/10399","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\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/comments?post=10399"}],"version-history":[{"count":17,"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/posts\/10399\/revisions"}],"predecessor-version":[{"id":15495,"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/posts\/10399\/revisions\/15495"}],"wp:attachment":[{"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/media?parent=10399"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/categories?post=10399"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/tags?post=10399"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}