codeant-ai-for-open-source[bot] commented on code in PR #43515:
URL: https://github.com/apache/superset/pull/43515#discussion_r3852797596
##########
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts:
##########
@@ -1279,11 +1297,12 @@ export default function transformProps(
},
minorTick: { show: minorTicks },
minInterval:
- xAxisType === AxisType.Time && resolvedTimeGrain && !forceMaxInterval
+ parsedXAxisMinInterval ??
+ (xAxisType === AxisType.Time && resolvedTimeGrain && !forceMaxInterval
? (TIMEGRAIN_TO_TIMESTAMP[
resolvedTimeGrain as keyof typeof TIMEGRAIN_TO_TIMESTAMP
] ?? 0)
- : 0,
+ : 0),
Review Comment:
**Suggestion:** Horizontal bar charts do not swap the configured intervals
before building the physical axes. With `xAxisMinInterval` set to `86400000`
and `yAxisMinInterval` set to `1`, this assigns `86400000` to the rendered
X/value axis and `1` to the rendered Y/category axis, contrary to the
control-panel semantics and the added horizontal-bar test. Select the interval
according to `isHorizontal` when assigning each axis. [logic error]
<details>
<summary><b>Severity Level:</b> Major ⚠️</summary>
```mdx
- ❌ Horizontal bar charts apply minimum tick spacing to opposite axes.
- ⚠️ User-configured value-axis tick granularity is ineffective.
- ⚠️ Category-axis settings may receive inappropriate intervals.
```
</details>
[](https://docs.codeant.ai/cli/resolve-pr-comments-skill)
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=4c5ae9c298704bed82a1a58846de8204&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
[](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=4c5ae9c298704bed82a1a58846de8204&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is a comment left during a code review.
**Path:**
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts
**Line:** 1299:1305
**Comment:**
*Logic Error: Horizontal bar charts do not swap the configured
intervals before building the physical axes. With `xAxisMinInterval` set to
`86400000` and `yAxisMinInterval` set to `1`, this assigns `86400000` to the
rendered X/value axis and `1` to the rendered Y/category axis, contrary to the
control-panel semantics and the added horizontal-bar test. Select the interval
according to `isHorizontal` when assigning each axis.
Validate the correctness of the flagged issue. If correct, How can I resolve
this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask
user if the user wants to fix the rest of the comments as well. if said yes,
then fetch all the comments validate the correctness and implement a minimal fix
```
</details>
<a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43515&comment_hash=5f37c5b2df97d733e8ac5582f3188dbadc90985c480c288c51fe9e38111f077f&reaction=like'>👍</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43515&comment_hash=5f37c5b2df97d733e8ac5582f3188dbadc90985c480c288c51fe9e38111f077f&reaction=dislike'>👎</a>
--
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]