O'Reilly logo

Highcharts Cookbook by Nicholas Terwoord

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Exploring a Highcharts stopwatch

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.

Getting ready

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.

How to do it...

To get started, follow the ensuing instructions:

  1. Define the HTML code for our stopwatch controls as shown in the following code:
    <div id='container'></div> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required