首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Echarts :如何使用它来绘制带有describe two数据的Nightingale?

问Echarts :如何使用它来绘制带有describe two数据的Nightingale?
EN

Stack Overflow用户
提问于 2017-07-06 15:28:48
回答 1查看 226关注 0票数 1

​

​

这是一张地图,我想让它描述两个不同的数据。用面积来描述订单的总数,用角度来描述订单的数量。现在我知道type = "pie“和roseType = true可以绘制Nightingale。但是数据只能是一个,面积和角度是相同的百分比。救救我!谢谢!(请原谅我的拖后腿。Ծ‸Ծ)

代码语言:javascript
复制
<style>

    .data-bac{box-shadow: 1px 2px 5px #333;border-radius: 8px;background-color: #fff;}
    .data-img{width:700px;height: 482px;float:left;margin-bottom:20px;}
</style>
<div class='data-img data-bac' id='data-img'></div>
<script>
    var app = echarts.init(document.getElementById('data-img'));
    app.title = '嵌套环形图';
    var sum = [1200,1300,1400,1500] //here is the total money of area ,symbol for 苏州,常州,上海,无锡
    var option = {
        tooltip: {
            trigger: 'item',
            formatter: "{a} <br/>{b}: {c} ({d}%)"
        },
        legend: {
            orient: 'vertical',
            right:"8%",
            bottom:"8%",
            data: ["苏州","常州","无锡","上海"]
        },
        color:['#006699', '#00CC33','#000','#006600'],
        series: [{
            name:'注册用户数量的渠道分布',
            type:'pie',
            radius: ['30%', '55%'],
            roseType : true,
            data: [{
                value: 10,//here is the num of area
                name: '苏州'
            },{
                value: 20,//here is the num of area
                name: '常州'
            },{
                value: 30,//here is the num of area
                name: '无锡'
            },{
                value: 40,//here is the num of area
                name: '上海'
            }],
        }],
        backgroundColor:{color:"rgb(255,255,255)"}
    };
    // 使用刚指定的配置项和数据显示图表。
    app.setOption(option);

</script>
EN

回答 1

Stack Overflow用户

发布于 2017-07-25 20:25:29

我正在为同样的事情而苦苦挣扎,我联系了GitHub上的开发人员,他们告诉我这在ECharts上是不可能的;它根本就不是这样设计的。

你必须在roseType: 'area'和roseType: 'radius'之间做出选择。

Documentation on roseType

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/44942385

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档