Created
March 26, 2015 09:52
-
-
Save lucidfrontier45/f7fb900bf04b58840a1a to your computer and use it in GitHub Desktop.
asset_allocation_highcharts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(function () { | |
| $(document).ready(function () { | |
| // Build the chart | |
| Highcharts.setOptions({ | |
| colors: ['#4572A7', '#AA4643', '#89A54E', '#80699B', '#3D96AE', '#DB843D', '#92A8CD', '#A47D7C', '#B5CA92', '#0000cd', '#dda0dd'] | |
| }); | |
| $('#container').highcharts({ | |
| chart: { | |
| plotBackgroundColor: null, | |
| plotBorderWidth: null, | |
| plotShadow: false | |
| }, | |
| title: { | |
| text: 'My Asset Allocation' | |
| }, | |
| tooltip: { | |
| pointFormat: '{series.name}: <b>{point.y:.1f}</b>' | |
| }, | |
| plotOptions: { | |
| pie: { | |
| allowPointSelect: true, | |
| cursor: 'pointer', | |
| dataLabels: { | |
| enabled: true, | |
| format: '<b>{point.name}</b>: {point.percentage:.1f}%', | |
| style: { | |
| color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black' | |
| } | |
| }, | |
| showInLegend: false | |
| } | |
| }, | |
| series: [{ | |
| type: 'pie', | |
| name: 'Browser share', | |
| data: [['日本国REIT', 0.2539204812], | |
| ['日本国債券', 0.8275937388999999], | |
| ['新興国REIT', 0.8887216842000002], | |
| ['新興国株式', 7.014847521649999], | |
| ['フロンティア株式', 7.32], | |
| ['先進国債券', 8.59103056395], | |
| ['先進国REIT', 9.8065626466], | |
| ['ハイイールド債券', 10.552], | |
| ['先進国株式', 15.589046105449999], | |
| ['日本国株式', 26.3907078119], | |
| ['新興国債券', 52.33657808615]] | |
| }] | |
| }); | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment