{"id":11303,"date":"2020-09-22T11:59:16","date_gmt":"2020-09-22T11:59:16","guid":{"rendered":"https:\/\/www.anychart.com\/blog\/?p=11303"},"modified":"2022-08-13T11:01:48","modified_gmt":"2022-08-13T11:01:48","slug":"box-plot-javascript","status":"publish","type":"post","link":"https:\/\/www.anychart.com\/blog\/2020\/09\/22\/box-plot-javascript\/","title":{"rendered":"How to Build Box Plot Using JavaScript: Visualizing World Happiness"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/09\/box-plot-js-html5-tutorial-guide.png\" alt=\"A box plot visualizing world happiness report data, the cover image for a guide on how to build interactive box plots with JavaScript HTML5\" width=\"100%\" class=\"alignnone size-full wp-image-11306\" srcset=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/09\/box-plot-js-html5-tutorial-guide.png 1400w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/09\/box-plot-js-html5-tutorial-guide-300x167.png 300w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/09\/box-plot-js-html5-tutorial-guide-768x427.png 768w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/09\/box-plot-js-html5-tutorial-guide-1024x569.png 1024w\" sizes=\"(max-width: 1400px) 100vw, 1400px\" \/><a href=\"https:\/\/www.anychart.com\/blog\/2018\/11\/20\/data-visualization-definition-history-examples\/\">Data visualization<\/a> is an important and sometimes undervalued tool in a data scientist\u2019s toolkit. It allows us to gain an understanding and intuition about the data, through exploratory data analysis, which influences preprocessing, feature engineering, and the correct machine learning algorithm choice. It also helps to better evaluate models and even allows you to spot areas in the data where models could have poor performance.<\/p>\n<p>Taking data visualization one step further by adding interactivity is even more advantageous. By adding interactive elements to your visualizations you create a more engaging experience. This in turn makes a user \u2018explore\u2019 visualizations instead of just reading them!<\/p>\n<p>In this tutorial, I will be covering how to build an interactive data visualization, specifically a <a href=\"https:\/\/www.anychart.com\/chartopedia\/chart-type\/box-chart\/\">box plot<\/a> as an example, using JavaScript and a charting library. I will begin by first briefly covering the basics of box plots before going through the steps of building one and then finally using the technique in a fun example to investigate the <strong>distribution of happiness<\/strong> between the different regions of the planet in an attempt to answer the question: \u2018<strong>Where should you live to be happier?<\/strong>\u2019.<\/p>\n<p><!--more Read the JS charting tutorial \u00bb--><\/p>\n<h2>What is a box plot?<\/h2>\n<p>A box plot, also widely called a box-and-whisker plot, is a data visualization technique used to visualize descriptive statistics of datasets. While this chart type is not as useful as a histogram at understanding a single datasets distribution, these visualizations do well at allowing a user to compare different datasets.<\/p>\n<p>Box plots visualize the following summary statistics: The <strong>median<\/strong>, the first and third quartile (<strong>Q1<\/strong> and <strong>Q3<\/strong>), the <strong>low<\/strong> and the <strong>high<\/strong> as well as the <strong>outliers<\/strong>. These are displayed as follows:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/09\/bpx-plot-structure.png\" alt=\"Diagram explaining box plot anatomy\" width=\"80%\" class=\"alignnone size-full wp-image-11307\" srcset=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/09\/bpx-plot-structure.png 800w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/09\/bpx-plot-structure-300x158.png 300w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/09\/bpx-plot-structure-768x403.png 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/p>\n<h2>Creating a JavaScript box plot<\/h2>\n<p>To build an interactive data visualization there are a quite a few options. If you want to learn about JavaScript alternatives, you can have a look <a href=\"https:\/\/en.wikipedia.org\/wiki\/Comparison_of_JavaScript_charting_libraries\" target=\"_blank\" rel=\"nofollow\">here<\/a>. In this example I will be using a JS charting library and specifically <a href=\"https:\/\/www.anychart.com\/\">AnyChart<\/a>. I\u2019m going with AnyChart as it supports box-and-whisker plots (among multiple other chart types), and I think both its <a href=\"https:\/\/docs.anychart.com\/\" target=\"_blank\" rel=\"nofollow\">documentation<\/a> and <a href=\"https:\/\/api.anychart.com\/\" target=\"_blank\" rel=\"nofollow\">API<\/a> are really great for beginners and advanced users alike but alternatives which better suit your needs can work too and will follow similar steps.<\/p>\n<h3>Step 1: Set up the page<\/h3>\n<p>The first step is to set up a page for the box plot visualization. This includes adding the HTML elements, loading the required scripts and setting up the CSS for our chart. Which looks like:<\/p>\n<pre><code class=\"html\">&lt;html&gt;\r\n&nbsp;&nbsp;&lt;head&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;script src=\"https:\/\/cdn.anychart.com\/releases\/8.8.0\/js\/anychart-base.min.js\"&gt;&lt;\/script&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;style type=\"text\/css\"&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;html, body, #container {\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;width: 100%;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;height: 100%;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;margin: 0;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;padding: 0;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;\/style&gt;\r\n&nbsp;&nbsp;&lt;\/head&gt;\r\n&nbsp;&nbsp;&lt;body&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;div id=\"container\"&gt;&lt;\/div&gt;\r\n&nbsp;&nbsp;&lt;\/body&gt;\r\n&nbsp;&nbsp;&lt;script&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;anychart.onDocumentReady(function () {\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\/\/ code goes here.\r\n&nbsp;&nbsp;&nbsp;&nbsp;});\r\n&nbsp;&nbsp;&lt;\/script&gt;\r\n&lt;\/html&gt;<\/code><\/pre>\n<p>When using a charting library you will need to import the correct script in order to use that library and in some cases different modules for different chart types. For access to AnyChart\u2019s box-and-whisker chart, for example, I will need to use the base module.<\/p>\n<p>Once that is sorted I will then need to set the CSS properties for my chart element. Here I have set the box chart to have a width and height of 100%. You can change this depending on your own use case. CSS width and height properties accept percentages (of the parent element), and various length units (most commonly pixels).<\/p>\n<p>Finally, I have a script tag with the JavaScript function <code>anychart.onDocumentReady()<\/code> which is simply a function triggered when the document is loaded. Placing the JavaScript charting code within this function ensures that the code does not trigger before the page is ready which can lead to bad results (read up on <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Learn\/JavaScript\/Asynchronous\" target=\"_blank\" rel=\"nofollow\">asynchronous JavaScript<\/a> to learn more about this).<\/p>\n<h3>Step 2: Load the data<\/h3>\n<p>I will be using data sourced from the <a href=\"https:\/\/worldhappiness.report\/\" target=\"_blank\" rel=\"nofollow\">World Happiness Report<\/a> which is the results compiled from a global survey that attempts to quantify happiness of each country\u2019s citizens to a value between 0 and 10. I obtained this data from <a href=\"https:\/\/www.kaggle.com\/unsdsn\/world-happiness\/home\" target=\"_blank\" rel=\"nofollow\">Kaggle<\/a>, a great place to find fun and interesting datasets. Admittedly most of them are geared towards machine learning applications but a few work well for data visualization purposes.<\/p>\n<p>In preparation for drawing box plots, I need to provide the data in a format and form that is accepted by our chosen charting library. For example, AnyChart JS accepts box plot data in the following form:<\/p>\n<pre><code class=\"javascript\">{x:\"Name\", low: value, q1: value, median: value, q3: value, high: value, outliers: array}<\/code><\/pre>\n<p>Where x is the label, q1 and q3 are the first and third quartile values, low and high are the 1.5 x the interquartile range below q1 and 1.5 x the interquartile range above q3 respectively, and the outliers is an array containing all the outlier values.<\/p>\n<p>I have conveniently preprocessed the data from the world happiness report to produce the following array:<\/p>\n<pre><code class=\"javascript\">var data = [\r\n  {x:\"Western Europe\", low: 5.03, q1: 6.36, median: 6.91, q3: 7.34, high: 7.53},\r\n  {x:\"North America\", low: 7.10, q1: 7.18, median: 7.25, q3: 7.33, high: 7.40},\r\n  {x:\"Australia and New Zealand\", low: 7.31, q1: 7.32, median: 7.32, q3: 7.33, high: 7.33},\r\n  {x:\"Middle East and Northern Africa\", low: 3.07, q1: 4.78, median: 5.30, q3: 6.30, high: 7.27},\r\n  {x:\"Latin America and Caribbean\", low: 4.87, q1: 5.80, median: 6.13, q3: 6.66, high: 7.09, outliers: [4.03]},\r\n  {x:\"Southeastern Asia\", low: 3.91, q1: 4.88, median: 5.28, q3: 6.01, high: 6.74},\r\n  {x:\"Central and Eastern Europe\", low: 4.22, q1: 5.15, median: 5.49, q3: 5.81, high: 6.60},\r\n  {x:\"Eastern Asia\", low: 4.91, q1: 5.30, median: 5.65, q3: 5.90, high: 6.38},\r\n  {x:\"Sub-Saharan Africa\", low: 2.91, q1: 3.74, median: 4.13, q3: 4.43, high: 5.44, outliers: [5.648]},\r\n  {x:\"Southern Asia\", low: 4.40, q1: 4.41, median: 4.64, q3: 4.96, high: 5.20, outliers: [3.36]}\r\n]<\/code><\/pre>\n<h3>Step 3: Draw the box chart<\/h3>\n<p>With only these few lines of code I can draw my box plots:<\/p>\n<pre><code class=\"javascript\">\/\/ create a chart\r\nchart = anychart.box();\r\n\r\n\/\/ create a box series and set the data\r\nseries = chart.box(data);\r\n\r\n\/\/ set the container id\r\nchart.container(\"container\");\r\n\r\n\/\/ initiate drawing the chart\r\nchart.draw();<\/code><\/pre>\n<p>And putting this all together, you will get the following:<\/p>\n<pre><code class=\"html\">&lt;html&gt;\r\n&nbsp;&nbsp;&lt;head&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;script src=\"https:\/\/cdn.anychart.com\/releases\/8.8.0\/js\/anychart-base.min.js\"&gt;&lt;\/script&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;style type=\"text\/css\"&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;html, body, #container {\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;width: 100%;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;height: 100%;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;margin: 0;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;padding: 0;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}\r\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;\/style&gt;\r\n&nbsp;&nbsp;&lt;\/head&gt;\r\n&nbsp;&nbsp;&lt;body&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;div id=\"container\"&gt;&lt;\/div&gt;\r\n&nbsp;&nbsp;&lt;\/body&gt;\r\n&nbsp;&nbsp;&lt;script&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;anychart.onDocumentReady(function () {\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var data = [\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{x:\"Western Europe\", low: 5.03, q1: 6.36, median: 6.91, q3: 7.34, high: 7.53},\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{x:\"North America\", low: 7.10, q1: 7.18, median: 7.25, q3: 7.33, high: 7.40},\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{x:\"Australia and New Zealand\", low: 7.31, q1: 7.32, median: 7.32, q3: 7.33, high: 7.33},\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{x:\"Middle East and Northern Africa\", low: 3.07, q1: 4.78, median: 5.30, q3: 6.30, high: 7.27},\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{x:\"Latin America and Caribbean\", low: 4.87, q1: 5.80, median: 6.13, q3: 6.66, high: 7.09, outliers: [4.03]},\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{x:\"Southeastern Asia\", low: 3.91, q1: 4.88, median: 5.28, q3: 6.01, high: 6.74},\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{x:\"Central and Eastern Europe\", low: 4.22, q1: 5.15, median: 5.49, q3: 5.81, high: 6.60},\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{x:\"Eastern Asia\", low: 4.91, q1: 5.30, median: 5.65, q3: 5.90, high: 6.38},\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{x:\"Sub-Saharan Africa\", low: 2.91, q1: 3.74, median: 4.13, q3: 4.43, high: 5.44, outliers: [5.648]},\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{x:\"Southern Asia\", low: 4.40, q1: 4.41, median: 4.64, q3: 4.96, high: 5.20, outliers: [3.36]}\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;]\r\n\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\/\/ create a chart\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;chart = anychart.box();\r\n\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\/\/ create a box series and set the data\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;series = chart.box(data);\r\n\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\/\/ set the container id\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;chart.container(\"container\");\r\n\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\/\/ initiate drawing the chart\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;chart.draw();\r\n\r\n&nbsp;&nbsp;&nbsp;&nbsp;});\r\n\r\n&nbsp;&nbsp;&lt;\/script&gt;\r\n&lt;\/html&gt;<\/code><\/pre>\n<p>Which results in:<\/p>\n<p><iframe sandbox=\"allow-scripts allow-pointer-lock allow-same-origin\n                 allow-popups allow-modals allow-forms\" frameBorder=\"0\" class=\"anychart-embed anychart-embed-\"\n        allowtransparency=\"true\" allowfullscreen=\"true\"\n        src=\"https:\/\/playground.anychart.com\/xrhk2TLC\/iframe\"><br \/>\n<\/iframe><br \/>\n<script type=\"text\/javascript\">(function(){\nfunction ac_add_to_head(el){\n\tvar head = document.getElementsByTagName('head')[0];\n\thead.insertBefore(el,head.firstChild);\n}\nfunction ac_add_style(css){\n\tvar ac_style = document.createElement('style');\n\tif (ac_style.styleSheet) ac_style.styleSheet.cssText = css;\n\telse ac_style.appendChild(document.createTextNode(css));\n\tac_add_to_head(ac_style);\n}\nac_add_style(\".anychart-embed-{width:100%;height:500px;}\");\n})();<\/script><\/p>\n<p><a href=\"https:\/\/codepen.io\/waydeherman\/pen\/GRZqPdK\" target=\"_blank\" rel=\"nofollow\">CodePen link<\/a><br \/>\n<a href=\"https:\/\/playground.anychart.com\/xrhk2TLC\/\" target=\"_blank\" rel=\"nofollow\">Playground link<\/a><\/p>\n<p>With these simple steps, I have quickly produced a very functional interactive box-and-whisker plot that I can now easily embed in any web site or app!<\/p>\n<p>While not bad, I think I can do better. Just keep reading.<\/p>\n<h3>Step 4: Customize the box-and-whisker plot<\/h3>\n<p>Data visualization isn\u2019t just processing some data and putting it into a chart. It is about storytelling. It is about making adjustments in order to highlight an insight or making a visualization more engaging.<\/p>\n<p>All decent charting libraries will provide many ways to do this. They will provide this through their API and you can generally find these options by looking through their documentation. As I am using the AnyChart JS charting library in this example I will go through a few of its customization options that are available for box plots.<\/p>\n<h4>Customize the chart design<\/h4>\n<p>It is possible to change many cosmetic and functional aspects of the visualization. To start with, I\u2019ll add a custom title, change the individual axis labels, and stagger the x-axis labels to prevent them from overlapping:<\/p>\n<pre><code class=\"javascript\">\/\/ set the chart title\r\nvar title = chart.title(\"Happiness Level by Region\");\r\n\r\n\/\/ label axis\r\nchart.xAxis().title(\"Regions\");\r\nchart.yAxis().title(\"Happiness Level\");\r\n\r\n\/\/ stagger the x-axis labels\r\nchart.xAxis().staggerMode(true);<\/code><\/pre>\n<p>For the boxes themselves, for example, I can change details for when they are in their default state, their state when hovered over and their state when selected. I can make similar changes to the median line, the stem, the whiskers as well as the outliers. Typically, I would take advantage of these customization options to make my visualization better fit in with the layout\/theme of where I will be hosting my viz or to better suit the data being displayed (eg using greens when visualizing environmental data).<\/p>\n<p>For the outliers I can even change the shape by setting the marker type. (AnyChart has a variety of options which can be seen in the <a href=\"https:\/\/api.anychart.com\/v8\/anychart.enums.MarkerType\" target=\"_blank\" rel=\"nofollow\">API reference<\/a>).<\/p>\n<p>These changes can be made easily with the following code:<\/p>\n<pre><code class=\"javascript\">\/\/ configure visual appearance of series\r\nseries.normal().fill(\"#36558F\", 0.2);\r\nseries.hovered().fill(\"#36558F\", 0.2);\r\nseries.selected().fill(\"#36558F\", 0.6);\r\nseries.normal().stroke(\"#36558F\", 1);\r\nseries.hovered().stroke(\"#36558F\", 2);\r\nseries.selected().stroke(\"#36558F\", 4);\r\n\r\n\/\/ configure medians\r\nseries.normal().medianStroke(\"#dd2c00\", 1);\r\nseries.hovered().medianStroke(\"#dd2c00\", 2);\r\nseries.selected().medianStroke(\"#dd2c00\", 2);\r\n\r\n\/\/ configure outliers\r\nseries.normal().outlierMarkers({\r\n  fill: \"#36558F 0.2\",\r\n  stroke: { color: \"#36558F\", thickness: 1 },\r\n  size: 5,\r\n  type: \"star5\",\r\n});\r\nseries.hovered().outlierMarkers({\r\n  fill: \"#36558F 0.2\",\r\n  stroke: { color: \"#36558F\", thickness: 2 },\r\n  size: 5,\r\n  type: \"star5\",\r\n});\r\nseries.selected().outlierMarkers({\r\n  fill: \"#36558F 0.6\",\r\n  stroke: { color: \"#36558F\", thickness: 4 },\r\n  size: 7.5,\r\n  type: \"star5\",\r\n});\r\n\r\n\/\/ configure stems\r\nseries.normal().stemStroke(\"#36558F\", 0.5);\r\nseries.hovered().stemStroke(\"#36558F\", 1);\r\nseries.selected().stemStroke(\"#36558F\", 2);\r\n\r\n\/\/ configure whiskers\r\nseries.whiskerWidth(50);\r\nseries.normal().whiskerStroke(\"#36558F\", 0.5);\r\nseries.hovered().whiskerStroke(\"#36558F\", 1);\r\nseries.selected().whiskerStroke(\"#36558F\", 2);<\/code><\/pre>\n<p>Here I input the color and opacity and the color and width of the fill and stroke respectively. Color arguments can be given in many accepted formats. Here I\u2019ve gone with the more widely used hex codes.<\/p>\n<p>Incorporating all of this results in:<\/p>\n<p><iframe sandbox=\"allow-scripts allow-pointer-lock allow-same-origin\n                 allow-popups allow-modals allow-forms\" frameBorder=\"0\" class=\"anychart-embed anychart-embed-\"\n        allowtransparency=\"true\" allowfullscreen=\"true\"\n        src=\"https:\/\/playground.anychart.com\/R2bFWqKD\/iframe\"><br \/>\n<\/iframe><br \/>\n<script type=\"text\/javascript\">(function(){\nfunction ac_add_to_head(el){\n\tvar head = document.getElementsByTagName('head')[0];\n\thead.insertBefore(el,head.firstChild);\n}\nfunction ac_add_style(css){\n\tvar ac_style = document.createElement('style');\n\tif (ac_style.styleSheet) ac_style.styleSheet.cssText = css;\n\telse ac_style.appendChild(document.createTextNode(css));\n\tac_add_to_head(ac_style);\n}\nac_add_style(\".anychart-embed-{width:width:100%;height:500px;}\");\n})();<\/script><\/p>\n<p><a href=\"https:\/\/codepen.io\/waydeherman\/pen\/poybBbb\" target=\"_blank\" rel=\"nofollow\">CodePen link<\/a><br \/>\n<a href=\"https:\/\/playground.anychart.com\/R2bFWqKD\/\" target=\"_blank\" rel=\"nofollow\">Playground link<\/a><\/p>\n<h4>Improve the box plot tooltip<\/h4>\n<p>As you may have noticed, when hovering over a box you can see all of the summary statistics used to draw these plots\u2026 except for the outliers. I\u2019ll fix that and add the outlier data to the box plot tooltip as well.<\/p>\n<pre><code class=\"javascript\">\/\/ configure tooltip\r\nchart.tooltip().titleFormat(\"Region: {%x}\")\r\nchart.tooltip().format(\"Low: {%low} \\n High: {%high} \\n Quantile 1: {%q1} \\n Quantile 3: {%q3} \\n Median: {%median} \\n Outliers: {%outliers}\");<\/code><\/pre>\n<p>And if you add that to the previous code you get the following interactive box-and-whisker chart:<\/p>\n<p><iframe sandbox=\"allow-scripts allow-pointer-lock allow-same-origin\n                 allow-popups allow-modals allow-forms\" frameBorder=\"0\" class=\"anychart-embed anychart-embed-\"\n        allowtransparency=\"true\" allowfullscreen=\"true\"\n        src=\"https:\/\/playground.anychart.com\/eH6WSJcR\/iframe\"><br \/>\n<\/iframe><br \/>\n<script type=\"text\/javascript\">(function(){\nfunction ac_add_to_head(el){\n\tvar head = document.getElementsByTagName('head')[0];\n\thead.insertBefore(el,head.firstChild);\n}\nfunction ac_add_style(css){\n\tvar ac_style = document.createElement('style');\n\tif (ac_style.styleSheet) ac_style.styleSheet.cssText = css;\n\telse ac_style.appendChild(document.createTextNode(css));\n\tac_add_to_head(ac_style);\n}\nac_add_style(\".anychart-embed-{width:100%;height:500px;}\");\n})();<\/script><\/p>\n<p><a href=\"https:\/\/codepen.io\/waydeherman\/pen\/KKzMYyN\" target=\"_blank\" rel=\"nofollow\">CodePen link<\/a><br \/>\n<a href=\"https:\/\/playground.anychart.com\/eH6WSJcR\/\" target=\"_blank\" rel=\"nofollow\">Playground link<\/a><\/p>\n<p>Awesome! We\u2019ve just visualized happiness (sort-of)! From the above plot I can clearly see that Sub Saharan Africa isn\u2019t the happiest of places, while Western Europeans and North Americans smile a ton the happiest place to be is clearly Australia and New Zealand!<\/p>\n<p>*I am from Sub Saharan Africa and am not too confident of these results from my anecdotal experiences!<\/p>\n<h2>Conclusion<\/h2>\n<p>As you can see, making an interactive data visualization is very easy. It doesn\u2019t require much knowledge of JavaScript to get started (depending on the charting library you use) and the results are great! Here I created a box plot but the process is very similar for other chart types and by consulting the documentation it can be very easy to change.<\/p>\n<p>This is only the tip of the iceberg with regards to what you can do, whether it be more interesting customizations or using different data sources. I hope that this tutorial on box and whisker plots can be a great springboard for learning further!<\/p>\n<hr \/>\n<p><em>Published with permission of Wayde Herman. Originally appeared on <a href=\"https:\/\/towardsdatascience.com\/building-box-plots-using-javascript-visualizing-world-happiness-ab0dd1d370c5\" target=\"_blank\" rel=\"nofollow\">Towards Data Science<\/a> under the title &#8220;Building Box Plots Using JavaScript: Visualizing World Happiness&#8221; on September 4, 2020.<\/em><\/p>\n<p><!-- SyntaxHighlighter --><link rel=\"stylesheet\" href=\"\/\/cdnjs.cloudflare.com\/ajax\/libs\/highlight.js\/9.12.0\/styles\/default.min.css\"><link rel=\"stylesheet\" href=\"\/\/cdnjs.cloudflare.com\/ajax\/libs\/highlight.js\/9.12.0\/styles\/atom-one-light.min.css\"><script src=\"\/\/cdnjs.cloudflare.com\/ajax\/libs\/highlight.js\/9.12.0\/highlight.min.js\"><\/script><script>hljs.initHighlightingOnLoad();<\/script><\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>Data visualization is an important and sometimes undervalued tool in a data scientist\u2019s toolkit. It allows us to gain an understanding and intuition about the data, through exploratory data analysis, which influences preprocessing, feature engineering, and the correct machine learning algorithm choice. It also helps to better evaluate models and even allows you to spot [&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,8,23,13,279,4],"tags":[53,211,2110,212,2111,254,1758,284,127,166,258,471,266,620,1292,880,806,1759,509,1098,840,294,257,54,1760,256,1111,350,842,744,1379,844,165,313,1370,743,133,774,775,1154,2014,32,55,144,167,146,36,907,141,249,81,57,58,56,68,459,782,1331,30,1369,172,832,954,2015,2112],"class_list":["post-11303","post","type-post","status-publish","format-standard","hentry","category-anychart-charting-component","category-big-data","category-business-intelligence","category-html5","category-javascript","category-javascript-chart-tutorials","category-tips-and-tricks","tag-anychart","tag-box-chart","tag-box-plot","tag-box-and-whisker-chart","tag-box-and-whisker-plot","tag-chart","tag-chart-design","tag-chart-examples","tag-chart-types","tag-charting","tag-charts","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-is-beautiful","tag-data-presentations","tag-data-science","tag-data-stories","tag-data-visualization","tag-data-visualization-design","tag-data-visualization-examples","tag-data-visualization-practice","tag-data-visualization-projects","tag-data-visualization-task","tag-data-visualization-techniques","tag-data-visualization-tool","tag-data-visualization-tutorial","tag-data-visualizations","tag-data-visuals","tag-data-viz-examples","tag-data-viz","tag-dataviz","tag-dataviz-examples","tag-dataviz-projects","tag-good-data-visualization","tag-html-charts","tag-html5","tag-html5-charts","tag-infographics","tag-interactive-charts","tag-interactive-data-visualization","tag-javascript","tag-javascript-chart-tutorial","tag-javascript-charting","tag-javascript-charting-api","tag-javascript-charting-library","tag-javascript-charts","tag-js-chart","tag-js-charts","tag-js-maps","tag-statistics","tag-survey-data","tag-survey-data-visualization","tag-tips-and-tricks","tag-towards-data-science","tag-tutorial","tag-visual-data","tag-visual-data-analytics","tag-web-charts","tag-world-happiness-report","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 Create Box Plot Using JavaScript: Visualizing World Happiness<\/title>\n<meta name=\"description\" content=\"A simple guide to Box Plots illustrated with the help of data on happiness. See what a Box Plot is &amp; how to create it with JavaScript.\" \/>\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\/09\/22\/box-plot-javascript\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Create Box Plot Using JS: Visualizing World Happiness\" \/>\n<meta property=\"og:description\" content=\"A simple guide to Box Plots illustrated with the help of data on happiness. See what a Box Plot is &amp; how to create it with JavaScript.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.anychart.com\/blog\/2020\/09\/22\/box-plot-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=\"2020-09-22T11:59:16+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-08-13T11:01:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/09\/box-plot-js-html5-tutorial-guide.png\" \/>\n<meta name=\"author\" content=\"Wayde Herman\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"How to Create Box Plot Using JS: Visualizing World Happiness\" \/>\n<meta name=\"twitter:description\" content=\"A simple guide to Box Plots illustrated with the help of data on happiness. See what a Box Plot is &amp; how to create it with JavaScript.\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/09\/box-plot-js-html5-tutorial-guide.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=\"11 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.anychart.com\/blog\/2020\/09\/22\/box-plot-javascript\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/2020\/09\/22\/box-plot-javascript\/\"},\"author\":{\"name\":\"Wayde Herman\",\"@id\":\"https:\/\/www.anychart.com\/blog\/#\/schema\/person\/d9447a42182ea80639bfcdde177e0f89\"},\"headline\":\"How to Build Box Plot Using JavaScript: Visualizing World Happiness\",\"datePublished\":\"2020-09-22T11:59:16+00:00\",\"dateModified\":\"2022-08-13T11:01:48+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/2020\/09\/22\/box-plot-javascript\/\"},\"wordCount\":1403,\"commentCount\":1,\"image\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/2020\/09\/22\/box-plot-javascript\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/09\/box-plot-js-html5-tutorial-guide.png\",\"keywords\":[\"AnyChart\",\"box chart\",\"box plot\",\"box-and-whisker chart\",\"box-and-whisker plot\",\"chart\",\"chart design\",\"chart examples\",\"chart types\",\"charting\",\"charts\",\"data analysis\",\"data analytics\",\"data analytics examples\",\"data chart\",\"data charting\",\"data charts\",\"data design\",\"data graphics\",\"data is beautiful\",\"data presentations\",\"data science\",\"data stories\",\"Data Visualization\",\"data visualization design\",\"data visualization examples\",\"data visualization practice\",\"data visualization projects\",\"data visualization task\",\"data visualization techniques\",\"data visualization tool\",\"data visualization tutorial\",\"data visualizations\",\"data visuals\",\"data viz examples\",\"data-viz\",\"dataviz\",\"dataviz examples\",\"dataviz projects\",\"good data visualization\",\"HTML charts\",\"HTML5\",\"html5 charts\",\"infographics\",\"interactive charts\",\"interactive data visualization\",\"JavaScript\",\"javascript chart tutorial\",\"javascript charting\",\"javascript charting api\",\"JavaScript charting library\",\"javascript charts\",\"js chart\",\"js charts\",\"js maps\",\"statistics\",\"survey data\",\"survey data visualization\",\"Tips and tricks\",\"Towards Data Science\",\"tutorial\",\"visual data\",\"visual data analytics\",\"web charts\",\"World Happiness Report\"],\"articleSection\":[\"AnyChart Charting Component\",\"Big Data\",\"Business Intelligence\",\"HTML5\",\"JavaScript\",\"JavaScript Chart Tutorials\",\"Tips and Tricks\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.anychart.com\/blog\/2020\/09\/22\/box-plot-javascript\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.anychart.com\/blog\/2020\/09\/22\/box-plot-javascript\/\",\"url\":\"https:\/\/www.anychart.com\/blog\/2020\/09\/22\/box-plot-javascript\/\",\"name\":\"How to Create Box Plot Using JavaScript: Visualizing World Happiness\",\"isPartOf\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/2020\/09\/22\/box-plot-javascript\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/2020\/09\/22\/box-plot-javascript\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/09\/box-plot-js-html5-tutorial-guide.png\",\"datePublished\":\"2020-09-22T11:59:16+00:00\",\"dateModified\":\"2022-08-13T11:01:48+00:00\",\"author\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/#\/schema\/person\/d9447a42182ea80639bfcdde177e0f89\"},\"description\":\"A simple guide to Box Plots illustrated with the help of data on happiness. See what a Box Plot is & how to create it with JavaScript.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/2020\/09\/22\/box-plot-javascript\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.anychart.com\/blog\/2020\/09\/22\/box-plot-javascript\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.anychart.com\/blog\/2020\/09\/22\/box-plot-javascript\/#primaryimage\",\"url\":\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/09\/box-plot-js-html5-tutorial-guide.png\",\"contentUrl\":\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/09\/box-plot-js-html5-tutorial-guide.png\",\"width\":1400,\"height\":778},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.anychart.com\/blog\/2020\/09\/22\/box-plot-javascript\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.anychart.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Build Box Plot Using JavaScript: Visualizing World Happiness\"}]},{\"@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":"How to Create Box Plot Using JavaScript: Visualizing World Happiness","description":"A simple guide to Box Plots illustrated with the help of data on happiness. See what a Box Plot is & how to create it with JavaScript.","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\/09\/22\/box-plot-javascript\/","og_locale":"en_US","og_type":"article","og_title":"How to Create Box Plot Using JS: Visualizing World Happiness","og_description":"A simple guide to Box Plots illustrated with the help of data on happiness. See what a Box Plot is & how to create it with JavaScript.","og_url":"https:\/\/www.anychart.com\/blog\/2020\/09\/22\/box-plot-javascript\/","og_site_name":"AnyChart News","article_publisher":"https:\/\/www.facebook.com\/AnyCharts","article_published_time":"2020-09-22T11:59:16+00:00","article_modified_time":"2022-08-13T11:01:48+00:00","og_image":[{"url":"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/09\/box-plot-js-html5-tutorial-guide.png","type":"","width":"","height":""}],"author":"Wayde Herman","twitter_card":"summary_large_image","twitter_title":"How to Create Box Plot Using JS: Visualizing World Happiness","twitter_description":"A simple guide to Box Plots illustrated with the help of data on happiness. See what a Box Plot is & how to create it with JavaScript.","twitter_image":"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/09\/box-plot-js-html5-tutorial-guide.png","twitter_creator":"@AnyChart","twitter_site":"@AnyChart","twitter_misc":{"Written by":"Wayde Herman","Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.anychart.com\/blog\/2020\/09\/22\/box-plot-javascript\/#article","isPartOf":{"@id":"https:\/\/www.anychart.com\/blog\/2020\/09\/22\/box-plot-javascript\/"},"author":{"name":"Wayde Herman","@id":"https:\/\/www.anychart.com\/blog\/#\/schema\/person\/d9447a42182ea80639bfcdde177e0f89"},"headline":"How to Build Box Plot Using JavaScript: Visualizing World Happiness","datePublished":"2020-09-22T11:59:16+00:00","dateModified":"2022-08-13T11:01:48+00:00","mainEntityOfPage":{"@id":"https:\/\/www.anychart.com\/blog\/2020\/09\/22\/box-plot-javascript\/"},"wordCount":1403,"commentCount":1,"image":{"@id":"https:\/\/www.anychart.com\/blog\/2020\/09\/22\/box-plot-javascript\/#primaryimage"},"thumbnailUrl":"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/09\/box-plot-js-html5-tutorial-guide.png","keywords":["AnyChart","box chart","box plot","box-and-whisker chart","box-and-whisker plot","chart","chart design","chart examples","chart types","charting","charts","data analysis","data analytics","data analytics examples","data chart","data charting","data charts","data design","data graphics","data is beautiful","data presentations","data science","data stories","Data Visualization","data visualization design","data visualization examples","data visualization practice","data visualization projects","data visualization task","data visualization techniques","data visualization tool","data visualization tutorial","data visualizations","data visuals","data viz examples","data-viz","dataviz","dataviz examples","dataviz projects","good data visualization","HTML charts","HTML5","html5 charts","infographics","interactive charts","interactive data visualization","JavaScript","javascript chart tutorial","javascript charting","javascript charting api","JavaScript charting library","javascript charts","js chart","js charts","js maps","statistics","survey data","survey data visualization","Tips and tricks","Towards Data Science","tutorial","visual data","visual data analytics","web charts","World Happiness Report"],"articleSection":["AnyChart Charting Component","Big Data","Business Intelligence","HTML5","JavaScript","JavaScript Chart Tutorials","Tips and Tricks"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.anychart.com\/blog\/2020\/09\/22\/box-plot-javascript\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.anychart.com\/blog\/2020\/09\/22\/box-plot-javascript\/","url":"https:\/\/www.anychart.com\/blog\/2020\/09\/22\/box-plot-javascript\/","name":"How to Create Box Plot Using JavaScript: Visualizing World Happiness","isPartOf":{"@id":"https:\/\/www.anychart.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.anychart.com\/blog\/2020\/09\/22\/box-plot-javascript\/#primaryimage"},"image":{"@id":"https:\/\/www.anychart.com\/blog\/2020\/09\/22\/box-plot-javascript\/#primaryimage"},"thumbnailUrl":"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/09\/box-plot-js-html5-tutorial-guide.png","datePublished":"2020-09-22T11:59:16+00:00","dateModified":"2022-08-13T11:01:48+00:00","author":{"@id":"https:\/\/www.anychart.com\/blog\/#\/schema\/person\/d9447a42182ea80639bfcdde177e0f89"},"description":"A simple guide to Box Plots illustrated with the help of data on happiness. See what a Box Plot is & how to create it with JavaScript.","breadcrumb":{"@id":"https:\/\/www.anychart.com\/blog\/2020\/09\/22\/box-plot-javascript\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.anychart.com\/blog\/2020\/09\/22\/box-plot-javascript\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.anychart.com\/blog\/2020\/09\/22\/box-plot-javascript\/#primaryimage","url":"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/09\/box-plot-js-html5-tutorial-guide.png","contentUrl":"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2020\/09\/box-plot-js-html5-tutorial-guide.png","width":1400,"height":778},{"@type":"BreadcrumbList","@id":"https:\/\/www.anychart.com\/blog\/2020\/09\/22\/box-plot-javascript\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.anychart.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Build Box Plot Using JavaScript: Visualizing World Happiness"}]},{"@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\/11303","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=11303"}],"version-history":[{"count":14,"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/posts\/11303\/revisions"}],"predecessor-version":[{"id":15501,"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/posts\/11303\/revisions\/15501"}],"wp:attachment":[{"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/media?parent=11303"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/categories?post=11303"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/tags?post=11303"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}