fix: 多个key问题

This commit is contained in:
Bunny 2025-02-26 22:10:38 +08:00
parent a67a74d33c
commit dad20127a1
1 changed files with 4 additions and 11 deletions

View File

@ -13,7 +13,10 @@ const option = ref<EChartsOption>({
}, },
tooltip: {}, tooltip: {},
legend: { legend: {
data: ['出园', '入园'], data: [
{ name: '出园', icon: 'rect', itemStyle: { color: '#4182FF' } },
{ name: '入园', icon: 'rect', itemStyle: { color: '#00FFFF' } },
],
icon: 'rect', icon: 'rect',
right: 0, right: 0,
top: 0, top: 0,
@ -21,10 +24,6 @@ const option = ref<EChartsOption>({
orient: 'horizontal', orient: 'horizontal',
align: 'left', align: 'left',
textStyle: { fontSize: 14, color: '#fff' }, textStyle: { fontSize: 14, color: '#fff' },
data: [
{ name: '出园', icon: 'rect', itemStyle: { color: '#4182FF' } },
{ name: '入园', icon: 'rect', itemStyle: { color: '#00FFFF' } },
],
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
@ -50,12 +49,6 @@ const option = ref<EChartsOption>({
type: 'line', type: 'line',
data: [3, 9, 2, 8, 3, 4, 8], data: [3, 9, 2, 8, 3, 4, 8],
smooth: true, smooth: true,
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: '#00FFFF' },
{ offset: 1, color: 'rgba(0,255,255,0)' },
]),
},
symbol: 'circle', symbol: 'circle',
symbolSize: 10, symbolSize: 10,
areaStyle: { areaStyle: {