update 修改当前检测数据的图例配置

This commit is contained in:
g7hoo 2022-10-09 16:57:02 +08:00
parent b9ac64ab13
commit 127347fab0

View File

@ -105,17 +105,31 @@ const FakeChart = {
calcMaxHeight, calcMaxHeight,
chart: null, chart: null,
defaultOpts: { defaultOpts: {
grid: {
left: '5%',
right: '12%',
top: '20%',
bottom: '10%'
},
title: { title: {
text: i18n.t('inspect.typeCount') text: i18n.t('inspect.typeCount')
}, },
tooltip: {}, tooltip: {},
legend: { legend: {
orient: 'vertical', orient: 'vertical',
type: 'scroll',
top: 10, top: 10,
right: 20, right: 0,
data: [ width: '12%',
/** dynamic */ /** 修复文本太长时显示问题 */
] formatter: function(name) {
return echarts.format.truncateText(name, 120, '14px Microsoft Yahei', '...')
},
tooltip: {
show: true
},
/** end */
data: []
}, },
xAxis: { xAxis: {
data: [ data: [