If we can create a clock, what other concepts can we create? A clock is just a way to measure time; perhaps there are other ways in which we can measure time? There are. With a few adjustments, we can create not only a clock, but also a stopwatch. This recipe will show how we can leverage the gauge chart to make a realistic-looking stopwatch.
To set up a basic page and install jQuery and Highcharts, refer to the instructions in the Getting ready section of the Creating your first chart recipe in Chapter 1, Getting Started with Highcharts.
To get started, follow the ensuing instructions:
Define the HTML code for our stopwatch controls as shown in the following code:
<div id='container'></div> <button type='button' id='start'>Start</button> <button type='button' id='reset'>Reset</button> <script src='./bower_components/jquery/jquery.js'></script>