dchart-pie-multi-radius

0.5.8 • Public • Published

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}
      ]);

Readme

Keywords

none

Package Sidebar

Install

npm i dchart-pie-multi-radius

Weekly Downloads

3

Version

0.5.8

License

ISC

Unpacked Size

111 kB

Total Files

9

Last publish

Collaborators

  • elvira
  • grace.hw