加载中...

层叠区域图百分比


调试运行

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>图形展示</title>
</head>
<body>
 
<div class="detail-section">
    <div id="canvas">
 
    </div>
</div>
 
<script src="http://g.tbcdn.cn/bui/acharts/1.0.32/acharts-min.js"></script>
<!-- https://g.alicdn.com/bui/acharts/1.0.29/acharts-min.js -->
 
 
 
  <script type="text/javascript">
        var chart = new AChart({
          theme : AChart.Theme.SmoothBase,
          id : 'canvas',
          width : 950,
          height : 500,
          plotCfg : {
            margin : [50,50,100]
 
          },
          xAxis : {
            type : 'circle',
            tickInterval : 45
          },
          yAxis : {
            title : null,
            type : 'radius',
            grid : {
              type : 'polygon' //圆形栅格,可以改成circle
            },
            labels : {
              label : {
                x : -12
              }
            },
            min : 0
          },
          seriesOptions : {
            areaCfg : {
              stackType : 'percent'
            }
          },
          /*tooltip : {
            shared : true //共享栅格
          },*/
          series: [
            {
                name : 'c1',
                data: [8, 7, 6, 5, 4, 3, 2, 1]
            },
            {
                name: 'c2',
                data: [1, 2, 3, 4, 5, 6, 7, 8]
            }, {
                name: 'c3',
                data: [1, 8, 2, 7, 3, 6, 4, 5]
            }
            ]
        });
 
        chart.render();
      </script>
 
</body>
</html>

还没有评论.