SOURCE

console 命令行工具 X clear

                    
>
console
var fundIndustryAllocationData = [{
  "name": "股票", //行业名称,对应industryName
  "x": 10000, //市值,对应marketValue
  "y": 0.55 //占比,对应ratioInNv
}, {
  "name": "债券", //行业名称,对应industryName
  "x": 10000, //市值,对应marketValue
  "y": 0.15 //占比,对应ratioInNv
}, {
  "name": "现金", //行业名称,对应industryName
  "x": 10000, //市值,对应marketValue
  "y": 0.05 //占比,对应ratioInNv
}, {
  "name": "其他", //行业名称,对应industryName
  "x": 10000, //市值,对应marketValue
  "y": 0.25 //占比,对应ratioInNv
}];

$('#fundIndustryAllocationChart').highcharts({
  chart: {
    type: 'pie',
    height: 200,
    backgroundColor: '#fff',
    borderColor: null,
    margin: [0, 0, 0, 0],
    spacing: [0, 0, 0, 0]
  },
  colors: ['#3d9fe1', '#f56b63', '#fdda76', '#87c499'],
  credits: {
    enabled: false,
    text: null
  },
  legend: {
    align: 'right',
    verticalAlign: 'middle',
    layout: 'vertical',
    labelFormatter: function() {
      return this.name + '(' + parseInt(this.y * 100) + '%)';
    }
  },
  title: {
    text: null
  },
  plotOptions: {
    pie: {
      showInLegend: true
    },
    area: {
      cropThreshold: 0
    },
    series: {
      dataLabels: {
        enabled: false
      },
      enableMouseTracking: false,
      size: '100%',
      innerSize: '80%',
      // center: [70, 70]
    }
  },
  series: [{
    data: fundIndustryAllocationData
  }]
});
<div id="fundIndustryAllocationChart"></div>
#fundIndustryAllocationChart {}

body {
  margin: 0;
}

本项目引用的自定义外部资源