|
|
@ -5,6 +5,8 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
import echarts from 'echarts' |
|
|
|
// import theme from './theme.json' |
|
|
|
// echarts.registerTheme('customTheme', theme) |
|
|
|
import resize from '@/views/dashboard/mixins/resize' |
|
|
|
|
|
|
|
export default { |
|
|
@ -73,7 +75,7 @@ export default { |
|
|
|
}, |
|
|
|
drawChart() { |
|
|
|
const chartDom = document.getElementById('maintype') |
|
|
|
this.chart = echarts.init(chartDom) |
|
|
|
this.chart = echarts.init(chartDom, 'light') |
|
|
|
let option = null |
|
|
|
option = { |
|
|
|
tooltip: { |
|
|
@ -103,8 +105,8 @@ export default { |
|
|
|
{ |
|
|
|
name: '档案门类', |
|
|
|
type: 'pie', |
|
|
|
radius: ['30%', '80%'], |
|
|
|
center: ['35%', '40%'], // 饼图位置 |
|
|
|
radius: ['30%', '70%'], |
|
|
|
center: ['35%', '50%'], // 饼图位置 |
|
|
|
roseType: 'area', |
|
|
|
avoidLabelOverlap: true, |
|
|
|
labelLine: { |
|
|
@ -120,15 +122,15 @@ export default { |
|
|
|
formatter: ' {d}%' // 指示线显示百分比 |
|
|
|
}, |
|
|
|
borderColor: '#fff', |
|
|
|
borderWidth: 4, |
|
|
|
color: function(params) { |
|
|
|
var colorItem = ['#0348F3', '#14C9C9', '#F8B722', '#722ED1', '#F4647B'] |
|
|
|
var colorList = [] |
|
|
|
for (var i = 0; i < option.series[0].data.length; i++) { |
|
|
|
colorList.push(colorItem[i % 5]) |
|
|
|
} |
|
|
|
return colorList[params.dataIndex] |
|
|
|
} |
|
|
|
borderWidth: 4 |
|
|
|
// color: function(params) { |
|
|
|
// var colorItem = ['#0348F3', '#14C9C9', '#F8B722', '#722ED1', '#F4647B', '#055BF7', '#0036D6', '#1ECED4', '#0BA8A8', '#FFC833', '#EAB00F', '#8541E0', '#601CC0', '#FF758C', '#E94F67'] |
|
|
|
// var colorList = [] |
|
|
|
// for (var i = 0; i < option.series[0].data.length; i++) { |
|
|
|
// colorList.push(colorItem[i % 5]) |
|
|
|
// } |
|
|
|
// return colorList[params.dataIndex] |
|
|
|
// } |
|
|
|
} |
|
|
|
}, |
|
|
|
emphasis: { |
|
|
|