From 0883cb8df5a89de514ded6301bc6b2fb8c8ca46a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=A5=E6=B5=A9?= Date: Tue, 10 Jun 2025 00:44:57 +0800 Subject: [PATCH] fix: update layout titles to object format for consistency --- .../iframe-page-comps/Iframe-PlotlyJs-Comp.vue | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/iframe-page-comps/Iframe-PlotlyJs-Comp.vue b/src/components/iframe-page-comps/Iframe-PlotlyJs-Comp.vue index 71d67d9..0ec75cb 100644 --- a/src/components/iframe-page-comps/Iframe-PlotlyJs-Comp.vue +++ b/src/components/iframe-page-comps/Iframe-PlotlyJs-Comp.vue @@ -18,32 +18,32 @@ const readyPromise = new Promise((resolve) => { }); const 频谱瀑布图Layout = { - title: '频谱瀑布图', + title: { text: '频谱瀑布图' }, xaxis: { - title: '频率 (Hz)', + title: { text: '频率 (Hz)' }, // range: [0, 22_050], showgrid: false, tickformat: ',d', // 设置为带逗号的整数格式 (推荐,更易读) }, yaxis: { - title: '时间步', + title: { text: '时间步' }, showgrid: false, tickformat: ',d', // 设置为带逗号的整数格式 (推荐,更易读) }, margin: { l: 60, r: 40, b: 40, t: 60 }, -}; +} satisfies Partial; const 频谱图Layout = { - title: '频谱图', + title: { text: '频谱图' }, xaxis: { - title: '频率 (Hz)', + title: { text: '频率 (Hz)' }, // range: [0, 22_050], showgrid: true, gridcolor: '#eee', tickformat: ',d', // 设置为带逗号的整数格式 (推荐,更易读) }, yaxis: { - title: '幅度 (dB)', + title: { text: '幅度 (dB)' }, showgrid: true, // 显示网格线 gridcolor: '#eee', tickformat: ',d', // 设置为带逗号的整数格式 (推荐,更易读)