You are previewing Highcharts Cookbook.
O'Reilly logo
Highcharts Cookbook

Book Description

Javascript developers can add the most amazing charts to their web applications by using Highcharts and this step-by-step guide gives you the works with over 80 practical recipes. Unleash its potential.

In Detail

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.

"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.

"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.

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.

What You Will Learn

  • Create charts in a variety of display formats
  • Process data from different remote or local sources with AJAX and Websockets
  • Create simple polls
  • Render charts for offline usage or e-mail
  • Integrate Highcharts with existing frontend and backend frameworks
  • Connect Highcharts to other data sources such as git for interesting visualizations
  • Display simple statistical data
  • Extend the Highcharts library for more reusable, versatile charts
  • Downloading the example code for this book. 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.

    Table of Contents

    1. Highcharts Cookbook
      1. Table of Contents
      2. Highcharts Cookbook
      3. Credits
      4. About the Author
      5. About the Reviewers
      6. www.PacktPub.com
        1. Support files, eBooks, discount offers and more
          1. Why Subscribe?
          2. Free Access for Packt account holders
      7. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Downloading the example code
          2. Downloading the color images of this book
          3. Errata
          4. Piracy
          5. Questions
      8. 1. Getting Started with Highcharts
        1. Introduction
        2. Finding documentation on Highcharts
          1. How to do it...
        3. Creating your first chart
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        4. Including multiple series in one chart
          1. How to do it...
          2. There's more...
        5. Displaying multiple charts in one graph
          1. How to do it...
          2. How it works...
          3. There's more...
        6. Using the same data in multiple charts
          1. How to do it...
          2. How it works...
        7. Creating spiderweb graphs for comparison
          1. How to do it...
        8. Creating custom tooltips
          1. How to do it...
          2. There's more...
        9. Adding extra content to tooltips
          1. How to do it...
          2. How it works...
        10. Making charts internationalizable/localizable
          1. Getting ready...
          2. How to do it...
          3. How it works...
          4. There's more...
        11. Creating a new theme
          1. How to do it...
          2. How it works...
          3. There's more...
        12. Creating reusable graphs
          1. How to do it...
          2. How it works...
      9. 2. Processing Data
        1. Introduction
        2. Working with different data formats
          1. Getting ready
          2. How to do it...
          3. How it works...
        3. Using AJAX for polling charts
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        4. Using WebSockets for real-time updates
          1. Getting ready
          2. How to do it...
          3. How it works...
        5. Drilling down and filtering data
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        6. Using CSV, XML, or JSON with Highcharts
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        7. Handling cross-domain data
          1. Getting ready
          2. How to do it...
          3. How it works...
        8. Handling dates
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
      10. 3. Handling User Interaction
        1. Introduction
        2. Creating a simple poll
          1. Getting ready
          2. How to do it...
          3. How it works...
        3. Making graphs zoomable
          1. Getting ready
          2. How to do it...
          3. How it works...
        4. Creating master details graphs
          1. Getting ready
          2. How to do it...
          3. How it works...
        5. Slicing and dicing time data
          1. Getting ready
          2. How to do it...
          3. How it works...
        6. Annotating a chart
          1. Getting ready
          2. How to do it...
          3. How it works...
        7. Developing dynamic tooltips
          1. Getting ready
          2. How to do it...
          3. How it works...
        8. Taking actions on other events
          1. Getting ready
          2. How to do it...
          3. How it works...
        9. Adding events after the chart is rendered
          1. Getting ready
          2. How to do it...
          3. How it works...
      11. 4. Sharing Charts on the Web
        1. Introduction
        2. Rendering charts on the server side
          1. Getting ready
          2. How to do it...
          3. How it works...
        3. Exporting images to different formats
          1. Getting ready
          2. How to do it...
          3. How it works...
        4. E-mailing static charts
          1. Getting ready...
          2. How to do it...
          3. How it works...
          4. There's more...
        5. E-mailing dynamic charts
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        6. Preparing charts for printing
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
      12. 5. Integrating with ExtJS
        1. Introduction
        2. Setting up a simple ExtJS project
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        3. Using Highcharts in ExtJS
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        4. Connecting your chart using Ext.data.Store
          1. Getting ready
          2. How to do it...
          3. How it works...
        5. Observing live data using other Store types
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        6. Connecting your chart to Ext.app.Controller
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        7. Creating charts that inherit from other charts
          1. Getting ready
          2. How to do it...
          3. How it works...
      13. 6. Integrating with jQuery
        1. Introduction
        2. Creating charts with jQuery
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        3. Using the data- attributes to load charts
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        4. Binding events using jQuery.on
          1. Getting ready
          2. How to do it...
          3. How it works...
        5. Handling user interaction with jQuery
          1. Getting ready
          2. How to do it...
          3. How it works...
        6. Updating a chart on the backend
          1. Getting ready
          2. How to do it...
          3. How it works...
        7. Using jQuery UI tabs and Highcharts
          1. Getting ready
          2. How to do it...
          3. How it works...
        8. Modifying charts using jQuery UI widgets
          1. Getting ready
          2. How to do it...
          3. How it works...
        9. Putting charts in pages using jQuery Mobile
          1. How to do it...
          2. How it works...
      14. 7. Integrating with the Yii Framework
        1. Introduction
        2. Setting up a simple Yii project
          1. Getting ready
          2. How to do it...
          3. How it works...
        3. Creating a chart from model data
          1. Getting ready
          2. How to do it...
          3. How it works...
        4. Generating a chart with a Yii CLI command
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        5. Creating charts with a RESTful controller
          1. Getting ready
          2. How to do it...
          3. How it works...
        6. Updating the model when the chart changes
          1. Getting ready
          2. How to do it...
          3. How it works...
      15. 8. Integrating with Other Frameworks
        1. Introduction
        2. Using NodeJS as a data provider
          1. Getting ready
          2. How to do it...
          3. How it works...
        3. Using Django as a data provider
          1. Getting ready
          2. How to do it...
          3. How it works...
        4. Using Flask/Bottle as a data provider
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        5. Integrating with Backbone
          1. Getting ready
          2. How to do it...
          3. How it works...
        6. Using AngularJS data bindings and controllers
          1. Getting ready
          2. How to do it...
          3. How it works...
        7. Using NodeJS for chart rendering
          1. Getting ready
          2. How to do it...
          3. How it works...
      16. 9. Extending Highcharts
        1. Introduction
        2. Wrapping existing functions
          1. Getting ready
          2. How to do it...
          3. How it works...
        3. Creating new chart types
          1. How to do it...
          2. How it works...
        4. Creating your own Highcharts extension
          1. How to do it...
          2. How it works...
        5. Adding new functions to your extension
          1. How to do it...
          2. How it works...
        6. JSHinting your code
          1. Getting ready
          2. How to do it...
          3. How it works...
        7. Unit testing your new extension
          1. Getting ready
          2. How to do it...
          3. How it works...
        8. Packaging your extension
          1. Getting ready
          2. How to do it...
          3. How it works...
        9. Minifying your code
          1. Getting ready
          2. How to do it...
          3. How it works...
      17. 10. Math and Statistics
        1. Introduction
        2. Graphing equations
          1. Getting ready
          2. How to do it...
          3. How it works...
        3. Showing descriptive statistics with box plots
          1. Getting ready
          2. How to do it...
          3. How it works...
        4. Plotting distributions with jStat
          1. Getting ready
          2. How to do it...
          3. How it works...
        5. Displaying experimental data with scatter plots
          1. Getting ready
          2. How to do it...
          3. How it works...
        6. Displaying percentiles with area range graphs
          1. Getting ready
          2. How to do it...
          3. How it works...
      18. 11. System Integration
        1. Introduction
        2. Exploring hard drive usage
          1. Getting ready
          2. How to do it...
          3. How it works...
        3. Understanding CPU and memory usage graphs
          1. Getting ready
          2. How to do it...
          3. How it works...
        4. Showing Git commits by contributor
          1. Getting ready
          2. How to do it...
          3. How it works...
        5. Showing Git commits over time
          1. Getting ready
          2. How to do it...
          3. How it works...
      19. 12. Other Inspirational Uses
        1. Introduction
        2. Demonstrating time zones with gauge charts
          1. Getting ready
          2. How to do it...
          3. How it works...
        3. Exploring a Highcharts stopwatch
          1. Getting ready
          2. How to do it...
          3. How it works...
        4. Counting words per minute
          1. Getting ready
          2. How to do it...
          3. How it works...
        5. Measuring the distance travelled
          1. Getting ready
          2. How to do it...
          3. How it works...
        6. Plotting tweets per day
          1. Getting ready
          2. How to do it...
          3. How it works...
        7. Creating a compass
          1. Getting ready
          2. How to do it...
          3. How it works...
        8. Creating a weight-watching application
          1. Getting ready
          2. How to do it...
          3. How it works...
      20. Index