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]
    }, {
      name: 'Silver',
      data: [29, 27, 26, 17, 8]
    }, {
      name: 'Bronze',
      data: [29, 23, 32, 19, 7]
    }]
  });
})();

This will draw the following wind rose chart:

Creating a wind rose chart

This shows how easy it is to convert an existing column chart that has stacking enabled to a wind rose chart with appealing visuals.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.139.97.202