O'Reilly logo

Highcharts Essentials by Bilal Shahid

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

Creating line charts with regular time intervals

In the following example, we will plot a line chart for hourly temperature data for Pittsburgh, PA, for January 1, 2013.

Since we are dealing with the date/time series with regular time intervals, we will declare the type property of xAxis to be datetime, and while passing the pointStart and pointInterval properties to the series, we can easily plot the data mentioned.

Let's start with our basic HTML template containing the following code:

<!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Highcharts Essentials</title> </head> <body> <div id="chart_container" style="width: 600px; height: 450px;"></div> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> ...

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