diff --git a/frontend/src/views/Finance.vue b/frontend/src/views/Finance.vue
index c2c1153..3445f3b 100644
--- a/frontend/src/views/Finance.vue
+++ b/frontend/src/views/Finance.vue
@@ -572,31 +572,37 @@ function renderTrendChart() {
trendChart ??= echarts.init(trendChartRef.value)
const labels = summary.value.chart.labels.map(label => label.slice(5))
trendChart.setOption({
- color: ['#1f9d7a', '#d97706'],
- grid: { left: 12, right: 18, top: 24, bottom: 12, containLabel: true },
+ color: ['#22a884', '#f08a05'],
+ grid: { left: 10, right: 18, top: 28, bottom: 10, containLabel: true },
tooltip: {
trigger: 'axis',
+ backgroundColor: '#ffffff',
+ borderColor: '#dbe4ef',
+ borderWidth: 1,
+ textStyle: { color: '#142033', fontSize: 12 },
valueFormatter: (value: number) => formatAmount(value),
},
legend: {
top: 0,
right: 0,
icon: 'circle',
- textStyle: { color: '#64748b', fontSize: 12 },
+ itemWidth: 9,
+ itemHeight: 9,
+ textStyle: { color: '#65758b', fontSize: 12, fontWeight: 600 },
data: ['收入', '消费'],
},
xAxis: {
type: 'category',
boundaryGap: false,
data: labels,
- axisLine: { lineStyle: { color: '#e2e8f0' } },
+ axisLine: { lineStyle: { color: '#e8eef6' } },
axisTick: { show: false },
- axisLabel: { color: '#64748b' },
+ axisLabel: { color: '#73839a', fontSize: 12 },
},
yAxis: {
type: 'value',
- axisLabel: { color: '#64748b', formatter: (value: number) => `$${value}` },
- splitLine: { lineStyle: { color: '#eef2f7' } },
+ axisLabel: { color: '#73839a', fontSize: 12, formatter: (value: number) => `$${value}` },
+ splitLine: { lineStyle: { color: '#edf2f7' } },
},
series: [
{
@@ -605,7 +611,7 @@ function renderTrendChart() {
smooth: true,
symbolSize: 7,
data: summary.value.chart.revenue,
- areaStyle: { color: 'rgba(31, 157, 122, 0.12)' },
+ areaStyle: { color: 'rgba(34, 168, 132, 0.12)' },
lineStyle: { width: 3 },
},
{
@@ -614,7 +620,7 @@ function renderTrendChart() {
smooth: true,
symbolSize: 7,
data: summary.value.chart.cost,
- areaStyle: { color: 'rgba(217, 119, 6, 0.12)' },
+ areaStyle: { color: 'rgba(240, 138, 5, 0.11)' },
lineStyle: { width: 3 },
},
],
@@ -628,29 +634,42 @@ function renderShareChart() {
.filter(item => item.amount > 0)
.map(item => ({ name: item.name, value: Number(item.amount.toFixed(6)) }))
shareChart.setOption({
- color: ['#1f9d7a', '#2563eb', '#d97706', '#9333ea', '#dc2626', '#0891b2'],
+ color: ['#22a884', '#2f69e8', '#e87d04', '#9b42e8', '#dc4b4b', '#0b9bb0'],
tooltip: {
trigger: 'item',
+ backgroundColor: '#ffffff',
+ borderColor: '#dbe4ef',
+ borderWidth: 1,
+ textStyle: { color: '#142033', fontSize: 12 },
formatter: (params: any) => `${params.name}
${formatAmount(params.value)} (${params.percent}%)`,
},
legend: {
bottom: 0,
type: 'scroll',
icon: 'circle',
- textStyle: { color: '#64748b', fontSize: 12 },
+ itemWidth: 9,
+ itemHeight: 9,
+ textStyle: { color: '#65758b', fontSize: 12, fontWeight: 600 },
},
series: [
{
name: '上游消费',
type: 'pie',
- radius: ['54%', '74%'],
- center: ['50%', '43%'],
+ radius: ['52%', '72%'],
+ center: ['50%', '42%'],
avoidLabelOverlap: true,
minAngle: 4,
label: {
- color: '#334155',
+ color: '#536276',
+ fontSize: 12,
+ fontWeight: 600,
formatter: '{b}\n{d}%',
},
+ labelLine: {
+ length: 16,
+ length2: 18,
+ lineStyle: { width: 1.4 },
+ },
itemStyle: {
borderColor: '#fff',
borderWidth: 3,
@@ -753,17 +772,18 @@ onBeforeUnmount(() => {