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

Creating a wind rose chart


A wind rose chart is created by enabling column stacking option in a series. Though it's not a very common type of chart, it's worth looking at, given that it's based on polar charts.

Consider the following modified code of an example from Chapter 2, Column and Bar Charts, that shows the breakdown of medals earned by leading countries in Olympics 2012. Notice the effect of enabling the column stacking option:

(function() {
  $( '#medal_table' ).highcharts({
    chart: {
      type: 'column',
      polar: true
    },
    title: {
      text: 'Olympics 2012 Medal Table'
    },
    xAxis: {
      title: {
        text: 'Countries'
      },
      categories: ['United States', 'China', 'Russian Federation', 'Great Britain', 'South Korea']
    },
    yAxis: {
      title: {
        text: 'Medals',
        y: -45
      }
    },
    plotOptions: {
      column: {
        stacking: 'normal'
      }
    },
    series: [{
      name: 'Gold',
      data: [46, 38, 24, 29, 13...