diff --git a/src/views/home/components/ChartsPanel.vue b/src/views/home/components/ChartsPanel.vue index d5d094f..50f9925 100644 --- a/src/views/home/components/ChartsPanel.vue +++ b/src/views/home/components/ChartsPanel.vue @@ -77,7 +77,7 @@ function updateBarChart() { })) // 剩余值(9 - 实际值)— 用当前数据的浅色版本 const remainData = props.counts.map((item, idx) => ({ - value: Math.max(0, 9 - item.count), + value: Math.max(0, 10 - item.count), itemStyle: { color: lightenColor(colors[idx % colors.length], 0.7), borderRadius: [4, 4, 0, 0] } })) @@ -88,7 +88,8 @@ function updateBarChart() { formatter(params) { const actual = params.find(p => p.seriesName === '实际值') if (!actual) return '' - return `${actual.name}
${actual.marker} 检测数: ${actual.value}/9` + // return `${actual.name}
${actual.marker} 检测数: ${actual.value}/9` + return `${actual.name}
${actual.marker} 检测数: ${actual.value}` } }, grid: { left: '5%', right: '5%', bottom: '5%', top: '15%', containLabel: true }, @@ -96,7 +97,7 @@ function updateBarChart() { yAxis: { type: 'value', minInterval: 1, - max: 9, + // max: 9, splitLine: { lineStyle: { type: 'dashed', color: '#eee' } } }, series: [ @@ -106,18 +107,18 @@ function updateBarChart() { stack: 'total', barWidth: 22, data: actualData, - markLine: { - silent: true, - symbol: 'none', - lineStyle: { color: '#e6a23c', type: 'dashed', width: 2 }, - label: { - formatter: '上限: 9', - color: '#e6a23c', - fontSize: 12, - position: 'insideEndTop' - }, - data: [{ yAxis: 9 }] - } + // markLine: { + // silent: true, + // symbol: 'none', + // lineStyle: { color: '#e6a23c', type: 'dashed', width: 2 }, + // label: { + // formatter: '上限: 9', + // color: '#e6a23c', + // fontSize: 12, + // position: 'insideEndTop' + // }, + // data: [{ yAxis: 9 }] + // } }, { type: 'bar',