|
|
@ -1,7 +1,14 @@ |
|
|
|
<!-- |
|
|
|
* @Author: wally |
|
|
|
* @email: 18603454788@163.com |
|
|
|
* @Date: 2021-01-29 14:45:02 |
|
|
|
* @LastEditors: wally |
|
|
|
* @LastEditTime: 2021-01-29 18:20:26 |
|
|
|
--> |
|
|
|
<template> |
|
|
|
<!-- <div>数据统计组件</div> --> |
|
|
|
<div style="width: 100%; height: 300px" class="chart-box"> |
|
|
|
<div id="Categorymap" style="height: 400px"></div> |
|
|
|
<div style="width: 100%; height: 350px" class="chart-box"> |
|
|
|
<div id="Categorymap" style="height: 350px"></div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<script> |
|
|
@ -43,10 +50,6 @@ export default { |
|
|
|
let myChart = this.$echarts.init(document.getElementById('Categorymap')); |
|
|
|
// 绘制图表 |
|
|
|
var option = { |
|
|
|
title: { |
|
|
|
left: 'center', |
|
|
|
text: '各院病例分析', |
|
|
|
}, |
|
|
|
legend: { |
|
|
|
data: ['未完成', '已完成', '进行中', '废弃'], |
|
|
|
top: 30, |
|
|
@ -67,6 +70,30 @@ export default { |
|
|
|
// label: labelOption, |
|
|
|
emphasis: { focus: 'series' }, |
|
|
|
data: [320, 332, 301, 334], |
|
|
|
barWidth: 20, |
|
|
|
itemStyle: { |
|
|
|
normal: { |
|
|
|
label: { |
|
|
|
formatter: '{c}', |
|
|
|
show: true, |
|
|
|
position: 'top', |
|
|
|
textStyle: { |
|
|
|
fontSize: '12', |
|
|
|
color: '#000', |
|
|
|
}, |
|
|
|
}, |
|
|
|
color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [ |
|
|
|
{ offset: 0, color: '#FCB155' }, //柱图渐变色 |
|
|
|
{ offset: 1, color: '#EC535F' }, //柱图渐变色 |
|
|
|
]), |
|
|
|
}, |
|
|
|
emphasis: { |
|
|
|
color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [ |
|
|
|
{ offset: 0, color: '#FCB155' }, //柱图高亮渐变色 |
|
|
|
{ offset: 1, color: '#EC535F' }, //柱图高亮渐变色 |
|
|
|
]), |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: '已完成', |
|
|
@ -74,6 +101,30 @@ export default { |
|
|
|
// label: labelOption, |
|
|
|
emphasis: { focus: 'series' }, |
|
|
|
data: [220, 182, 191, 234], |
|
|
|
barWidth: 20, |
|
|
|
itemStyle: { |
|
|
|
normal: { |
|
|
|
label: { |
|
|
|
formatter: '{c}', |
|
|
|
show: true, |
|
|
|
position: 'top', |
|
|
|
textStyle: { |
|
|
|
fontSize: '12', |
|
|
|
color: '#000', |
|
|
|
}, |
|
|
|
}, |
|
|
|
color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [ |
|
|
|
{ offset: 0, color: '#6D46FF' }, //柱图渐变色 |
|
|
|
{ offset: 1, color: '#360CE6' }, //柱图渐变色 |
|
|
|
]), |
|
|
|
}, |
|
|
|
emphasis: { |
|
|
|
color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [ |
|
|
|
{ offset: 0, color: '#6D46FF' }, //柱图高亮渐变色 |
|
|
|
{ offset: 1, color: '#360CE6' }, //柱图高亮渐变色 |
|
|
|
]), |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: '进行中', |
|
|
@ -81,6 +132,30 @@ export default { |
|
|
|
// label: labelOption, |
|
|
|
emphasis: { focus: 'series' }, |
|
|
|
data: [150, 232, 201, 154], |
|
|
|
barWidth: 20, |
|
|
|
itemStyle: { |
|
|
|
normal: { |
|
|
|
label: { |
|
|
|
formatter: '{c}', |
|
|
|
show: true, |
|
|
|
position: 'top', |
|
|
|
textStyle: { |
|
|
|
fontSize: '12', |
|
|
|
color: '#000', |
|
|
|
}, |
|
|
|
}, |
|
|
|
color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [ |
|
|
|
{ offset: 0, color: '#96E5F4' }, //柱图渐变色 |
|
|
|
{ offset: 1, color: '#21B0DC' }, //柱图渐变色 |
|
|
|
]), |
|
|
|
}, |
|
|
|
emphasis: { |
|
|
|
color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [ |
|
|
|
{ offset: 0, color: '#96E5F4' }, //柱图高亮渐变色 |
|
|
|
{ offset: 1, color: '#21B0DC' }, //柱图高亮渐变色 |
|
|
|
]), |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: '废弃', |
|
|
@ -88,6 +163,30 @@ export default { |
|
|
|
// label: labelOption, |
|
|
|
emphasis: { focus: 'series' }, |
|
|
|
data: [98, 77, 101, 99], |
|
|
|
barWidth: 20, |
|
|
|
itemStyle: { |
|
|
|
normal: { |
|
|
|
label: { |
|
|
|
formatter: '{c}', |
|
|
|
show: true, |
|
|
|
position: 'top', |
|
|
|
textStyle: { |
|
|
|
fontSize: '12', |
|
|
|
color: '#000', |
|
|
|
}, |
|
|
|
}, |
|
|
|
color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [ |
|
|
|
{ offset: 0, color: '#F5D041' }, //柱图渐变色 |
|
|
|
{ offset: 1, color: '#FF9000' }, //柱图渐变色 |
|
|
|
]), |
|
|
|
}, |
|
|
|
emphasis: { |
|
|
|
color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [ |
|
|
|
{ offset: 0, color: '#F5D041' }, //柱图高亮渐变色 |
|
|
|
{ offset: 1, color: '#FF9000' }, //柱图高亮渐变色 |
|
|
|
]), |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
], |
|
|
|
}; |
|
|
|