Highcharts Demo
author(s): Torstein Hønsi
by Anil Vangari
HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
JavaScript
Highcharts.chart('container', {
"chart": {
"type": "pie"
},
"title": {
"text": "Efficient Portfolio"
},
"tooltip": {
"headerFormat": "<span style=\"font-size:10px\">{point.key}</span><table>",
"pointFormat": "<tr><td style=\"padding:0\"><b>{point.y:.4f}</b></td></tr>",
"footerFormat": "</table>",
"shared": true,
"useHTML": true
},
"plotOptions": {
"pie": {
"allowPointSelect": true,
"cursor": "pointer",
"dataLabels": {
"enabled": true,
"format": "<b>{point.name}</b>: {point.percentage:.1f} %",
"style": {
"color": "black"
}
}
}
},
"series": [{
"name": "Efficient Portfolio Weights",
"data": [{
"name": "IM VTI (Gross)",
"y": 0.28904414812288076
}, {
"name": "IM IJS (Gross)",
"y": 0.06975058259305975
}, {
"name": "IM EFA (Gross)",
"y": 2.5518832587658887e-17
}, {
"name": "IM EEM (Gross)",
"y": -1.4037437194040278e-17
}, {
"name": "IM VNQ (Gross)",
"y": -2.424672236301133e-17
}, {
"name": "IM TLT (Gross)",
"y": 0.33518842540000393
}, {
"name": "IM LQD (Gross)",
"y": 0.19072253607144646
}, {
"name": "IM GLD (Gross)",
"y": 0.11529430781260899
}]
}]
});