When creating charts, we may have little control over which format the data comes back in. Due to this, it's important that we be aware of how to work with the different formats that Highcharts supports.
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:
Define the options as shown in the following code:
var options = { series: [] };
Assign the series data as an array of arrays as shown in the following code:
var options = { series: [{ name: 'Array of arrays', data: [ [0, 0], [1, 1], [2, 4], [3, 9] ] }] };
Create a second series as an array of objects as shown in the following code:
var options = { series: [{ name: 'Array of arrays', data: [ [0, 0], [1, 1], [2, 4], [3, 9] ] }, { ...