{"id":16791,"date":"2023-08-17T11:03:24","date_gmt":"2023-08-17T11:03:24","guid":{"rendered":"https:\/\/www.anychart.com\/blog\/?p=16791"},"modified":"2023-08-17T15:37:39","modified_gmt":"2023-08-17T15:37:39","slug":"linear-gauge-for-typing-speed-test","status":"publish","type":"post","link":"https:\/\/www.anychart.com\/blog\/2023\/08\/17\/linear-gauge-for-typing-speed-test\/","title":{"rendered":"Creating Dynamic Linear Gauge for Real-Time Typing Speed Test Data Visualization: Using JavaScript"},"content":{"rendered":"<p><a href=\"https:\/\/www.anychart.com\/blog\/2023\/08\/17\/linear-gauge-for-typing-speed-test\"><img decoding=\"async\" class=\"alignnone size-full wp-image-16829\" src=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2023\/08\/js-linear-gauge-for-typing-speed-test.png\" alt=\"Linear Gauge for Real-Time Typing Speed Test Data Visualization\" width=\"100%\" srcset=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2023\/08\/js-linear-gauge-for-typing-speed-test.png 1366w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2023\/08\/js-linear-gauge-for-typing-speed-test-300x169.png 300w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2023\/08\/js-linear-gauge-for-typing-speed-test-768x432.png 768w, https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2023\/08\/js-linear-gauge-for-typing-speed-test-1024x576.png 1024w\" sizes=\"(max-width: 1366px) 100vw, 1366px\" \/><\/a>From clocks to weight scales, speedometers to thermostats, and even the battery charge icon on your phone, Gauge Charts are widely used to represent a value on a scale or range, providing a clear visual indication of the represented measurement. Gauges can be <a href=\"https:\/\/www.anychart.com\/chartopedia\/chart-type\/circular-gauge\/\">circular<\/a> or <a href=\"https:\/\/www.anychart.com\/chartopedia\/chart-type\/linear-gauge\/\">linear<\/a>, and in this article, our focus will be on the latter style. I will guide you on how to create a cool linear gauge using JavaScript.<\/p>\n<p>Specifically, we will explore the demonstration of linear gauges using an example of a real-time typing speed test. Throughout the article, we will delve into the structure of linear gauges, discuss styling options, explore how they can be connected to data, and show how you can easily build your Linear Gauges using JavaScript in just a matter of minutes. By the end of the tutorial, you&#8217;ll have an awesome example of a linear gauge used to dynamically illustrate typing speed test results or whichever data you want.<\/p>\n<p>So, let&#8217;s dive in and elevate your web-based interactive <a href=\"https:\/\/www.anychart.com\/blog\/2018\/11\/20\/data-visualization-definition-history-examples\/\">data visualization<\/a> game!<\/p>\n<p><!--more Read the JS charting tutorial \u00bb--><\/p>\n<h2>Linear Gauge Preview<\/h2>\n<p>Behold a preview of our JS linear gauge-based typing speedometer, a captivating visualization we will build together in this tutorial.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-16811\" src=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2023\/08\/typing-speed-test-linear-gauge.gif\" alt=\"\" width=\"75%\" \/><\/p>\n<h2>1. Creating a Basic Linear Gauge Chart<\/h2>\n<p>First, we\u2019ll go through the steps to quickly create a basic Linear Gauge chart using JavaScript. Let&#8217;s get started!<\/p>\n<h3>1.1. Make a Simple HTML Page<\/h3>\n<p>Every web page starts with an HTML scaffold, and so does our demo.<\/p>\n<pre><code class=\"html\">&lt;!DOCTYPE html&gt;\r\n&lt;html lang=\"en\"&gt;\r\n  &lt;head&gt;\r\n    &lt;meta charset=UTF-8\/&gt;\r\n    &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" \/&gt;\r\n    &lt;title&gt;Typing Speed Test&lt;\/title&gt;\r\n    &lt;style&gt;\r\n      html,\r\n      body,\r\n      #container {\r\n        width: 100%;\r\n        height: 100%;\r\n        margin: 0;\r\n        padding: 0;\r\n      }\r\n    &lt;\/style&gt;\r\n  &lt;\/head&gt;\r\n  &lt;body&gt;\r\n    &lt;div id=\"container\"&gt;&lt;\/div&gt;\r\n  &lt;\/body&gt;\r\n&lt;\/html&gt;<\/code><\/pre>\n<p>Our linear gauge will be put in a <code>div<\/code> provided with the ID <strong>container<\/strong>. In the <code>head<\/code> tag, I\u2019ve included the <code>style<\/code> tag with the rules for this element\u2019s width and height, as well as margin and padding, which you can adjust to fit your needs.<\/p>\n<h3>1.2. Connect JavaScript Charting Library<\/h3>\n<p>Now that our HTML page with a container is all set, it&#8217;s time to integrate the JavaScript charting library of our choice into the mix.<\/p>\n<p>For this tutorial, I am using <a href=\"https:\/\/www.anychart.com\/\">AnyChart JS Charts<\/a>, which provides excellent support for linear gauges, allowing us to create stunning interactive charts with its pre-built capabilities effortlessly.<\/p>\n<p>To connect the charting library, we need to add the necessary scripts to the <code>head<\/code> section of our HTML file. Specifically, we&#8217;ll include two lightweight <a href=\"https:\/\/docs.anychart.com\/Quick_Start\/Modules\" target=\"_blank\" rel=\"nofollow\">modules<\/a> required to work with linear gauges.<\/p>\n<pre><code class=\"html\">&lt;script src=\"https:\/\/cdn.anychart.com\/releases\/8.11.1\/js\/anychart-core.min.js\"&gt;&lt;\/script&gt;\r\n&lt;script src=\"https:\/\/cdn.anychart.com\/releases\/8.11.1\/js\/anychart-linear-gauge.min.js\"&gt;&lt;\/script&gt;<\/code><\/pre>\n<h3>1.3. Code JS Linear Gauge<\/h3>\n<p>Now comes the exciting part: write some JavaScript code to bring our linear gauge to life!<\/p>\n<h4>1.3.1. Build Foundation<\/h4>\n<p>Before we dive into the magical world of interactive gauges, let&#8217;s ensure a smooth sailing experience by setting up a main function that waits for the document to be fully loaded before executing the JavaScript charting code.<\/p>\n<pre><code class=\"html\">&lt;script&gt;\r\n  anychart.onDocumentReady(function () {\r\n    \/\/ The following JS code will be placed right here.\r\n  });\r\n&lt;\/script&gt;<\/code><\/pre>\n<p>Now that we&#8217;ve got it in place, it&#8217;s time to create the main chart object. We\u2019ll be using the <code>anychart.gauges.linear()<\/code> function, which does exactly what it says: creates a linear gauge chart.<\/p>\n<pre><code class=\"javascript\">var gauge = anychart.gauges.linear();<\/code><\/pre>\n<p>To make things look just the way we want, we&#8217;ll specify the layout of our gauge as <strong>horizontal<\/strong> using the <code>layout()<\/code> method on the chart variable.<\/p>\n<pre><code class=\"javascript\">gauge.layout(\"horizontal\");<\/code><\/pre>\n<h4>1.3.2. Load Data<\/h4>\n<p>It&#8217;s time to breathe life into our linear gauge chart by adding some data. In the near future, when we have our live typing speed test tool up and running, this chart will showcase real-time data. But for now, let&#8217;s have some fun with placeholder values. We&#8217;ll use the <code>data()<\/code> method on the gauge variable and set the value to, say, <strong>18<\/strong>.<\/p>\n<pre><code class=\"javascript\">gauge.data([18]);<\/code><\/pre>\n<h4>1.3.3. Configure Scale and Axis<\/h4>\n<p>Let&#8217;s shape the behavior of the gauge by defining its scale and axis. This will give us control over the value\u2019s display.<\/p>\n<p>To begin, we&#8217;ll set up the scale for the chart, specifying the minimum value (<strong>-2<\/strong>) and the maximum value (<strong>30<\/strong>). Additionally, we&#8217;ll set the interval between ticks to <strong>2<\/strong> so our chart will display ticks at each step of two units.<\/p>\n<pre><code class=\"javascript\">var scale = gauge.scale();\r\nscale.minimum(-2);\r\nscale.maximum(30);\r\nscale.ticks().interval(2);<\/code><\/pre>\n<p>Now that we have our scale all sorted, let&#8217;s focus on configuring the axis. We&#8217;ll give it a gentle <strong>5%<\/strong> offset, ensuring it perfectly aligns with the gauge. As for its orientation, we&#8217;ll choose <strong>bottom<\/strong> so the axis appears at the bottom.<\/p>\n<pre><code class=\"javascript\">var axis = gauge.axis(0);\r\naxis.offset(\"5%\");\r\naxis.orientation(\"bottom\");<\/code><\/pre>\n<h4>1.3.4. Set Scale Bar<\/h4>\n<p>It&#8217;s time to add a touch of elegance to our linear gauge with some nice scale bars! It&#8217;s like giving the chart a fancy ruler to measure its enchanting powers. Let&#8217;s get started!<\/p>\n<p>First, we&#8217;ll create a scale bar using the <code>scaleBar()<\/code> method, and since it&#8217;s the first scale bar, we&#8217;ll pass\u00a0<strong>0<\/strong> as the parameter.<\/p>\n<pre><code class=\"javascript\">var scaleBar = gauge.scaleBar(0);<\/code><\/pre>\n<p>Now, let&#8217;s paint the scale bar a beautiful color using the <code>fill()<\/code> method. Why not grace this example with the charming shade of <strong>lightBlue 0.9<\/strong>?<\/p>\n<pre><code class=\"javascript\">scaleBar.fill(\"lightBlue 0.9\");<\/code><\/pre>\n<p>We can utilize the <code>width()<\/code> method to determine the scale bar&#8217;s width. In our example, we&#8217;ll set it to <strong>5%<\/strong>.<\/p>\n<pre><code class=\"javascript\">scaleBar.width(\"5%\");<\/code><\/pre>\n<h4>1.3.5. Add Pointer<\/h4>\n<p>Now, let&#8217;s add an essential element of any linear gauge \u2014 the pointer. It will indicate and visualize the data on the gauge scale. See how to bring it to life.<\/p>\n<p>To begin, we&#8217;ll create a marker pointer by calling <code>gauge.marker(0)<\/code>, designating it as the first marker:<\/p>\n<pre><code class=\"javascript\">var pointer = gauge.marker(0);<\/code><\/pre>\n<p>Now, it&#8217;s time to sprinkle some color on the pointer! We&#8217;ll use the <code>color()<\/code> method and set its value to <strong>black:<\/strong><\/p>\n<pre><code class=\"javascript\">pointer.color(\"black\");<\/code><\/pre>\n<p>To ensure that the pointer plays nicely with other chart elements, we can use the <code>zIndex()<\/code> method. For this case, we&#8217;ll set its stacking order to <strong>1<\/strong>.<\/p>\n<pre><code class=\"javascript\">pointer.zIndex(1);<\/code><\/pre>\n<h4>1.3.6. Draw Gauge<\/h4>\n<p>It&#8217;s time to bring our JavaScript linear gauge to life with just a few more touches.<\/p>\n<p>We\u2019ll use the <code>container()<\/code> method to specify the ID of the HTML element that will proudly hold the gauge.<\/p>\n<pre><code class=\"javascript\">gauge.container(\"container\");<\/code><\/pre>\n<p>Now, the moment we&#8217;ve been waiting for: initiating the drawing of the resulting JS-based linear gauge To do this, we&#8217;ll call the <code>draw()<\/code> method on the gauge variable:<\/p>\n<pre><code class=\"javascript\">gauge.draw();<\/code><\/pre>\n<p>And just like that, the magic unfolds! Our web page is now adorned with a basic JavaScript Linear Gauge chart, complete with a delightful scale bar, finely marked ticks, and an alluring pointer. Check it out below and, with the full code, on the <a href=\"https:\/\/playground.anychart.com\/UlTc3sit\" target=\"_blank\" rel=\"nofollow\">Playground<\/a>.<\/p>\n<p><iframe loading=\"lazy\" class=\"anychart-embed anychart-embed-UlTc3sit\" src=\"https:\/\/playground.anychart.com\/UlTc3sit\/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-UlTc3sit{width:100%;height:600px;}\");\n})();<\/script><\/p>\n<p>We&#8217;ve come a long way on this web development journey, but there&#8217;s still more to explore. Let&#8217;s continue fine-tuning and enhancing our linear gauge, creating a captivating and interactive user experience for the upcoming typing speed test.<\/p>\n<h2>2. Customizing Linear Gauge<\/h2>\n<p>Now that our JS linear gauge is functional, it\u2019s time to elevate its appearance and make it truly shine! Let&#8217;s transform our chart into an informative, colorful, and visually appealing data visualization masterpiece.<\/p>\n<h3>2.1. Arrange Colors<\/h3>\n<p>To infuse our chart with a delightful array of colors, we&#8217;ll use the <code>anychart.scales.ordinalColor()<\/code> method to create a color scale. By using the <code>ranges()<\/code> method, we can define color ranges and assign corresponding colors to them.<\/p>\n<pre><code class=\"javascript\">var scaleBarColorScale = anychart.scales.ordinalColor().ranges([\r\n  {from: -2, to: 0, color: [\"grey 0.9\"]},\r\n  {from: 0, to: 10, color: [\"green 0.9\"]},\r\n  {from: 10, to: 20, color: [\"yellow 0.9\"]},\r\n  {from: 20, to: 27, color: [\"red 0.9\"]},\r\n  {from: 27, to: 30, color: [\"darkRed 0.9\"]}\r\n]);<\/code><\/pre>\n<p>This custom color scheme will give the gauge\u2019s scale bar distinct colors based on the defined intervals, making it visually rich and easier to interpret.<\/p>\n<p>To apply the color scheme and set the width of the scale bar, we can use the <code>colorScale()<\/code> method on the <code>scaleBar<\/code> object:<\/p>\n<pre><code class=\"javascript\">scaleBar.colorScale(scaleBarColorScale);<\/code><\/pre>\n<p>In addition, let&#8217;s also make the gauge&#8217;s background transparent:<\/p>\n<pre><code class=\"javascript\">gauge.background(\"transparent\");<\/code><\/pre>\n<h3>2.2. Adjust Pointer<\/h3>\n<p>Now, let&#8217;s fine-tune the appearance of the pointer. We\u2019ll use the <code>type()<\/code> method to set it as <strong>triangle-down<\/strong>, giving it a downward-pointing triangle shape:<\/p>\n<pre><code>pointer.type(\"triangle-down\");<\/code><\/pre>\n<p>We can adjust the offset using the <code>offset()<\/code> method to align the pointer perfectly. By setting it to <strong>-5%<\/strong>, the marker will be positioned just the way we desire, relative to the scale bar&#8217;s width:<\/p>\n<pre><code class=\"javascript\">pointer.offset(\"-5%\");<\/code><\/pre>\n<p>Explore other <a href=\"https:\/\/api.anychart.com\/anychart.enums.MarkerType\" target=\"_blank\" rel=\"nofollow\">marker types<\/a> and experiment with offsets to achieve your desired visual alignment.<\/p>\n<h3>2.3. Append Label<\/h3>\n<p>To enhance the visualization further, we can add a personalized and visually appealing label for the linear gauge pointer using the <code>labels()<\/code> method.<\/p>\n<p>By calling <code>pointer.labels()<\/code> we&#8217;ll access all the labels associated with the pointer (well, we\u2019ll only use one).<\/p>\n<pre><code class=\"javascript\">var labels = pointer.labels();<\/code><\/pre>\n<p>Then, we can apply the desired configurations:<\/p>\n<p>First, we\u2019ll enable the label display.<\/p>\n<pre><code class=\"javascript\">labels.enabled(true);<\/code><\/pre>\n<p>Next, we&#8217;ll set the font color to <strong>black<\/strong>, ensuring a clean and legible appearance.<\/p>\n<pre><code class=\"javascript\">labels.fontColor(\"#black\");<\/code><\/pre>\n<p>To position the label perfectly, we can adjust its vertical position with an offset of <strong>-10%<\/strong>.<\/p>\n<pre><code class=\"javascript\">labels.offsetY(\"-10%\");<\/code><\/pre>\n<p>We\u2019ll also enable HTML formatting to easily customize the label content.<\/p>\n<pre><code class=\"javascript\">labels.useHtml(true);<\/code><\/pre>\n<p>Finally, we&#8217;ll dynamically define the labels&#8217; content and format it using simple HTML. In this example, the value will be displayed in bold, followed by the text symbols per second.<\/p>\n<pre><code class=\"javascript\">labels.format(function () {\r\n  return `&lt;b&gt;${this.value}&lt;\/b&gt; &lt;br&gt; symbols\/sec`;\r\n});<\/code><\/pre>\n<p>With these stylish configurations in place, our JavaScript-based linear gauge will shine brighter than ever! See it right below and experiment with it on the <a href=\"https:\/\/playground.anychart.com\/eOzjyFB2\" target=\"_blank\" rel=\"nofollow\">Playground<\/a>.<\/p>\n<p><iframe loading=\"lazy\" class=\"anychart-embed anychart-embed-aegeoayJ\" src=\"https:\/\/playground.anychart.com\/aegeoayJ\/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-aegeoayJ{width:100%;height:600px;}\");\n})();<\/script><\/p>\n<p>Feel free to add your data and enjoy! But we are not stopping here in this tutorial and will check out a nice example. Let\u2019s make this linear gauge work for a typing speed test!<\/p>\n<h2>3. Building Typing Speed Test with Linear Gauge<\/h2>\n<p>Let&#8217;s create an engaging real-time typing speed test user interface and connect it to our shining linear gauge, turning it into a dynamic speedometer that visualizes the results on the fly!<\/p>\n<h3>3.1. Compose Typing Speed Test UI<\/h3>\n<p>First, we\u2019ll add some HTML elements to the demo. Then, we\u2019ll update the CSS styles to make them look good.<\/p>\n<h4>3.1.1. Build HTML Elements<\/h4>\n<p>To bring our typing speed test demo application UI to life, let\u2019s add the following elements:<\/p>\n<ul>\n<li>A <code>textarea<\/code> element, where the user can enter text to measure the speed of typing.<\/li>\n<li>A <code>button<\/code> to restart the test, allowing users to retake the typing challenge.<\/li>\n<li>An <code>h2<\/code> line of text to display the results, showcasing the user&#8217;s typing speed.<\/li>\n<li><code>Div<\/code> elements with IDs of <strong>wrapper<\/strong> and <strong>display<\/strong> to provide a structured layout.<\/li>\n<\/ul>\n<pre><code class=\"html\">&lt;body&gt;\r\n  &lt;div id=\"wrapper\"&gt;\r\n    &lt;div id=\"display\"&gt;\r\n      &lt;textarea  \r\n        type=\"text\"\r\n        placeholder=\"Enter up to 125 symbols\"\r\n        id=\"displayInputField\"&gt;\r\n      &lt;\/textarea&gt;\r\n      &lt;h2 id=\"resultText\"&gt;_SCORE_&lt;\/h2&gt;\r\n      &lt;button id=\"restartTest\"&gt;Test again!&lt;\/button&gt;\r\n    &lt;\/div&gt;\r\n    &lt;div id=\"container\"&gt;&lt;\/div&gt;\r\n  &lt;\/div&gt;\r\n&lt;\/body&gt;<\/code><\/pre>\n<h4>3.1.2. Update CSS<\/h4>\n<p>Let&#8217;s update the CSS with the following rules to ensure our new HTML elements are displayed correctly and create an engaging user interface.<\/p>\n<p>The <strong>wrapper<\/strong> element comprises two main parts of a demo: the typing speed test UI (<strong>display<\/strong>) and the chart container (<strong>container<\/strong>).<\/p>\n<pre><code class=\"css\">#wrapper{\r\n  width: 100vw;\r\n  height:100vh;\r\n  display: grid;\r\n  grid-template-rows: 2fr 1fr;\r\n}<\/code><\/pre>\n<p>The <strong>display<\/strong> element contains a text area, results, and a reset button.<\/p>\n<pre><code class=\"css\">#display{\r\n  width: 100%;\r\n  height: 100%;\r\n  display: grid;\r\n  text-align: center;\r\n  place-items: center;\r\n}<\/code><\/pre>\n<p>The <strong>displayInputField<\/strong> is a text area where the user inputs text for speed measurement.<\/p>\n<pre><code class=\"css\">#displayInputField{\r\n  width: 50%;\r\n  height: 50%;\r\n  min-width: 200px;\r\n  min-height: 100px;\r\n  text-align: center;\r\n  font-size: 22px;\r\n  resize: none;\r\n  border-radius: 10px;\r\n}<\/code><\/pre>\n<p>The <strong>resultText<\/strong> and <strong>restartTest<\/strong> are <code>h2<\/code> text and <code>button<\/code> elements that appear after the test.<\/p>\n<pre><code class=\"css\">#resultText, #restartTest{\r\n  display: none;\r\n  font-family: \"courier new\";\r\n}<\/code><\/pre>\n<p>After following the steps, our web page will display an elegant Typing Speed Test UI.<\/p>\n<h3>3.2. Add Interaction and Interactivity<\/h3>\n<p>Now that all the elements are in place, let&#8217;s infuse some JavaScript magic and connect everything! With our JavaScript logic, we&#8217;ll keep track of time and the symbols the user enters. Once the user types 125 symbols, brace yourself for the big reveal \u2014 the results will dazzle before their eyes, along with a handy button to restart the test for more typing fun!<\/p>\n<pre><code class=\"javascript\">\/\/ ceate a symbol counter\r\nvar numberOfSymbolsEntered = 0;\r\n\r\n\/\/ create a typing speed test\r\nvar speedTypingTest = function(gauge){\r\n\t\r\n  \/\/ get dom elements\r\n  var inputFieldElement = document.getElementById(\"displayInputField\");\r\n  inputFieldElement.focus();\r\n  var restartButton = document.getElementById(\"restartTest\");\r\n  var scoreHeader = document.getElementById(\"resultText\");\r\n  \r\n  \/\/ instantiate app variables\r\n  var symbolsPerSecond = 0;\r\n  var iterationCounter = 0;\r\n  var isCounterOn = false;\r\n  \r\n  \/\/ calculate symbols per second rate\r\n  var getSymbolsPerSecond = function(){\r\n    if(isCounterOn){\r\n      symbolsPerSecond = (numberOfSymbolsEntered\/(iterationCounter \/ 10)).toFixed(2);\r\n      gauge.data().set(0,\"value\", symbolsPerSecond);\r\n    } \r\n  }\r\n\r\n  \/\/ instantiate a timeout id\r\n  var timeoutID;\r\n  \r\n  \/\/ create a timer counter function\r\n  var startTimerCounter = function(){\r\n    iterationCounter++;\r\n    timeoutID = setTimeout(startTimerCounter, 100);\r\n    if(!isCounterOn){\r\n      clearTimeout(timeoutID);\r\n    }\r\n  }\r\n  \r\n  \/\/ start a new session of the typing speed test\r\n  var startSpeedTypingTest = function(){\r\n\r\n    \/\/ turn on the timer\r\n    if(!isCounterOn){\r\n      isCounterOn = true;\r\n      startTimerCounter();\r\n    }\r\n\r\n    \/\/ turn off the timer, hide input field, and show results\r\n    if(numberOfSymbolsEntered &gt;= 125){\r\n\r\n      \/\/ switch the counter boolean\r\n      isCounterOn = false;\r\n\r\n      \/\/ show a reset button and set it in focus\r\n      restartButton.style.display = \"block\";\r\n      restartButton.focus();\r\n\r\n      \/\/ show a deadline text and add a final value\r\n      scoreHeader.style.display = \"inline-block\";\r\n      scoreHeader.textContent = `You are typing ${symbolsPerSecond} symbols per second`;\r\n\r\n      \/\/ hide the text area dom element and disable its functionality\r\n      inputFieldElement.style.display = \"none\";\r\n      inputFieldElement.removeEventListener(\"input\", startSpeedTypingTest);\r\n\r\n    }\r\n\r\n    \/\/ update the counter of entered symbols and calculate the rate per second\r\n    numberOfSymbolsEntered++;\r\n    getSymbolsPerSecond();\r\n\r\n  }\r\n    \r\n  \/\/ start the typing speed test by typing in the text field\r\n  inputFieldElement.addEventListener(\"input\", startSpeedTypingTest)\r\n\r\n  \/\/ restart the test by clicking the button\r\n  restartButton.addEventListener(\"click\", function(){\r\n\r\n    \/\/ reset the variables to the initial values\r\n    iterationCounter = 0;\r\n    symbolsPerSecond = 0;\r\n    numberOfSymbolsEntered = 0;\r\n\r\n    \/\/ reset the apperance and values of the dom elements\r\n    inputFieldElement.value = \"\";\r\n    restartButton.style.display = \"none\";\r\n    scoreHeader.style.display = \"none\";\r\n    inputFieldElement.style.display = \"block\";\r\n\r\n    \/\/ set the input in focus and add functionality\r\n    inputFieldElement.focus();\r\n    inputFieldElement.addEventListener(\"input\", startSpeedTypingTest)\r\n\r\n    \/\/ reset the gauge's marker to the initial value\r\n    gauge.data().set(0,\"value\", 0);\r\n\r\n  })\r\n   \r\n}<\/code><\/pre>\n<p>We won&#8217;t dwell too much on this custom JavaScript code within this tutorial. The main focus here is on the exciting ability to change the data of your Linear Gauge using JavaScript dynamically.<\/p>\n<p>To connect this functionality to the chart, we&#8217;ll change the data to a dynamic variable and apply the logic after the gauge has been drawn.<\/p>\n<pre><code class=\"javascript\">anychart.onDocumentReady(function () {\r\n  ...\r\n  \/\/ add data\r\n  gauge.data([numberOfSymbolsEntered]);\r\n  ...\r\n  \/\/ initiate the drawing of the linear gauge\r\n  gauge.draw();\r\n  \r\n  \/\/ initialize typing speed test\r\n  speedTypingTest(gauge);\r\n\r\n});<\/code><\/pre>\n<p>Voil\u00e0! Our typing speedometer demo is now fully functional and ready to impress. Enjoy a delightful typing experience with real-time linear gauge visualization and accurate speed measurement, and you are more than welcome to play with the code on the <a href=\"https:\/\/playground.anychart.com\/mVOYkfkI\" target=\"_blank\" rel=\"nofollow\">Playground<\/a>.<\/p>\n<p><iframe loading=\"lazy\" class=\"anychart-embed anychart-embed-mVOYkfkI\" src=\"https:\/\/playground.anychart.com\/mVOYkfkI\/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-mVOYkfkI{width:100%;height:600px;}\");\n})();<\/script><\/p>\n<h2>Conclusion<\/h2>\n<p>You have now learned how to create a stunning Linear Gauge chart (and a fun Typing Speed Test feeding data to it in real-time) using JavaScript. Don&#8217;t forget to check out the documentation for more in-depth information about linear gauge development. Happy gauging and exploring!<\/p>\n<hr \/>\n<p><strong><em>Don&#8217;t miss our other <a href=\"https:\/\/www.anychart.com\/blog\/category\/javascript-chart-tutorials\/\">JavaScript charting tutorials<\/a>.<\/p>\n<p>Got an idea for a guest post? <a href=\"https:\/\/www.anychart.com\/support\/\">let&#8217;s make it work<\/a>!<\/em><\/strong><\/p>\n<hr \/>\n<p><!-- SyntaxHighlighter --><link rel=\"stylesheet\" href=\"\/\/cdnjs.cloudflare.com\/ajax\/libs\/highlight.js\/9.12.0\/styles\/default.min.css\"><link rel=\"stylesheet\" href=\"\/\/cdnjs.cloudflare.com\/ajax\/libs\/highlight.js\/9.12.0\/styles\/atom-one-light.min.css\"><script src=\"\/\/cdnjs.cloudflare.com\/ajax\/libs\/highlight.js\/9.12.0\/highlight.min.js\"><\/script><script>hljs.initHighlightingOnLoad();<\/script><\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>From clocks to weight scales, speedometers to thermostats, and even the battery charge icon on your phone, Gauge Charts are widely used to represent a value on a scale or range, providing a clear visual indication of the represented measurement. Gauges can be circular or linear, and in this article, our focus will be on [&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":26,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,263,22,23,13,279,4],"tags":[843,619,618,53,3173,260,1758,284,471,266,620,1759,294,2220,2838,54,1389,1760,2757,256,3377,1111,350,744,844,165,313,743,133,774,775,179,3369,1498,805,220,219,1762,2013,2014,32,55,1335,144,2979,2016,167,146,433,152,2949,151,36,907,141,249,3111,81,57,2981,1238,142,96,99,3586,58,65,56,2980,101,3526,222,3594,3595,3596,3598,3597,3592,609,3099,172,3593,807,808,954,610,3100,2816,1763,804,3599,3600,3406,3407],"class_list":["post-16791","post","type-post","status-publish","format-standard","hentry","category-anychart-charting-component","category-big-data","category-charts-and-art","category-html5","category-javascript","category-javascript-chart-tutorials","category-tips-and-tricks","tag-advanced-data-visualization","tag-analysis","tag-analytics","tag-anychart","tag-app-development","tag-best-data-visualization-examples","tag-chart-design","tag-chart-examples","tag-data-analysis","tag-data-analytics","tag-data-analytics-examples","tag-data-design","tag-data-science","tag-data-visual","tag-data-visualisation","tag-data-visualization","tag-data-visualization-best-pracices","tag-data-visualization-design","tag-data-visualization-development","tag-data-visualization-examples","tag-data-visualization-guide","tag-data-visualization-practice","tag-data-visualization-projects","tag-data-visualization-techniques","tag-data-visualization-tutorial","tag-data-visualizations","tag-data-visuals","tag-data-viz","tag-dataviz","tag-dataviz-examples","tag-dataviz-projects","tag-design","tag-developers","tag-example","tag-front-end-development","tag-gauge-charts","tag-gauges","tag-guest-post","tag-html","tag-html-charts","tag-html5","tag-html5-charts","tag-infographic","tag-infographics","tag-information-graphics","tag-information-visualization","tag-interactive-charts","tag-interactive-data-visualization","tag-interactive-graphics","tag-interactive-infographic","tag-interactive-infographics","tag-interactive-visualizations","tag-javascript","tag-javascript-chart-tutorial","tag-javascript-charting","tag-javascript-charting-api","tag-javascript-charting-features","tag-javascript-charting-library","tag-javascript-charts","tag-javascript-gauge","tag-javascript-graph","tag-javascript-graphics","tag-javascript-graphics-library","tag-javascript-library","tag-js","tag-js-chart","tag-js-charting","tag-js-charts","tag-js-gauge","tag-js-graphics","tag-js-library","tag-linear-gauges","tag-real-time","tag-real-time-data","tag-real-time-data-visualization","tag-speed-chart","tag-speed-data","tag-speedometer","tag-storytelling","tag-storytelling-examples","tag-tutorial","tag-typing-speed-test","tag-visual-analysis","tag-visual-analytics","tag-visual-data-analytics","tag-visual-storytelling","tag-visual-storytelling-examples","tag-web-design","tag-web-developers","tag-web-development","tag-web-page","tag-web-project","tag-website","tag-website-development","wpautop"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Creating a Linear Gauge for Typing Speed Test Visualization<\/title>\n<meta name=\"description\" content=\"Need a linear gauge for your website? Learn how to quickly build one in JavaScript &amp; see how it can be used for real-time typing speed test visualization.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.anychart.com\/blog\/2023\/08\/17\/linear-gauge-for-typing-speed-test\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Creating a Linear Gauge for Typing Speed Test in JavaScript\" \/>\n<meta property=\"og:description\" content=\"Learn how to quickly create a linear gauge in JavaScript and see how it can be used for real-time typing speed test data visualization.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.anychart.com\/blog\/2023\/08\/17\/linear-gauge-for-typing-speed-test\/\" \/>\n<meta property=\"og:site_name\" content=\"AnyChart News\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/AnyCharts\" \/>\n<meta property=\"article:published_time\" content=\"2023-08-17T11:03:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-08-17T15:37:39+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2023\/08\/js-linear-gauge-for-typing-speed-test-social.png\" \/>\n<meta name=\"author\" content=\"Nick Gogin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"Creating a Linear Gauge for Typing Speed Test in JavaScript\" \/>\n<meta name=\"twitter:description\" content=\"Learn how to quickly create a linear gauge in JavaScript and see how it can be used for real-time typing speed test data visualization.\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2023\/08\/js-linear-gauge-for-typing-speed-test-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=\"Nick Gogin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"13 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.anychart.com\/blog\/2023\/08\/17\/linear-gauge-for-typing-speed-test\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/2023\/08\/17\/linear-gauge-for-typing-speed-test\/\"},\"author\":{\"name\":\"Nick Gogin\",\"@id\":\"https:\/\/www.anychart.com\/blog\/#\/schema\/person\/bfb1bd337f3eab61855176768fb68d7d\"},\"headline\":\"Creating Dynamic Linear Gauge for Real-Time Typing Speed Test Data Visualization: Using JavaScript\",\"datePublished\":\"2023-08-17T11:03:24+00:00\",\"dateModified\":\"2023-08-17T15:37:39+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/2023\/08\/17\/linear-gauge-for-typing-speed-test\/\"},\"wordCount\":1919,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/2023\/08\/17\/linear-gauge-for-typing-speed-test\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2023\/08\/js-linear-gauge-for-typing-speed-test.png\",\"keywords\":[\"advanced data visualization\",\"analysis\",\"analytics\",\"AnyChart\",\"app development\",\"best data visualization examples\",\"chart design\",\"chart examples\",\"data analysis\",\"data analytics\",\"data analytics examples\",\"data design\",\"data science\",\"data visual\",\"data visualisation\",\"Data Visualization\",\"data visualization best practices\",\"data visualization design\",\"data visualization development\",\"data visualization examples\",\"data visualization guide\",\"data visualization practice\",\"data visualization projects\",\"data visualization techniques\",\"data visualization tutorial\",\"data visualizations\",\"data visuals\",\"data-viz\",\"dataviz\",\"dataviz examples\",\"dataviz projects\",\"design\",\"developers\",\"example\",\"front-end development\",\"gauge charts\",\"gauges\",\"guest post\",\"HTML\",\"HTML charts\",\"HTML5\",\"html5 charts\",\"infographic\",\"infographics\",\"information graphics\",\"information visualization\",\"interactive charts\",\"interactive data visualization\",\"interactive graphics\",\"interactive infographic\",\"interactive infographics\",\"interactive visualizations\",\"JavaScript\",\"javascript chart tutorial\",\"javascript charting\",\"javascript charting api\",\"JavaScript charting features\",\"JavaScript charting library\",\"javascript charts\",\"javascript gauge\",\"javascript graph\",\"javascript graphics\",\"JavaScript graphics library\",\"JavaScript library\",\"js\",\"js chart\",\"js charting\",\"js charts\",\"js gauge\",\"JS graphics\",\"js library\",\"linear gauges\",\"real time\",\"real-time data\",\"real-time data visualization\",\"speed chart\",\"speed data\",\"speedometer\",\"storytelling\",\"storytelling examples\",\"tutorial\",\"typing speed test\",\"visual analysis\",\"visual analytics\",\"visual data analytics\",\"visual storytelling\",\"visual storytelling examples\",\"web design\",\"web developers\",\"web development\",\"web page\",\"web project\",\"website\",\"website development\"],\"articleSection\":[\"AnyChart Charting Component\",\"Big Data\",\"Charts and Art\",\"HTML5\",\"JavaScript\",\"JavaScript Chart Tutorials\",\"Tips and Tricks\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.anychart.com\/blog\/2023\/08\/17\/linear-gauge-for-typing-speed-test\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.anychart.com\/blog\/2023\/08\/17\/linear-gauge-for-typing-speed-test\/\",\"url\":\"https:\/\/www.anychart.com\/blog\/2023\/08\/17\/linear-gauge-for-typing-speed-test\/\",\"name\":\"Creating a Linear Gauge for Typing Speed Test Visualization\",\"isPartOf\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/2023\/08\/17\/linear-gauge-for-typing-speed-test\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/2023\/08\/17\/linear-gauge-for-typing-speed-test\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2023\/08\/js-linear-gauge-for-typing-speed-test.png\",\"datePublished\":\"2023-08-17T11:03:24+00:00\",\"dateModified\":\"2023-08-17T15:37:39+00:00\",\"author\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/#\/schema\/person\/bfb1bd337f3eab61855176768fb68d7d\"},\"description\":\"Need a linear gauge for your website? Learn how to quickly build one in JavaScript & see how it can be used for real-time typing speed test visualization.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.anychart.com\/blog\/2023\/08\/17\/linear-gauge-for-typing-speed-test\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.anychart.com\/blog\/2023\/08\/17\/linear-gauge-for-typing-speed-test\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.anychart.com\/blog\/2023\/08\/17\/linear-gauge-for-typing-speed-test\/#primaryimage\",\"url\":\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2023\/08\/js-linear-gauge-for-typing-speed-test.png\",\"contentUrl\":\"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2023\/08\/js-linear-gauge-for-typing-speed-test.png\",\"width\":1366,\"height\":768},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.anychart.com\/blog\/2023\/08\/17\/linear-gauge-for-typing-speed-test\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.anychart.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Creating Dynamic Linear Gauge for Real-Time Typing Speed Test Data Visualization: Using 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\/bfb1bd337f3eab61855176768fb68d7d\",\"name\":\"Nick Gogin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.anychart.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/e2f74d2eaaa021377176541f70ed2e0fc86c8e3fcffd5a075792f8f45498ccc8?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/e2f74d2eaaa021377176541f70ed2e0fc86c8e3fcffd5a075792f8f45498ccc8?s=96&r=g\",\"caption\":\"Nick Gogin\"},\"url\":\"https:\/\/www.anychart.com\/blog\/author\/nick-gogin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Creating a Linear Gauge for Typing Speed Test Visualization","description":"Need a linear gauge for your website? Learn how to quickly build one in JavaScript & see how it can be used for real-time typing speed test visualization.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.anychart.com\/blog\/2023\/08\/17\/linear-gauge-for-typing-speed-test\/","og_locale":"en_US","og_type":"article","og_title":"Creating a Linear Gauge for Typing Speed Test in JavaScript","og_description":"Learn how to quickly create a linear gauge in JavaScript and see how it can be used for real-time typing speed test data visualization.","og_url":"https:\/\/www.anychart.com\/blog\/2023\/08\/17\/linear-gauge-for-typing-speed-test\/","og_site_name":"AnyChart News","article_publisher":"https:\/\/www.facebook.com\/AnyCharts","article_published_time":"2023-08-17T11:03:24+00:00","article_modified_time":"2023-08-17T15:37:39+00:00","og_image":[{"url":"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2023\/08\/js-linear-gauge-for-typing-speed-test-social.png","type":"","width":"","height":""}],"author":"Nick Gogin","twitter_card":"summary_large_image","twitter_title":"Creating a Linear Gauge for Typing Speed Test in JavaScript","twitter_description":"Learn how to quickly create a linear gauge in JavaScript and see how it can be used for real-time typing speed test data visualization.","twitter_image":"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2023\/08\/js-linear-gauge-for-typing-speed-test-social.png","twitter_creator":"@AnyChart","twitter_site":"@AnyChart","twitter_misc":{"Written by":"Nick Gogin","Est. reading time":"13 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.anychart.com\/blog\/2023\/08\/17\/linear-gauge-for-typing-speed-test\/#article","isPartOf":{"@id":"https:\/\/www.anychart.com\/blog\/2023\/08\/17\/linear-gauge-for-typing-speed-test\/"},"author":{"name":"Nick Gogin","@id":"https:\/\/www.anychart.com\/blog\/#\/schema\/person\/bfb1bd337f3eab61855176768fb68d7d"},"headline":"Creating Dynamic Linear Gauge for Real-Time Typing Speed Test Data Visualization: Using JavaScript","datePublished":"2023-08-17T11:03:24+00:00","dateModified":"2023-08-17T15:37:39+00:00","mainEntityOfPage":{"@id":"https:\/\/www.anychart.com\/blog\/2023\/08\/17\/linear-gauge-for-typing-speed-test\/"},"wordCount":1919,"commentCount":0,"image":{"@id":"https:\/\/www.anychart.com\/blog\/2023\/08\/17\/linear-gauge-for-typing-speed-test\/#primaryimage"},"thumbnailUrl":"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2023\/08\/js-linear-gauge-for-typing-speed-test.png","keywords":["advanced data visualization","analysis","analytics","AnyChart","app development","best data visualization examples","chart design","chart examples","data analysis","data analytics","data analytics examples","data design","data science","data visual","data visualisation","Data Visualization","data visualization best practices","data visualization design","data visualization development","data visualization examples","data visualization guide","data visualization practice","data visualization projects","data visualization techniques","data visualization tutorial","data visualizations","data visuals","data-viz","dataviz","dataviz examples","dataviz projects","design","developers","example","front-end development","gauge charts","gauges","guest post","HTML","HTML charts","HTML5","html5 charts","infographic","infographics","information graphics","information visualization","interactive charts","interactive data visualization","interactive graphics","interactive infographic","interactive infographics","interactive visualizations","JavaScript","javascript chart tutorial","javascript charting","javascript charting api","JavaScript charting features","JavaScript charting library","javascript charts","javascript gauge","javascript graph","javascript graphics","JavaScript graphics library","JavaScript library","js","js chart","js charting","js charts","js gauge","JS graphics","js library","linear gauges","real time","real-time data","real-time data visualization","speed chart","speed data","speedometer","storytelling","storytelling examples","tutorial","typing speed test","visual analysis","visual analytics","visual data analytics","visual storytelling","visual storytelling examples","web design","web developers","web development","web page","web project","website","website development"],"articleSection":["AnyChart Charting Component","Big Data","Charts and Art","HTML5","JavaScript","JavaScript Chart Tutorials","Tips and Tricks"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.anychart.com\/blog\/2023\/08\/17\/linear-gauge-for-typing-speed-test\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.anychart.com\/blog\/2023\/08\/17\/linear-gauge-for-typing-speed-test\/","url":"https:\/\/www.anychart.com\/blog\/2023\/08\/17\/linear-gauge-for-typing-speed-test\/","name":"Creating a Linear Gauge for Typing Speed Test Visualization","isPartOf":{"@id":"https:\/\/www.anychart.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.anychart.com\/blog\/2023\/08\/17\/linear-gauge-for-typing-speed-test\/#primaryimage"},"image":{"@id":"https:\/\/www.anychart.com\/blog\/2023\/08\/17\/linear-gauge-for-typing-speed-test\/#primaryimage"},"thumbnailUrl":"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2023\/08\/js-linear-gauge-for-typing-speed-test.png","datePublished":"2023-08-17T11:03:24+00:00","dateModified":"2023-08-17T15:37:39+00:00","author":{"@id":"https:\/\/www.anychart.com\/blog\/#\/schema\/person\/bfb1bd337f3eab61855176768fb68d7d"},"description":"Need a linear gauge for your website? Learn how to quickly build one in JavaScript & see how it can be used for real-time typing speed test visualization.","breadcrumb":{"@id":"https:\/\/www.anychart.com\/blog\/2023\/08\/17\/linear-gauge-for-typing-speed-test\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.anychart.com\/blog\/2023\/08\/17\/linear-gauge-for-typing-speed-test\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.anychart.com\/blog\/2023\/08\/17\/linear-gauge-for-typing-speed-test\/#primaryimage","url":"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2023\/08\/js-linear-gauge-for-typing-speed-test.png","contentUrl":"https:\/\/www.anychart.com\/blog\/wp-content\/uploads\/2023\/08\/js-linear-gauge-for-typing-speed-test.png","width":1366,"height":768},{"@type":"BreadcrumbList","@id":"https:\/\/www.anychart.com\/blog\/2023\/08\/17\/linear-gauge-for-typing-speed-test\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.anychart.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Creating Dynamic Linear Gauge for Real-Time Typing Speed Test Data Visualization: Using 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\/bfb1bd337f3eab61855176768fb68d7d","name":"Nick Gogin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.anychart.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/e2f74d2eaaa021377176541f70ed2e0fc86c8e3fcffd5a075792f8f45498ccc8?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e2f74d2eaaa021377176541f70ed2e0fc86c8e3fcffd5a075792f8f45498ccc8?s=96&r=g","caption":"Nick Gogin"},"url":"https:\/\/www.anychart.com\/blog\/author\/nick-gogin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/posts\/16791","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\/26"}],"replies":[{"embeddable":true,"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/comments?post=16791"}],"version-history":[{"count":42,"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/posts\/16791\/revisions"}],"predecessor-version":[{"id":16844,"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/posts\/16791\/revisions\/16844"}],"wp:attachment":[{"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/media?parent=16791"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/categories?post=16791"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.anychart.com\/blog\/wp-json\/wp\/v2\/tags?post=16791"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}