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