toastr.options = { "closeButton": true, "positionClass": "toast-top-center", "preventDuplicates": true } new Vue({ el: '#main', data: { leftChart1:null, city:'贵港市', town: [ { "townName": "港北区", "result": "26531" }, { "townName": "港南区", "result": "25634" }, { "townName": "覃塘区", "result": "12587" }, { "townName": "平南县", "result": "74128" }, { "townName": "桂平市", "result": "113485" } ], }, mounted: function() { }, methods: { setCity(item){ this.city = item.townName } } }); //高发疾病 var gaoFaChart = echarts.init(document.getElementById('div-gaofa-disease-chart')); var gaofaOption = { "tooltip": { "trigger": "axis" }, grid: {top: 40, bottom: 30, left: 80}, "yAxis": [{ "type": "category", "name": "人次", "data": [ "大肠杆菌性肠炎", "感染性腹泻", "胃肠炎", "糖尿病", "高血压病", "脑结核瘤", "骨结核", "肾结核", "心脏病", "急性脑膜炎球菌血症" ], axisPointer: { type: 'shadow' }, axisTick: { show: false }, axisLine: { lineStyle: { color: '#095f8e' } }, axisLabel: { color: '#b5e1fc' }, nameTextStyle:{color: '#b5e1fc'} }], "xAxis": [{ "type": "value", axisPointer: { type: 'shadow' }, axisTick: { show: false }, axisLine: { lineStyle: { color: '#095f8e' } }, axisLabel: { color: '#fff' }, splitLine: { show: false // 不显示坐标轴刻度 } }], "series": [{ "smooth": true, "name": "门急诊疾病情况", "type": "bar", stack: '广告', barWidth: 20, "label": { show: false, position: "right" }, "itemStyle": { "normal": { "lineStyle": { "shadowColor": "rgba(0,0,0,0.4)" }, color: '#6576e0' } }, "data": [ "100", "2435", "1102", "544", "520", "446", "408", "315", "225", "101" ] }, { "smooth": true, "name": "住院疾病情况", "type": "bar", stack: '广告', "label": { show: true, position: "right" }, "itemStyle": { "normal": { "lineStyle": { "shadowColor": "rgba(0,0,0,0.4)" }, barBorderRadius: [0, 8, 8, 0], color: '#00e6f3' } }, "data": [ "200", "3435", "1302", "684", "600", "546", "521", "463", "325", "301" ] } ] } gaoFaChart.setOption(gaofaOption); //死亡率 var myChart = echarts.init(document.getElementById('div-shiwang-echart')); var option = { // "title": { // "text": "性别分布", // "subtext": "性别分布", // "x": "center" // }, "tooltip": { "trigger": "item" }, "series": [{ "center": [ "50%", "50%" ], radius: ['50%', '70%'], "name": "", "type": "pie", "itemStyle": { "normal": { "label": { "show": false }, "labelLine": { "show": false } } }, "data": [{ "name": "恶性肿瘤", "value": "21365" }, { "name": "脑血管疾病", "value": "188524" }, { "name": "心脏病", "value": "14578" }, { "name": "呼吸系统疾病", "value": "12635" }, { "name": "损伤和中毒", "value": "15503" }, { "name": "消化系统疾病", "value": "45621" }, { "name": "内分泌、营养和代谢疾病", "value": "63215" }, { "name": "必尿生殖系统疾病", "value": "32542" }, { "name": "其他疾病", "value": "84523" } ] }] } myChart.setOption(option); //重点人群 var zhongdianChart = echarts.init(document.getElementById('div-zhongidan-echart')); var zhongdianOption = { tooltip: { trigger: 'axis', axisPointer: { type: 'item', crossStyle: { color: '#fff' } } }, grid: {top: 50, bottom: 30, left: 30,right:80}, legend: { data:['平均床日数','环比'], textStyle: { color: '#b5e1fc' } }, xAxis: [ { type: 'category', data: ['1月','2月','3月','4月','5月','6月'], axisPointer: { type: 'shadow' }, axisTick: { show: false }, axisLine: { lineStyle: { color: '#095f8e' } }, axisLabel: { color: '#b5e1fc' } } ], yAxis: [ { type: 'value', name: '平均床日数', min: 0, max: 250, nameTextStyle: { color: '#b5e1fc' // 坐标轴名称颜色 }, splitLine: { show: false }, axisLine: { lineStyle: { color: '#095f8e' } }, axisLabel: { color: '#b5e1fc' } }, { type: 'value', name: '环比', min: 0, max: 4, nameTextStyle: { color: '#b5e1fc' // 坐标轴名称颜色 }, splitLine: { show: false // 不显示坐标轴刻度 }, axisLine: { lineStyle: { color: '#095f8e' // 坐标轴轴线颜色 } }, axisLabel: { color: '#b5e1fc' // 坐标轴刻度标签文本颜色 }, show: false } ], series: [ { name:'平均床日数', type:'bar', data:[2.0, 4.9, 7.0, 23.2, 25.6, 76.7], barWidth: 20, label: { normal: { show: true, position: 'top', // 在柱状图上方显示 color: '#fff' // 柱状图上方显示的数值颜色 } }, itemStyle: { barBorderRadius: [8,8,0,0], color: '#00e6f3' } }, { name:'环比', type:'line', yAxisIndex: 1, data:[2.0, 1, 3.3, 2,1.5, 3], itemStyle: { color: '#03fa6d' } } ] }; zhongdianChart.setOption(zhongdianOption);