dchart-pie-multi-radius
v0.5.8
Published
dchart-pie-multi-radius
Downloads
9
Readme
dchart-pie-multi-radius
符合dchart规范的多维饼图
安装
npm install dchart-pie-multi-radius
用法
var Pie = require('dchart-pie-multi-radius');
var pie = new Pie(container, {
paxis: {
label : function (d) {
var s = parseInt(options && options['font-size'] || 10);
var size = (s && s < 10) ? 10 : s;
return '<tspan dy="-3" x="0" style="font-size: ' + size + 'px">' + d.y + '%</tspan><tspan x="0" dy="' + size + '" style="font-size: ' + size + 'px">' + d.x + '</tspan>'
}
},
innerArr : [0.6, 0.64, 0.55, 0.695, 0.535, 0.535, 0.7845, 0.593, 0.7347], //饼图内边距百分比
outerArr : [0.73, 0.91, 0.99, 0.72, 0.79, 0.679, 0.81, 0.824, 0.7834] //饼图外边距百分比
});
pie.render([
{"x": "山东", "y": 100},
{"x": "山西", "y": 52},
{"x": "河北", "y": 49}
]);