Highcharts is a JavaScript library for creating beautiful, interactive charts for the Web. It supports more than 20 chart types with various configuration options to help visualize data in a more robust way.
This book aims to be a fast-paced, step-by-step guide for anyone who is starting out with Highcharts. It presents information in a simple manner to help you get started with Highcharts in no time. References to the official documentation have been provided for you whenever a new concept is introduced to encourage you to dig deeper into the details.
You will be first exposed to simple concepts such as initializing different chart types and using their configuration options to modify their appearance and behavior. Once you have a solid foundation, we will move on to relatively advanced concepts, including Highcharts events and APIs. Finally, you will be presented with some additional techniques that involve working with stored and dynamically generated data.
By the end of this book, you will have a solid understanding of Highcharts and will be able to use it in different scenarios.
Chapter 1, Getting Started with Highcharts, describes Highcharts and its features. It covers basic installation of Highcharts with a working chart example.
Chapter 2, Column and Bar Charts, covers column and bar charts. It introduces the basic chart configuration options and shows how to configure a drilldown series.
Chapter 3, Line and Spline Charts, covers line and spline charts. It explains how different chart types can be combined to present data in a more understandable way.
Chapter 4, Area, Scatter, and Bubble Charts, describes the working of area, scatter, and bubble charts. It also introduces a new Highcharts feature: creating 3D charts.
Chapter 5, Pie, Polar, and Spider Web Charts, gives a step-by-step guide on working with basic pie charts and then configuring them to create a drilldown series. After that, polar and spider web charts will be explained.
Chapter 6, Other Chart Types, covers different chart types that are not covered in the previous chapters, including gauges, waterfall chart, pyramid chart, funnel chart, and heat maps.
Chapter 7, Theming with Highcharts, covers different aspects of modifying the appearance of Highcharts. It shows how to create a global chart theme, how to use Google web fonts, and how to use jQuery UI easing for chart loading effects.
Chapter 8, Exploring Highcharts APIs and Events, explains the usage of the robust yet simple APIs that Highcharts provides. At the end of this chapter, you will be provided with a foundation to work with Highcharts events and extend Highcharts.
Chapter 9, Going Further with Highcharts, includes different techniques to work with data from various sources and export Highcharts into various formats.
You should have a working knowledge of HTML, CSS, and JavaScript. It is also preferred—but not required—to have knowledge of a server-side programming language, as we will be manipulating databases later in this book.
The following are the requirements:
You must have PHP on your computer. This can be done by installing WAMP (http://wampserver.com), XAMPP (https://www.apachefriends.org), or LAMP (https://bitnami.com/stack/lamp/installer).
You must have a modern web browser such as Chrome, Firefox, IE, or Opera.
This book is for developers who are just starting out with Highcharts JavaScript library to create interactive charts for their web applications. It also serves as a guide for developers who have knowledge of other JavaScript charting libraries and are willing to migrate to Highcharts.
In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.
Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "The Date.UTC()
method used in the series component is the native JavaScript method that takes in date/time and returns the Unix timestamp."
A block of code is set as follows:
(function() { $( '#chart_container' ).highcharts({ chart: { type: 'line' }, title: { text: 'Vehicles Manufactured in the UK' }, subtitle: { text: 'Source: <a href="http://www.oica.net/">OICA</a>', useHTML: true }, data: { table: document.getElementById( 'vehicle_data' ) } }); })();
New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "When the Shortcut window is closed, click on Save to save the changes."
Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.
To send us general feedback, simply send an e-mail to <[email protected]>
, and mention the book title via the subject of your message.
If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.
Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.
You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.
We also provide you with a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from: https://www.packtpub.com/sites/default/files/downloads/3964OS_Graphics.pdf.
Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.
Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.
Please contact us at <[email protected]>
with a link to the suspected pirated material.
We appreciate your help in protecting our authors, and our ability to bring you valuable content.
You can contact us at <[email protected]>
if you are having a problem with any aspect of the book, and we will do our best to address it.