fix overlap of legend.

This commit is contained in:
liangping 2022-03-12 20:12:42 +08:00
parent e5e296fe99
commit 3aa8c63fe4

View File

@ -73,25 +73,19 @@ export default {
return { return {
title: { title: {
text: '', text: '',
left: '5%',
top: '3%',
}, },
legend: { legend: {
right: '10%', scroll: 'scroll',
top: '3%',
data: assets, data: assets,
textStyle: { textStyle: {
color: '#aaa', color: '#aaa',
}, },
top: 'top',
}, },
grid: { top: `${assets.length > 30 ? 30 : assets.length + 20}%` }, // */
xAxis: { xAxis: {
name: 'Qty', name: 'Qty',
nameLocation: 'center', nameLocation: 'center',
splitLine: {
lineStyle: {
type: 'dashed',
},
},
axisLabel: { axisLabel: {
show: false, show: false,
formatter(param) { formatter(param) {
@ -108,41 +102,9 @@ export default {
return formatNumber(param, true, 0) return formatNumber(param, true, 0)
}, },
}, },
splitLine: {
lineStyle: {
type: 'dashed',
},
},
scale: true, scale: true,
}, },
series, series,
// series: [
// {
// name: '',
// data: this.items.filter(x => x[1] > 0),
// type: 'scatter',
// symbolSize(data) {
// const r = Math.log10(data[2])
// return r * 5
// },
// emphasis: {
// focus: 'series',
// label: {
// show: true,
// formatter(param) {
// return `${param.data[3]}, ${formatNumber(param.data[2], true, 0)}`
// },
// position: 'top',
// },
// },
// itemStyle: {
// shadowBlur: 10,
// shadowColor: 'rgba(120, 36, 50, 0.5)',
// shadowOffsetY: 5,
// color: '#28c76f',
// },
// },
// ],
} }
}, },
}, },
@ -151,7 +113,7 @@ export default {
<style scoped> <style scoped>
.chart { .chart {
height: 300px; min-height: 300px;
width: 100%; width: 100%;
} }
</style> </style>