option = {
// 控制提示
tooltip: {
// 非轴图形,使用item的意思是放到数据对应图形上触发提示
trigger: 'item',
// 格式化提示内容:
// a 代表图表名称 b 代表数据名称 c 代表数据 d代表 当前数据/总数据的比例
formatter: "{a} <br/>{b} : {c} ({d}%)"
},
// 控制图表
series: [
{
// 图表名称
name: '退菜排行TOP10',
// 图表类型
type: 'pie',
// 南丁格尔玫瑰图 有两个圆 内圆半径10% 外圆半径70%
// 百分比基于 图表DOM容器的半径
radius: ['10%', '70%'],
// 图表中心位置 left 50% top 50% 距离图表DOM容器
center: ['50%', '50%'],
// 半径模式,另外一种是 area 面积模式
roseType: 'radius',
data: pieData,
//文字调整
label: {
fontSize: 10
},
//引导线
labelLine: {
length: 8,
length2: 10
},
emphasis: {
itemStyle: {
shadowBlur: 20,
shadowOffsetX: 0,
shadowColor: 'rgba(51, 191, 111, 0.5)',//边框阴影
borderColor: "#fff",//边框颜色
}
}
}
],
// color: ['#006cff', '#60cda0', '#ed8884', '#ff9f7f', '#0096ff', '#9fe6b8', '#32c5e9', '#1d9dff']
// color:["#FF6384","#36A2EB","#FFCE56","#00FF00","#D2691E","#00FFFF","#FF00FF","#0096ff","#1d9dff","#ed8884"]
};