fix legend style for chart

This commit is contained in:
Timi
2026-08-14 11:30:20 +08:00
parent 6f9dcd542d
commit 2362065a2e
3 changed files with 3 additions and 5 deletions
@@ -47,15 +47,14 @@ const chartStyle = computed(() => ({
const chartOption = computed<EChartsOption>(() => ({ const chartOption = computed<EChartsOption>(() => ({
...buildCustomerBaseChartOption(props.dateTextList), ...buildCustomerBaseChartOption(props.dateTextList),
grid: { grid: {
top: Math.max(72, legendBottom.value), top: Math.max(16, legendBottom.value),
left: 12, left: 12,
right: 12, right: 12,
bottom: 12, bottom: 0,
containLabel: true containLabel: true
}, },
legend: { legend: {
top: 0, top: 0,
type: "scroll",
icon: "roundRect", icon: "roundRect",
textStyle: { textStyle: {
color: "#52607a" color: "#52607a"
@@ -61,7 +61,7 @@ const chartOption = computed<EChartsOption>(() => ({
top: Math.max(48, legendBottom.value), top: Math.max(48, legendBottom.value),
left: 12, left: 12,
right: 12, right: 12,
bottom: 12, bottom: 0,
containLabel: true containLabel: true
}, },
series: eventList.value.map(event => ({ series: eventList.value.map(event => ({
@@ -51,7 +51,6 @@ const chartOption = computed<EChartsOption>(() => ({
}, },
legend: { legend: {
top: 0, top: 0,
type: "scroll",
icon: "roundRect", icon: "roundRect",
textStyle: { textStyle: {
color: "#52607a" color: "#52607a"