Compare commits

..

5 Commits

Author SHA1 Message Date
kkfluous
d572ea83bd chore: remove all trend indicators from StatCards
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2026-06-09 13:57:12 +08:00
kkfluous
04b8b8a8da fix: update @babel/core and @babel/parser to 7.29.7 to resolve parser crash
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2026-06-09 13:56:27 +08:00
kkfluous
d6ceec13da Revert "chore: remove all trend indicators from StatCards"
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This reverts commit f258531964.
2026-06-09 13:50:58 +08:00
kkfluous
679ab727f5 Revert "fix: remove unused Cell import from recharts in EfficiencyView"
This reverts commit dccc595eda.
2026-06-09 13:50:58 +08:00
kkfluous
a7a7cef057 Revert "fix: replace Cell from recharts with data-level fill to avoid babel error"
This reverts commit 58637b800b.
2026-06-09 13:50:58 +08:00
4 changed files with 3176 additions and 10 deletions

View File

@@ -13,7 +13,7 @@
"dependencies": {
"@google/genai": "^1.29.0",
"@tailwindcss/vite": "^4.1.14",
"@vitejs/plugin-react": "^5.0.4",
"@vitejs/plugin-react": "^5.2.0",
"clsx": "^2.1.1",
"dotenv": "^17.2.3",
"express": "^4.21.2",

3162
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
import React from 'react';
import { AreaChart, Area, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer, BarChart, Bar, Legend } from 'recharts';
import { AreaChart, Area, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer, BarChart, Bar, Legend, Cell } from 'recharts';
import { StatCard } from '../ui/StatCard';
import { Activity, Target, TrendingUp, Zap, Clock, Radio, AlertCircle } from 'lucide-react';

View File

@@ -1,5 +1,5 @@
import React from 'react';
import { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer, Legend, BarChart, Bar } from 'recharts';
import { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer, Legend, BarChart, Bar, Cell } from 'recharts';
import { StatCard } from '../ui/StatCard';
import { Users, Truck, Smartphone } from 'lucide-react';
@@ -16,12 +16,12 @@ const driverGrowth = [
];
const driverByStation = [
{ name: '嘉兴嘉锦', value: 10, fill: '#f59e0b' },
{ name: '嘉兴嘉燃', value: 8, fill: '#94a3b8' },
{ name: '嘉燃经开', value: 5, fill: '#94a3b8' },
{ name: '如皋华神', value: 3, fill: '#94a3b8' },
{ name: '桐乡绿能', value: 2, fill: '#94a3b8' },
{ name: '花桥/嘉善等', value: 2, fill: '#94a3b8' },
{ name: '嘉兴嘉锦', value: 10 },
{ name: '嘉兴嘉燃', value: 8 },
{ name: '嘉燃经开', value: 5 },
{ name: '如皋华神', value: 3 },
{ name: '桐乡绿能', value: 2 },
{ name: '花桥/嘉善等', value: 2 },
];
export function UsersView() {
@@ -87,7 +87,11 @@ export function UsersView() {
<XAxis type="number" hide />
<YAxis dataKey="name" type="category" axisLine={false} tickLine={false} tick={{fill: '#475569', fontSize: 12, fontWeight: 500}} width={80} />
<Tooltip cursor={{fill: '#f8fafc'}} contentStyle={{ borderRadius: '12px', border: '1px solid #e2e8f0' }}/>
<Bar dataKey="value" radius={[0, 6, 6, 0]} barSize={28} />
<Bar dataKey="value" radius={[0, 6, 6, 0]} barSize={28}>
{driverByStation.map((entry, index) => (
<Cell key={`cell-${index}`} fill={index === 0 ? '#f59e0b' : '#94a3b8'} />
))}
</Bar>
</BarChart>
</ResponsiveContainer>
</div>