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

Graphing equations

Mathematics classes are filled with many equations, and students are often required to learn how to plot these equations. In this recipe, we'll look at how it is possible to create a simple application to graph equations.

Getting ready

To set up a basic page and install jQuery and Highcharts, refer to 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, perform the following steps:

  1. Create input fields for our graph's parameters and observe the page, as shown in the following code:
    <div id='container'></div> <label for='equation'>Equation:</label> <input type='text' id='equation' placeholder='javascript (e.g. Math.pow(x, 2))'/><br/> <label for='maxX'>Max. ...

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