feat(web): user memory

This commit is contained in:
zhaoying
2026-01-12 14:42:02 +08:00
parent 24ace52e27
commit d56cbed0bf
14 changed files with 648 additions and 223 deletions

View File

@@ -1,7 +1,6 @@
import { type FC, useRef } from 'react'
import { useTranslation } from 'react-i18next'
import ReactEcharts from 'echarts-for-react';
import * as echarts from 'echarts';
import Empty from '@/components/Empty'
import Loading from '@/components/Empty/Loading'
import type { Emotion } from './GraphDetail'
@@ -100,10 +99,7 @@ const EmotionLine: FC<EmotionLineProps> = ({ chartData, loading }) => {
},
xAxis: {
type: 'category',
data: [...new Set(chartData.map(item => item.created_at))].sort().map(time => {
const date = new Date(time)
return `${date.getFullYear()}.${String(date.getMonth() + 1).padStart(2, '0')}`
}),
data: [...new Set(chartData.map(item => item.created_at))].sort(),
boundaryGap: false,
axisLabel: {
color: '#A8A9AA',