Highcharts Pie Demo CSV Data

Data accepeted as csv in this version v6.0 or above of data.js.

by Ben Clayton

HTML

<script src="//code.highcharts.com/7.1.3/highcharts.js"></script>
<script src="//code.highcharts.com/7.1.3/modules/exporting.js"></script>
<script src="//code.highcharts.com/7.1.3/modules/data.js"></script>

<div id="container" style="min-width: 310px; height: 400px; max-width: 600px; margin: 0 auto"></div>

CSS

body {
  background-color: #808880;
}

JavaScript

var cfg = {
  "subtitle": {
    "text": " "
  },
  "plotOptions": {
    "series": {
      "dataLabels": {
        "enabled": true
      },
      "animation": false
    }
  },
  "exporting": {},
  "title": {
    "text": "BROWSERSx"
  },
  "data": {
    "csv": "Name;Value\nIE;10\nFF;20\nChrome;66\n"
  },
  "chart": {
    "type": "pie"
  }
};


var over = {
  "plotOptions": {
    "pie": {
      "dataLabels": {
       formatter: function() {
          return this.y + 'k';
        }
      }
    }
  }
}

cfg = Highcharts.merge(cfg,over);

Highcharts.chart('container',cfg);