diff --git a/src/views/QualityManager/components/charts/TechyBar.vue b/src/views/QualityManager/components/charts/TechyBar.vue index 09c043c..8884863 100644 --- a/src/views/QualityManager/components/charts/TechyBar.vue +++ b/src/views/QualityManager/components/charts/TechyBar.vue @@ -162,6 +162,29 @@ export default { top: 72, bottom: 28 }, + tooltip: { + show: true, + trigger: 'axis', + axisPointer: { + type: 'shadow' + }, + padding: 10, + extraCssText: 'width: 128px !important; height: auto !important;', + formatter: params => { + const [, a, , , b] = params + return `
+

${a.name}

+
+ + ${a.seriesName}: ${a.data} +
+
+ + ${b.seriesName}: ${b.data} +
+
` + } + }, xAxis: { type: 'category', axisTick: { @@ -176,20 +199,20 @@ export default { color: '#fff8', fontSize: 12 }, - data: ['脏污', '破片', '崩边', '崩孔', '划擦伤', '其他'], - axisPointer: { - show: true, - type: 'shadow', - label: { - show: true, - formatter: params => { - let info_arr = params.seriesData.filter(item => item.seriesType === 'bar') - let v = [`<${info_arr[0].name}>详细数据: \n`] - info_arr.map(item => { v.push(`${item.seriesName}: ${item.data}`) }) - return v.join('\n') - } - } - } + data: ['脏污', '破片', '崩边', '崩孔', '划擦伤', '其他'] + // axisPointer: { + // show: true, + // type: 'shadow', + // label: { + // show: true, + // formatter: params => { + // let info_arr = params.seriesData.filter(item => item.seriesType === 'bar') + // let v = [`<${info_arr[0].name}>详细数据: \n`] + // info_arr.map(item => { v.push(`${item.seriesName}: ${item.data}`) }) + // return v.join('\n') + // } + // } + // } }, yAxis: { type: 'value', diff --git a/src/views/QualityManager/components/charts/newLineStack.vue b/src/views/QualityManager/components/charts/newLineStack.vue index 567b187..3fe64a0 100644 --- a/src/views/QualityManager/components/charts/newLineStack.vue +++ b/src/views/QualityManager/components/charts/newLineStack.vue @@ -34,7 +34,7 @@ class ChartOption { trigger: 'axis', extraCssText: 'width: 180px !important; ', axisPointer: { - type: 'cross', + type: 'line', label: { backgroundColor: '#6a7985' }