let options = { bar: { tooltip: { trigger: "axis", backgroundColor: "rgba(0,0,0,.6)", borderColor: "rgba(147, 235, 248, .8)", textStyle: { color: "#FFF", }, axisPointer: { type: 'shadow' } }, legend: { data: [ "本月作业", ], orient: 'vertical', x: '175', y: '0', }, grid: { top: 40, left: '3%', right: '4%', bottom: '3%', containLabel: true }, xAxis: { data: ['已完成', '待完成', '异常', '撤销'], axisLine: { lineStyle: { color: "#B4B4B4", }, }, axisTick: { show: false, }, }, yAxis: { splitLine: { show: true }, axisLine: { lineStyle: { color: "#B4B4B4", }, }, axisLabel: { formatter: "{value}", }, } , series: [ { name: "本月作业", type: 'bar', barWidth: 30, itemStyle: { normal: { label: { show: true, //开启显示 position: 'top', //在上方显示 textStyle: { //数值样式 color: '#bdbae2', fontSize: 12 } } } }, data: [2000, 2438, 100, 15], } ] }, pie: { tooltip: { trigger: "item", formatter: "{a}
{b} : {c} ({d}%)" }, legend: { top: 20, // orient: "vertical", // right: 300, // top: 200, // bottom: 20, data: [ "图例1", "图例2", "图例3", "图例4", "图例5", "图例6", "图例7" ] }, series: [ { name: "图例1", type: "pie", radius: ['40%', '70%'], selectedMode: "single", itemStyle: { borderRadius: 6, borderColor: '#fff', borderWidth: 2 }, data: [ { value: 2563, name: "图例1", itemStyle: { color: "rgb(45, 140, 240)" } }, { value: 727, name: "图例2", itemStyle: { color: "rgb(92, 173, 255)" } }, { value: 2182, name: "图例3", itemStyle: { color: "rgb(25, 190, 107)" } }, { value: 1419, name: "图例4", itemStyle: { color: "#00e5ff" } }, { value: 984, name: "图例5", itemStyle: { color: "#ff80ab" } }, { value: 870, name: "图例6", itemStyle: { color: "rgb(237, 64, 20)" } }, { value: 1670, name: "图例7", itemStyle: { color: "#ffb445" } } ] } ] }, line: { legend: { data: ["出库订单", "入库订单"] }, grid: { left: "3%", right: "4%", bottom: "3%", containLabel: true }, toolbox: { feature: { saveAsImage: {} } }, xAxis: { type: "category", boundaryGap: false, data: [ "1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月" ] }, yAxis: { type: "value" }, series: [ { name: "出库订单", type: "line", stack: "总量", itemStyle: { color: "rgb(25, 190, 107)" }, smooth: true, data: [ 7.0, 6.9, 9.5, 12.5, 18.2, 21.5, 22.5, 23.3, 18.3, 13.9, 9.6, 10 ] }, { name: "入库订单", type: "line", stack: "总量", smooth: true, itemStyle: { color: "rgb(92, 173, 255)" }, data: [ 7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 22.5, 21.3, 18.3, 13.9, 9.6 ] } ] }, radar: { tooltip: { trigger: 'axis' }, radar: { indicator: [ { name: '已完成', max: 100, color: '#67C23A' }, { name: '待完成', max: 100, color: '#409EFF' }, { name: '异常', max: 100, color: '#F56C6C' }, { name: '撤销', max: 100, color: '#909399' } ], center: ['50%', '55%'], radius: 80 }, legend: { orient: 'vertical', x: '175', y: '16', }, series: [ { type: 'radar', tooltip: { trigger: 'item' }, areaStyle: {}, data: [{ value: [60, 73, 85, 40], name: '今日作业' }].map(function (item) { return { value: item.value, name: item.name, label: { show: true, formatter: function (params) { return params.value; } } }; }) } ] } } export default options;