var leftChart1 = function(options){ var series0data = options.series[0].data || []; var xAxisData = options.xAxis[0].data; series0data = series0data.map(function(item){ item = (Number(item)/10000).toFixed(2) return item; }) var option = { "title": { "text": "医保支出费用月趋势", "x": "center", "textStyle": { color: ['#b5e1fc'] }, "padding": [15, 0, 0, 0] }, "tooltip": { "trigger": "axis", formatter: function (v) { v = v[0] return v.axisValue+'
医保支出费用:' + '\n' + v.value + '万元' } }, grid: { top: 80, bottom: 30, left: 80 }, "yAxis": [{ "type": "value", "name": "万元", nameTextStyle: { color: '#b5e1fc' // 坐标轴名称颜色 }, axisPointer: { type: 'shadow' }, axisLine: { lineStyle: { color: '#095f8e' } }, axisLabel: { color: '#b5e1fc' }, splitLine: { lineStyle:{ color:'#004b7a' }, show:true // false不显示坐标轴刻度 } }], "xAxis": [{ "type": "category", axisPointer: { type: 'shadow' }, axisTick: { // show: false }, axisLine: { lineStyle: { color: '#004b7a' } }, axisLabel: { color: '#b5e1fc' }, nameTextStyle: { color: '#b5e1fc' }, "data": xAxisData, }], "series": [{ "smooth": true, "name": "万元", "type": "line", barWidth: 20, "label": { show: false, position: "right" }, "itemStyle": { "normal": { "lineStyle": { "shadowColor": "rgba(0,0,0,0.4)" }, barBorderRadius: [0, 8, 8, 0], color: '#03fa6c' } }, "data": series0data }, ] } return option }, leftChart2 = function(options){ var title = options.title.text; var data = options.series[0].data; data = data.map(function(item){ item.value = (Number(item.value)/10000).toFixed(2) return item; }) var legend = data.map(function(item){ return item.name; }) var option = { "title": { "text": title, "x": "center", "textStyle": { color: ['#b5e1fc'] }, "padding": [15, 0, 0, 0] }, "tooltip": { "trigger": "item", formatter: function (v) { return v.name + ':\n' + v.value + '万元' } }, legend: { orient: 'vertical', // x: 'right', data:legend, right: '45%', bottom: '50%', textStyle: { color: ['#b5e1fc'] } }, "series": [{ "center": ["50%", "50%"], "radius": ['45%', '55%'], "name": "万元", "type": "pie", "itemStyle": { "normal": { "label": { "show": false }, "labelLine": { "show": false } } }, "data": data }], color : ["#00e6f3","#ff616f","#ff616f","#0fa5f2","#00e6f3"] } return option }, leftChart3 = function(options){ var title = options.title.text; var xAxisData = options.xAxis[0].data; var series0data = options.series[0].data || []; series0data = series0data.map(function(item){ item = (Number(item)/10000).toFixed(2) return item; }) var option = { "title": { "text": title, "x": "center", textStyle: { color: '#b5e1fc', fontSize: 16, fontWeight: 'bold' }, "padding": [17, 0, 0, 0] }, "tooltip": { "trigger": "axis", formatter: function (v) { v = v[0] return '医保支出费用:' + '\n' + v.value + '万元' } }, "grid": { top: '90', left: '70', bottom:'25', right:'40' }, xAxis: [{ type: 'category', "data": xAxisData, axisPointer: { type: 'shadow' }, axisTick: { show: false }, axisLine: { lineStyle: { color: '#095f8e' } }, axisLabel: { color: '#b5e1fc' } }], yAxis: [{ type: 'value', name: '万元', nameTextStyle: { color: '#b5e1fc' // 坐标轴名称颜色 }, splitLine: { show: false }, axisLine: { lineStyle: { color: '#095f8e' } }, axisLabel: { color: '#b5e1fc' } } ], series: [{ name: '万元', type: 'bar', "data":series0data, barWidth: 20, label: { normal: { show: true, position: 'top', // 在柱状图上方显示 color: '#fff' // 柱状图上方显示的数值颜色 } }, itemStyle: { barBorderRadius: [8, 8, 0, 0], color: '#00e6f3' } } ] } return option }