inner radius polar bar chart - Javascript highcharts

Javascript examples for highcharts:Bar Chart

Description

inner radius polar bar chart

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <title>Highcharts Demo</title> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <style id="compiled-css" type="text/css">

#container {/*from   ww  w .  ja va  2 s  .  c  o  m*/
   min-width: 310px;
   max-width: 800px;
   height: 400px;
   margin: 0 auto
}


      </style> 
   </head> 
   <body> 
      <script src="https://code.highcharts.com/highcharts.js"></script> 
      <script src="https://code.highcharts.com/highcharts-more.js"></script> 
      <div id="container"></div> 
      <script type="text/javascript">
Highcharts.chart('container', {
    chart: {
        polar: true,
        type: 'bar',
        events: {
            render: function() {
                var chart = this,
                    middleElement = chart.middleElement;
                if (middleElement) {
                    middleElement.destroy();
                }
                chart.middleElement = chart.renderer.circle(chart.plotSizeX / 2 + chart.plotLeft, chart.plotHeight / 2 + chart.plotTop, 20).attr({
                    zIndex: 3,
                    fill: '#ffffff'
                }).add();
            }
        }
    },
    xAxis: {
        categories: ["Total Score", "Avg. Score", "Sum Score",
            "Best Score"
        ],
        tickmarkPlacement: "between"
    },
    yAxis: {
        min: 0,
        offset: 20,
        max: 60000
    },
    tooltip: {
        borderWidth: 0,
        backgroundColor: 'none',
        shadow: false,
        style: {
            fontSize: '16px'
        },
        headerFormat: '',
        pointFormatter: function() {
            return this.y / 1000 + 'k'
        },
        positioner: function(labelWidth, labelHeight) {
            return {
                x: (this.chart.plotSizeX - labelWidth) / 2 + this.chart.plotLeft,
                y: (this.chart.plotSizeY - labelHeight) / 2 + this.chart.plotTop
            };
        }
    },
    series: [{
        pointPadding: 0,
        groupPadding: 0,
        name: "Athlete 1",
        data: [43000, 19000, 60000, 35000]
    }, {
        pointPadding: 0,
        groupPadding: 0,
        name: "Athlete 2",
        data: [50000, 39000, 42000, 31000]
    }]
});

      </script>  
   </body>
</html>

Related Tutorials