let options = {
series: {
type: 'sunburst',
radius: [10, '80%'],
emphasis: {
itemStyle: {
shadowBlur: 20,
shadowOffsetX: 10,
shadowColor: "#fbfbfb",
},
},
labelLine: {
show: false, //隐藏指示线
},
label: {
show: true, //隐藏标示文字
},
itemStyle: {
borderRadius: 6,
borderColor: "#e9e9e9",
borderWidth: 0
},
color:[ "#4e6ef2" ,"#5c73cd","#4e6ef2","#95adf9"],
data: [
{
name: '移动',
itemStyle: { color: "#4e6ef2" },
children: [
{
value: 2,
itemStyle: {
color: "#5c73cd"
},
name: '待激活'
},
{
value: 3,
itemStyle: { color: "#4e6ef2" },
name: '正常'
}, {
value: 5,
itemStyle: { color: "#95adf9" },
name: '注销'
}
]
},
{
name: '电信',
itemStyle: { color: "#7ad542" },
children: [{
value: 2,
itemStyle: {
color: "#98e767"
},
name: '待激活'
}, {
name: '正常',
itemStyle: { color: "#7ad542" },
value: 4
},
{
name: '注销',
itemStyle: { color: "#b9e99c" },
value: 2
}]
},
{
name: '联通',
itemStyle: { color: "#ff6b6b" },
children: [
{
value: 2,
itemStyle: {
color: "#f58a8a"
},
name: '待激活'
}, {
name: '正常',
itemStyle: { color: "#ff6b6b" },
value: 4
},
{
name: '注销',
itemStyle: { color: "#fbcece" },
value: 2
}]
},
{
name: '广电',
itemStyle: { color: "#006bb3" },
children: [
{ value: 2, itemStyle: { color: "#0f7fcb" }, name: '待激活' },
{
name: '正常',
itemStyle: { color: "#006bb3" },
value: 4
},
{
name: '注销',
itemStyle: { color: "#479ad3" },
value: 2
}]
},
{
name: '国际',
itemStyle: { color: "#53c1a3" },
children: [
{ value: 2, itemStyle: { color: "#6bcfb4" }, name: '待激活' },
{
name: '正常',
itemStyle: { color: "#53c1a3" },
value: 4
},
{
name: '注销',
itemStyle: { color: "#98edd6" },
value: 2
}]
}],
}
};
ECharts分类统计数量
最新推荐文章于 2024-11-12 11:19:19 发布