question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Reference line "isFront" prop doesn't seem to work

See original GitHub issue

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

report a bug

What is the current behavior?

The reference line is rendered behind the chart even though the inFront prop is set to true

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/ndLhnegs/).

Code: <ReferenceLine x={minRatioObj.i} stroke="#fb8f93" alwaysShow label={{ position: "top", value: "Lowest Ratio", fill: "white", fontSize: 14, dy: 12, dx: dx, fillOpacity: 1 }} strokeDasharray="3 3" strokeWidth={2} isFront={true} />

Demo: screen shot 2018-01-30 at 2 12 50 am

What is the expected behavior?

For the reference line to be rendered in front of the other cartesian components

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

It’s the same in both Chrome & Safari. I’m using recharts 1.0.0-beta.9

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:8
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

33reactions
amonsechcommented, Jul 25, 2018

Not sure if this works for your case, but moving your <ReferenceLine/> to the end of your chart should do the trick. SVG’s will render based in document order by default.

<Chart>
    <Bar/>
    ...
    <ReferenceLine/>
</Chart>
0reactions
Sotatek-ThuyetNguyencommented, Jul 12, 2022

Not sure if this works for your case, but moving your <ReferenceLine/> to the end of your chart should do the trick. SVG’s will render based in document order by default.

<Chart>
    <Bar/>
    ...
    <ReferenceLine/>
</Chart>

Work for me!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Recharts ReferenceLine between data points - Stack Overflow
I would like to draw a ReferenceLine on an arbitrary x-value, but if the x property of ReferenceLine is not any of the...
Read more >
How to Read React Errors (fix 'Cannot read property of ...
The Quick Fix. This error usually means you're trying to use .map on an array, but that array isn't defined yet.
Read more >
Object reference not set to an instance of an Object C# - Unity ...
Hey guys! I am pretty new to C# and am currently making my second game using this language. The game is a clone...
Read more >
Explore component properties - Figma Help Center
Anyone with edit access to the Figma design file can create, manage, and use component props. Already familiar with component properties?
Read more >
Welcome Backstage Final Flashcards - Quizlet
the area in front of (and sometimes below) the stage where an orchestra is ... an imaginary reference line drawn along the back...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found