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.

Is it possible to position an XAxis?

See original GitHub issue

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

Feature / Help needed

What is the current behavior?

Unable to override position of Axis component. I’m trying to achieve a design similar to this: image

Is there any way to set the y position of an XAxis so that it’s not at the bottom of the chart?

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
pratik-githubcommented, May 25, 2020
.recharts-xAxis {
  transform: translate(0, -50%);  
}

would be tricky to identify and maintain easiest solution would be:

hide x-axis line using axisLine={false} and add referenceLine for y=0 so it will look like a X axis but at the right position.

<ReferenceLine purpose='fake x axis' yAxisId='left' y={0} stroke='#666666' />
0reactions
si-muhammad-usmancommented, Apr 14, 2022
.recharts-xAxis {
  transform: translate(0, -50%);  
}

Thanks. It’s working fro me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Positioning Axis Elements – amCharts 4 Documentation
Axis elements are not restricted to pre-set locations anymore. You can literally put them at any place within axis. Let's explore how it...
Read more >
In highcharts, is it possible get the exact position of x axis ...
My data (a line chart) is dynamic, and some times the x axis label overlaps. Customer do ...
Read more >
How to "set" the position of a "simulated axis" or show a ...
Hi, You can position an axis from the plc using FC18. Never tried it with a simulated axis but I would expect it...
Read more >
Where to Position the Y-Axis Label - PolicyViz
For the most part, axis labels tend to be short, so it's not like you have to turn your head to read them....
Read more >
Moving Object on position x axis - Unity Forum
Haven't been able to find anything though. I'm trying this on FixedUpdate and it does move it right accept the camera is all...
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