<CartesianGrid /> ignores props
See original GitHub issueDo you want to request a feature or report a bug? Bug
What is the current behavior?
CartesianGrid ignores x ,y, width, height, horizontalPoints, verticalPoints
props.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar (template: http://jsfiddle.net/9y45ut13/).
What is the expected behavior?
I would have expected there to be horizontal lines as specified by let horizontalPoints = [100, 200, 300, 400];
I would have also expected the grid to start at x={20} y={20}
. Discovered when tried to limit the size of the CartesianGrid.
Which versions of Recharts, and which browser / OS are affected by this issue? Did this work in previous versions of Recharts? Chrome. Haven’t used previous versions.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:4
- Comments:5
Top GitHub Comments
Meanwhile for those who need either vertical or horizontal lines on a graph … i propose to use :
referenceLines = myAxisTicks.map(t=><ReferenceLine x={t} stroke="#ccc"/>
<LineChart>{referenceLines}</LineChart>
Where myAxisTicks is array of numbers. Customise ReferenceLine to suit your needs as per API docs : http://recharts.org/It also happens when use
CartesianGrid
insideLineChart