highcharts / highcharts/rounded-corners
Negative values dont work as expected
- Dominant language
- JavaScript
- Stars
- 24
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Description
Expected behavior is:
Top Left / Top Right are set on a vertical column and it has negative value then the corners should be opposite so Bottom Left / Bottom Right.
I've made changes to ours to fix this, but it only covers our use cases (vertical columns only):
```
if(point.y < 0){
var tmpTopLeft = rTopLeft,
tmpTopRight = rTopRight,
tmpBottomLeft = rBottomLeft,
tmpBottomRight = rBottomRight;
rTopLeft = tmpBottomLeft;
rTopRight = tmpBottomRight;
rBottomLeft = tmpTopLeft;
rBottomRight = tmpTopRight;
}
```
I considered forking for this fix but it only works on vertical columns and may cause problems on horizontal columns.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the column corner-handling code and trace how Top Left, Top Right, Bottom Left, and Bottom Right are assigned for vertical and horizontal columns. Reproduce the negative-value case, then verify that corner placement is reversed correctly for both orientations without breaking positive values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100