messere1 opened a new issue, #1680: URL: https://github.com/apache/rocketmq-dashboard/issues/1680
### Description The Dashboard throughput sparkline guarantees a minimum 4px height for every value other than exactly zero: ```ts value === 0 ? 0 : Math.max(4, (value / max) * height) ``` A negative sample can occur when a monotonic broker counter resets between collection windows. It is therefore rendered as a visible positive bar instead of no traffic. Non-finite values also poison `Math.max` and produce invalid CSS heights. ### Expected behavior Negative and non-finite throughput samples should be treated as zero. Valid positive samples should retain their current relative heights and minimum visibility. ### Actual behavior Negative samples render as 4px traffic bars, while NaN/Infinity can create invalid bar styles. ### Proposed fix Normalize each sample to a finite non-negative value before computing the maximum, rendering heights, and generating the default accessible label. Add component coverage for negative, NaN, and Infinity samples. -- 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]
