bito-code-review[bot] commented on PR #42882:
URL: https://github.com/apache/superset/pull/42882#issuecomment-5213566626
<!-- Bito Reply -->
The flagged issue is correct. The current implementation uses `numericValue
> 0`, which incorrectly suppresses negative values that should be rendered if
they meet the threshold criteria. To resolve this, the guard should be updated
to exclude only zero (`numericValue !== 0`) while allowing negative values to
be evaluated against the threshold.
Here is the corrected implementation for the logic in
`superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformers.ts`:
```typescript
if (
numericValue !== 0 &&
numericValue >=
(thresholdValues[dataIndex] || Number.MIN_SAFE_INTEGER)
) {
```
I have validated this against the provided diff. Would you like me to check
the other comments on this PR and implement fixes for them as well?
**superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformers.ts**
```
if (
numericValue !== 0 &&
numericValue >=
(thresholdValues[dataIndex] || Number.MIN_SAFE_INTEGER)
) {
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]