fix: add missing userTrend/aiCallTrend fields to dashboard stats response
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 7s
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 7s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
b26bcba774
commit
2118adfb66
@ -39,17 +39,17 @@ export default function Dashboard() {
|
||||
const userTrendOption = useMemo(() => ({
|
||||
grid: { top: 20, right: 20, bottom: 20, left: 40 },
|
||||
tooltip: { trigger: 'axis' as const },
|
||||
xAxis: { type: 'category' as const, data: stats?.userTrend.map(p => dayjs(p.date).format('MM-DD')) || [], axisLabel: { fontSize: 11 } },
|
||||
xAxis: { type: 'category' as const, data: stats?.userTrend?.map(p => dayjs(p.date).format('MM-DD')) || [], axisLabel: { fontSize: 11 } },
|
||||
yAxis: { type: 'value' as const, axisLabel: { fontSize: 11 } },
|
||||
series: [{ name: '日活用户', type: 'line', data: stats?.userTrend.map(p => p.value) || [], smooth: true, symbol: 'none', lineStyle: { color: '#1677ff', width: 2 }, areaStyle: { color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: 'rgba(22,119,255,0.15)' }, { offset: 1, color: 'rgba(22,119,255,0)' }]) } }],
|
||||
series: [{ name: '日活用户', type: 'line', data: stats?.userTrend?.map(p => p.value) || [], smooth: true, symbol: 'none', lineStyle: { color: '#1677ff', width: 2 }, areaStyle: { color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: 'rgba(22,119,255,0.15)' }, { offset: 1, color: 'rgba(22,119,255,0)' }]) } }],
|
||||
}), [stats])
|
||||
|
||||
const aiCallTrendOption = useMemo(() => ({
|
||||
grid: { top: 20, right: 20, bottom: 20, left: 40 },
|
||||
tooltip: { trigger: 'axis' as const },
|
||||
xAxis: { type: 'category' as const, data: stats?.aiCallTrend.map(p => dayjs(p.date).format('MM-DD')) || [], axisLabel: { fontSize: 11 } },
|
||||
xAxis: { type: 'category' as const, data: stats?.aiCallTrend?.map(p => dayjs(p.date).format('MM-DD')) || [], axisLabel: { fontSize: 11 } },
|
||||
yAxis: { type: 'value' as const, axisLabel: { fontSize: 11 } },
|
||||
series: [{ name: 'AI 调用', type: 'bar', data: stats?.aiCallTrend.map(p => p.value) || [], itemStyle: { color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: '#52c41a' }, { offset: 1, color: '#b7eb8f' }]), borderRadius: [4, 4, 0, 0] } }],
|
||||
series: [{ name: 'AI 调用', type: 'bar', data: stats?.aiCallTrend?.map(p => p.value) || [], itemStyle: { color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: '#52c41a' }, { offset: 1, color: '#b7eb8f' }]), borderRadius: [4, 4, 0, 0] } }],
|
||||
}), [stats])
|
||||
|
||||
return (
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user