feat:完善功能
This commit is contained in:
@@ -32,13 +32,17 @@
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
label: {
|
||||
type: String,
|
||||
default: () => ''
|
||||
},
|
||||
total: {
|
||||
type: Number,
|
||||
default: () => 0
|
||||
}
|
||||
})
|
||||
|
||||
const { id, chart, setOption, initChart } = useEchart()
|
||||
const { id, setOption } = useEchart()
|
||||
|
||||
var colorList = ['#FDC40A', '#FF5232', '#50F0A6', '#5FDFFA']
|
||||
|
||||
@@ -46,14 +50,14 @@
|
||||
color: colorList,
|
||||
legend: {
|
||||
orient: 'vertical',
|
||||
bottom: 'center',
|
||||
left: '70%',
|
||||
itemWidth: fitChartSize(20),
|
||||
itemHeight: fitChartSize(20),
|
||||
itemGap: fitChartSize(20),
|
||||
x: '64%',
|
||||
y: 'center',
|
||||
itemWidth: fitChartSize(12),
|
||||
itemHeight: fitChartSize(12),
|
||||
itemGap: fitChartSize(10),
|
||||
textStyle: {
|
||||
color: '#ffffff',
|
||||
fontSize: fitChartSize(20)
|
||||
fontSize: fitChartSize(14)
|
||||
}
|
||||
},
|
||||
series: [
|
||||
@@ -69,8 +73,8 @@
|
||||
show: true,
|
||||
position: 'center',
|
||||
fontWeight: 'bold',
|
||||
formatter: function (o) {
|
||||
return `{value|123456}` + '\n' + `{name|舆情总数 }`
|
||||
formatter: () => {
|
||||
return `{value|${props.total}}` + '\n' + `{name|${props.label} }`
|
||||
},
|
||||
rich: {
|
||||
value: {
|
||||
|
||||
Reference in New Issue
Block a user