Highcharts Demo

author(s): Torstein Hønsi

by Hassan Rehman

HTML

<script src="https://code.highcharts.com/highcharts.js"></script>

<div id="container" style="height: 400px"></div>

CSS

.highcharts-legend-item{
  padding-top: 50px;
}

JavaScript

Highcharts.chart('container', {
  "chart": {
    "type" : "pie",
    "width": 500,
    "height": 300
  },
  "title": {
    "text": null
  },
  "plotOptions": {
      "pie": {
        "cursor": "pointer",
        "dataLabels": { 
          "_comment": "this is what doesn't show labels ON the chart .. pdf needs to use legend instead",
          "enabled": false 
        },
        "showInLegend": true
      }
  },
  "legend": {
    "labelFormat": "{name} ({percentage:.1f}%)",
    "layout": "vertical",
    "align": "right",
    "verticalAlign": "middle",
    "itemStyle": {
      "width": 200,
      "fontSize": 10,
      textOverflow: null
    },
    itemMarginTop: 7
  },
  "series": [
    {
      "data": [
        {"name": "Carnar Fund, Ltd","y": 13.56},
        {"name": "ECM Enhanced Global Opportunities Fund","y": 9.61},
        {"name": "ECM Fund Ltd","y": 8.4},
        {"name": "FGC Multi Strategy Fund LLC","y": 12.15},
        {"name": "Howell Market Neutral Fund LP","y": 8.12},
        {"name": "Iris Global Macro","y": 9.93},
        {"name": "NCM Absolute Alpha","y": 7.76},
        {"name": "NCM Distressed Debt Fund","y": 4.84},
        {"name": "Roger Global Equity Fund","y": 16.47},
        {"name": "ValueTech High Return Offshore Fund","y": 9.16}
      ]
    }
  ],
  "exporting": false,
  "credits": false
}
);