Book Image

Highcharts Essentials

By : Bilal Shahid
Book Image

Highcharts Essentials

By: Bilal Shahid

Overview of this book

Table of Contents (16 chapters)
Highcharts Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Plotting a pyramid chart


A pyramid chart is triangular in shape and divided into sections, with each data point representing a section. Because of the triangular shape, these sections are not equal in width, and hence the width doesn't necessarily represent the value of each data point. They are useful to show data that needs to be shown in a particular hierarchy.

Note

To plot pyramid and funnel charts, the highcharts-4.x.x/js/modules/funnel.js script is required.

We will take the data from the previous example to plot a pyramid chart of the London 2012 Olympics budget breakdown:

$( '#chart_container' ).highcharts({
       chart: {
              type: 'pyramid',
              marginLeft: -10
       },
       title: {
              text: 'Budget of London 2012 Olympics'
       },
       series: [{
              name: 'Budget',
              data: [
                     ['Venues', 4607],
                     ['Olympic Village', 1919],
                     ['CT operations', 1776],
            ...