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 waterfall chart


A waterfall chart displays the cumulative effect of the values. Each data point is accumulated on top of the previous data point or subtracted from the previous data point if the value is negative. This creates a flying bricks appearance due to the suspension of columns in midair.

Waterfall charts are most suitable in finance where one needs to visualize the cumulative effect of several positive and negative values.

In the following example, we will plot the budget breakdown of the London 2012 Olympics by the expense area:

$( '#chart_container' ).highcharts({
       chart: {
              type: 'waterfall'
       },
       title: {
              text: 'Budget of London 2012 Olympics'
       },
       xAxis: {
              type: 'category'
       },
       yAxis: {
              title: {
                     text: 'US million dollars'
              }
       },
       tooltip: {
              valueSuffix: ' Million USD'
       },
       series: [{
              name...