Recharts: Adjust Y axis minimum value based on brush positions

Created on 28 Apr 2017  路  1Comment  路  Source: recharts/recharts

Do you want to request a feature or report a bug?

Bug? Seems like odd functionality

What is the current behavior?

See example on: http://recharts.org/#/en-US/examples/SynchronizedLineChart

Both charts are a downward slant. If you move the left brush towards the right, you will see the top of the graph scale downwards where the maximum value shrinks to increase the resolution of the graph. This is expected. However, if you take the right brush and move it towards the left, the _minimum value_ of the graph does not increase accordingly and stays locked at 0.

This is also odd behavior because the minimum value does scale when you look at http://recharts.org/#/en-US/examples/BrushBarChart. Maybe it is only an issue with the minimum Y value is 0?

What is the expected behavior?

Both the minimum and maximum values of the charts scale based visible values for maximum graph resolution.

Which versions of Recharts, and which browser / OS are affected by this issue? Did this work in previous versions of Recharts?

All versions, I don't believe this has ever been functional

Most helpful comment

Closing.

This can be achieved by setting the Y Axis from it's default value to domain={["dataMin", "dataMax"]}

I.e.

<YAxis orientation="left" domain={["dataMin", "dataMax"]} />

>All comments

Closing.

This can be achieved by setting the Y Axis from it's default value to domain={["dataMin", "dataMax"]}

I.e.

<YAxis orientation="left" domain={["dataMin", "dataMax"]} />
Was this page helpful?
0 / 5 - 0 ratings

Related issues

alexliu-github picture alexliu-github  路  3Comments

emiloberg picture emiloberg  路  3Comments

gutakk picture gutakk  路  3Comments

sortsen picture sortsen  路  3Comments

chin-idean picture chin-idean  路  3Comments