victory icon indicating copy to clipboard operation
victory copied to clipboard

The chart is inverted the Y axis when setting a small height prop value less than 100

Open phamhungvn opened this issue 2 years ago • 1 comments

Bug Reports

Checklist

  • [x] I have read through the FAQ and Guides

  • [x] I am using the latest version of Victory

  • [x] I've searched open issues to make sure I'm not opening a duplicate issue

The Problem

Issue

The chart belong to any type, it's inverted the Y axis when setting a small height prop value less than 100. The lower values on the top.

Expectation

The chart should display default behavior with lower values on the bottom, and higher values on the top regardless of orientation.

Reproduction

Please see demo code at https://codesandbox.io/s/crazy-bird-nemdlv Simple changing the height props on <VictoryChart /> to value less than 100

phamhungvn avatar May 18 '22 05:05 phamhungvn

@carbonrobot I am not able to find the root cause here. The co-ordinates passed to LineSegment from VictoryAxis is all positive for y axis when height is less than 100. All the prop variables generated in axisProps seem to be positive values/ same when height passed is >100 or <100. There is no css transform passed. There is also no dependency between x and y axes as both of these are VictoryAxis components called independent of each other.The issue also occurs for x axis when the width is lower the 100. values are displayed in -ve axes space

acharyakavita avatar Mar 01 '24 18:03 acharyakavita