-
Notifications
You must be signed in to change notification settings - Fork 537
Open
Labels
Type: Bug 🐛Oh no! A bug or unintentional behaviorOh no! A bug or unintentional behavior
Description
Is there an existing issue for this?
- I have searched the existing issues
Code of Conduct
- I agree to follow this project's Code of Conduct
Victory version
35.2.0
Code Sandbox link
No response
Bug report
## Bug Description
Horizontal bar charts display with reversed axis direction (max → min instead of min → max) starting from Victory v35.0.0.
## Environment
- **Victory version:** 37.3.6 (issue also present in 35.0.0 - 37.x)
- **React version:** 16.13.1
- **Previous working version:** 34.3.4
## Expected Behavior
Horizontal bar chart should display axis from **0 → 6000** (left to right):Steps to reproduce
## Steps to Reproduce
<VictoryChart
domain={{ y: [0, 1] }}
padding={{ top: 50, bottom: 70, left: 60, right: 50 }}
>
<VictoryAxis
orientation="left"
tickValues={[0, 0.083, 0.166, ..., 1]}
tickFormat={["0", "500", "1,000", ..., "6,000"]}
/>
<VictoryAxis
orientation="bottom"
tickFormat={["Total"]}
/>
<VictoryBar
horizontal
data={[{ x: "Total", y: 0.9445 }]} // 5667 normalized to 0-1 scale
/>
</VictoryChart>Expected behavior
Horizontal bar chart should display axis from **0 → 6000** (left to right) :
[Bar]-------------------> 0 1000 2000 6000Actual behavior
## Actual Behavior
Horizontal bar chart displays axis from **6000 → 0** (left to right):
## Console output
tickFormat: ["0", "500", "1,000", ..., "6,000"] ✓ Ascending
tickValues: [0, 0.083, 0.166, ..., 1] ✓ Ascending
bar y: 0.9445 ✓ Correct position
But visual displays: 6,000 on left, 0 on rightEnvironment
- Device:MAC
- OS:
- Node:22
- npm:Metadata
Metadata
Assignees
Labels
Type: Bug 🐛Oh no! A bug or unintentional behaviorOh no! A bug or unintentional behavior