option = { color: ['#EAEA26', '#906BF9', '#FE5656', '#01E17E', '#3DD1F9', '#FFAD05'], title: { text: '园区企业注册区分布', textStyle: { fontSize: 14, }, top: '0', // 设置标题位于图表的顶部 }, tooltip: { trigger: 'item', }, label: { show: true, position: 'outside', // formatter: '{b}: {c}', // 标签内容,{b} 表示数据项名称,{c} 表示数据项值 // formatter: function (param) { // // console.log(param) // let style = '' // switch (param.name) { // } // return ( // param.name + '\n\n' + '{' + style + param.value + 'unit' + ' | ' + param.percent + '%}' // ) // }, lineStyle: { length: 10, // 连线长度 }, }, series: [ { name: '主要商品月度货值趋势', type: 'pie', radius: [30, 160], center: ['50%', '50%'], roseType: 'area', // itemStyle: { // normal: { // color: function (params) { // const colorList = [ // { // c1: '#c5223b', // c2: '#fa768a', // }, // { // c1: ' #de7110', // c2: '#fecd70', // }, // { // c1: '#d09f08', // c2: '#FFD145', // }, // { // c1: '#238483', // c2: '#55C27C', // }, // { // c1: ' #45EAFF', // c2: '#40ADAC', // }, // { // c1: '#12B3F8', // c2: '#7DE8FF', // }, // { // c1: ' #0176D3', // c2: '#13B7FF', // }, // { // c1: '#015BD3', // c2: '#138DFF', // }, // { // c1: ' #7c94e7', // c2: '#1e2783', // }, // ] // return new $echarts.graphic.LinearGradient(1, 0, 0, 0, [ // { // offset: 0, // color: colorList[params.dataIndex].c1, // }, // { // offset: 1, // color: colorList[params.dataIndex].c2, // }, // ]) // }, // }, // }, data: [ { value: 40, name: 'rose 1' }, { value: 38, name: 'rose 2' }, { value: 32, name: 'rose 3' }, { value: 30, name: 'rose 4' }, { value: 28, name: 'rose 5' }, { value: 26, name: 'rose 6' }, { value: 22, name: 'rose 7' }, { value: 18, name: 'rose 8' }, ], }, ], /* graphic: [ { type: 'text', left: '50%', // 与 center 的横坐标对应 top: '50%', // 与 center 的纵坐标对应 /!* left: 'center', top: 'center', *!/ style: { text: props.curYear, fontSize: 16, fontWeight: 'bold', }, z: 10, // 设置 z 值,确保在饼图之上 }, ], */ }