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.
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.
To get started, perform the following steps:
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. X:</label> <input type='text' id='maxX' placeholder='100'/><br/> <label for='minX'>Min. X:</label> <input type='text' id='minX' placeholder='-100...