From 64c4a0324137a6d0600dac01d47b8aca1c6d5d6f Mon Sep 17 00:00:00 2001 From: cheney Date: Sun, 5 Apr 2026 07:11:25 +0800 Subject: [PATCH] LPR --- pages/data.js | 134 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 130 insertions(+), 4 deletions(-) diff --git a/pages/data.js b/pages/data.js index a7c4532..7761cdf 100644 --- a/pages/data.js +++ b/pages/data.js @@ -4,7 +4,7 @@ import Navbar from '../components/Navbar' import Footer from '../components/Footer' import { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend, ResponsiveContainer } from 'recharts' -const bondData = [ +const chinaBondData = [ { month: '2024-01', oneYear: 1.85, fiveYear: 2.45, tenYear: 2.65 }, { month: '2024-02', oneYear: 1.82, fiveYear: 2.42, tenYear: 2.62 }, { month: '2024-03', oneYear: 1.78, fiveYear: 2.38, tenYear: 2.58 }, @@ -19,6 +19,36 @@ const bondData = [ { month: '2024-12', oneYear: 1.48, fiveYear: 2.08, tenYear: 2.28 } ] +const usBondData = [ + { month: '2024-01', oneYear: 4.85, fiveYear: 4.25, tenYear: 3.95 }, + { month: '2024-02', oneYear: 4.82, fiveYear: 4.22, tenYear: 3.92 }, + { month: '2024-03', oneYear: 4.78, fiveYear: 4.18, tenYear: 3.88 }, + { month: '2024-04', oneYear: 4.65, fiveYear: 4.05, tenYear: 3.75 }, + { month: '2024-05', oneYear: 4.55, fiveYear: 3.95, tenYear: 3.65 }, + { month: '2024-06', oneYear: 4.45, fiveYear: 3.85, tenYear: 3.55 }, + { month: '2024-07', oneYear: 4.35, fiveYear: 3.75, tenYear: 3.45 }, + { month: '2024-08', oneYear: 4.25, fiveYear: 3.65, tenYear: 3.35 }, + { month: '2024-09', oneYear: 4.15, fiveYear: 3.55, tenYear: 3.25 }, + { month: '2024-10', oneYear: 4.05, fiveYear: 3.45, tenYear: 3.15 }, + { month: '2024-11', oneYear: 3.95, fiveYear: 3.35, tenYear: 3.05 }, + { month: '2024-12', oneYear: 3.85, fiveYear: 3.25, tenYear: 2.95 } +] + +const chinaLPRData = [ + { month: '2024-01', oneYear: 3.45, fiveYear: 3.95 }, + { month: '2024-02', oneYear: 3.45, fiveYear: 3.95 }, + { month: '2024-03', oneYear: 3.45, fiveYear: 3.95 }, + { month: '2024-04', oneYear: 3.40, fiveYear: 3.90 }, + { month: '2024-05', oneYear: 3.40, fiveYear: 3.90 }, + { month: '2024-06', oneYear: 3.40, fiveYear: 3.90 }, + { month: '2024-07', oneYear: 3.35, fiveYear: 3.85 }, + { month: '2024-08', oneYear: 3.35, fiveYear: 3.85 }, + { month: '2024-09', oneYear: 3.35, fiveYear: 3.85 }, + { month: '2024-10', oneYear: 3.30, fiveYear: 3.80 }, + { month: '2024-11', oneYear: 3.30, fiveYear: 3.80 }, + { month: '2024-12', oneYear: 3.30, fiveYear: 3.80 } +] + export default function Data() { const [selectedIndicator, setSelectedIndicator] = useState('bond-china-treasury') @@ -26,7 +56,14 @@ export default function Data() { { group: '债券', items: [ - { id: 'bond-china-treasury', name: '中国国债' } + { id: 'bond-china-treasury', name: '中国国债' }, + { id: 'bond-us-treasury', name: '美国国债' } + ] + }, + { + group: '贷款', + items: [ + { id: 'loan-china-lpr', name: '中国LPR' } ] } ] @@ -77,7 +114,7 @@ export default function Data() {
- + @@ -102,7 +139,7 @@ export default function Data() { - {bondData.map((row, index) => ( + {chinaBondData.map((row, index) => ( {row.month} {row.oneYear.toFixed(2)} @@ -115,6 +152,95 @@ export default function Data() {
)} + + {selectedIndicator === 'bond-us-treasury' && ( +
+

美国国债收益率走势

+

展示一年期、五年期、十年期国债收益率的变化趋势

+ +
+ + + + + + + + + + + + +
+ +
+

详细数据

+ + + + + + + + + + + {usBondData.map((row, index) => ( + + + + + + + ))} + +
月份一年期(%)五年期(%)十年期(%)
{row.month}{row.oneYear.toFixed(2)}{row.fiveYear.toFixed(2)}{row.tenYear.toFixed(2)}
+
+
+ )} + + {selectedIndicator === 'loan-china-lpr' && ( +
+

中国LPR走势

+

展示一年期和五年期贷款市场报价利率(LPR)的变化趋势

+ +
+ + + + + + + + + + + +
+ +
+

详细数据

+ + + + + + + + + + {chinaLPRData.map((row, index) => ( + + + + + + ))} + +
月份一年期LPR(%)五年期LPR(%)
{row.month}{row.oneYear.toFixed(2)}{row.fiveYear.toFixed(2)}
+
+
+ )}