From 10456dcfadba3edfc07e42995835fdd7ee837d0d Mon Sep 17 00:00:00 2001 From: JavaZero <71128095+JavaZeroo@users.noreply.github.com> Date: Tue, 19 Aug 2025 19:36:49 +0800 Subject: [PATCH] feat: support step keyword alignment --- src/App.jsx | 40 ++++- src/components/ChartContainer.jsx | 139 ++++++++++++------ .../__tests__/ChartContainer.test.jsx | 31 ++++ 3 files changed, 167 insertions(+), 43 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index fce2a15..53c9a07 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -40,6 +40,8 @@ function App() { const [xRange, setXRange] = useState({ min: undefined, max: undefined }); const [maxStep, setMaxStep] = useState(0); const [sidebarVisible, setSidebarVisible] = useState(true); + const [alignSteps, setAlignSteps] = useState(false); + const [stepKeyword, setStepKeyword] = useState('step:'); const handleFilesUploaded = useCallback((files) => { const filesWithDefaults = files.map(file => ({ @@ -340,12 +342,44 @@ function App() {
上传文件后自动展示所有已配置的指标图表