Book Image

Highcharts Cookbook

By : Nicholas Terwoord
Book Image

Highcharts Cookbook

By: Nicholas Terwoord

Overview of this book

<p>Highcharts is a JavaScript library that enables web developers to create a wide range of different, highly customized charts. Highcharts easily integrates with existing JavaScript frameworks and is simple enough to make a column chart in a few lines of code, but flexible enough to handle more complex charting scenarios such as viewing multiple chart types with different data sources on a multitude of devices and form-factors.</p> <p>"Highcharts Cookbook" is a practical guide that provides you with clear, step-by-step recipes to create dynamic, functional charts in your web applications using Highcharts. With "Highcharts Cookbook", you will create and design dynamic and versatile charts in different scenarios.</p> <p>"Highcharts Cookbook" through its wide array of recipes will walk you through everything you need to know about Highcharts and will enable you to unleash its full potential in your web applications quickly and easily.</p> <p>You will learn how to integrate Highcharts with different frontend and backend libraries such as ExtJS, jQuery, and the Yii framework with some examples in Python, PHP, and NodeJS. You will also cover how to handle user interactions like form input and mouse events, how to fetch remote data in CSV, XML, and JSON format, and how to render charts for offline usage. If you want to learn the different ways you can leverage the power of Highcharts to create, integrate and extend its features in your application, then this book is for you.</p>
Table of Contents (19 chapters)
Highcharts Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Using jQuery UI tabs and Highcharts


So far, we've been able to create charts and modify their containers using CSS, or the chart itself using options. One element that we haven't looked into is layout. This recipe will show us how we can put Highcharts in jQuery UI tabs, but these steps will be very similar to the steps for using other jQuery UI elements, such as an accordion.

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.

We will also need to include CSS and JavaScript for jQuery UI by performing the following steps:

  1. Modify bower.json to include jquery-ui as follows:

    {
     "name": "highcharts-cookbook-chapter-6",
     "dependencies": {
      "jquery": "^1.9",
      "jquery-ui": "^1.10",
      "highcharts": "~3.0"
     }
    }
  2. Install bower dependencies with the following code:

    bower install
  3. Include jQuery UI theming on the page as follows:

    <title>Chapter 6 - Integrating with...