zmuxuny opened a new pull request, #6755: URL: https://github.com/apache/rocketmq-dashboard/pull/6755
### Which Issue(s) This PR Fixes Fixes #6748 ### Brief Description The shared two-decimal formatter turned small nonzero metrics into zero in axes, legends and details. Keep ordinary values compact, use meaningful significant digits for small values (scientific notation for very small magnitudes), and increase axis precision only when distinct ticks would otherwise collide. Browser number locale and ordinary grouping remain intact; negative zero is displayed as zero. ### How Did You Test This Change? - Baseline a92c2314 regression: samples 0.001 and 0.004 produced three axis labels all reading 0 and a 0 messages/s legend. - `cd web && npx vitest run src/components/__tests__/MetricsExplorer.test.tsx --maxWorkers=1`: 58/58 pass, independently run. - New cases cover positive/negative small values, true zero/negative zero, 1e-30, narrow-range distinct ticks, ordinary grouping/rounding, browser locale, legends and details. - Changed-file ESLint, formatting and `git diff --check`: pass. - `NODE_OPTIONS=--max-old-space-size=1536 npm run build`: pass including TypeScript and license check (132 components,139 license files). An initial uncapped Vite process was killed with exit137 in the shared environment; bounded serial retry succeeded, max child RSS about1.18GiB. - Node24.19.0. Full frontend suite and Java tests not run locally. ### Checklist - [x] One coherent numeric display fix - [x] Conventional Commit subject - [x] Regression tests added - [x] No dependencies, new UI strings or new source files AI-assisted implementation/tests, independently reviewed and verified. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
