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.

YAxis Label not apply transform for `angle` property

See original GitHub issue
  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

Run the example with recharts@1.8.5 and @2.0.0-beta.1

What is expected?

YAxis label appear rotated when angle property is set

What is actually happening?

angle property is ignored and label appear without transformation

Environment Info
Recharts v2.0.0-beta.1
React react@16.12.0
System Ubuntu 16.04
Browser Chromium 78.0.3904.108

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:21
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

10reactions
navarro-davidcommented, Jan 10, 2020

I found a workaround that does work in v2.0.0-beta.1

Pass in a Text component with the angle prop

<YAxis
padding={{ top: 12 }}
type='number'
domain={[0, "dataMax + 2"]}
yAxisId='hours'
orientation='left'
label={
   <Text
      x={0}
      y={0}
      dx={50}
      dy={150}
      offset={0}
      angle={-90}
   >Hours</Text>
} />
Read more comments on GitHub >

github_iconTop Results From Across the Web

Customize X-axis and Y-axis properties - Power BI
In this tutorial, you'll learn many different ways to customize the X-axis and Y-axis of your visuals. Not all visuals have axes.
Read more >
Rotating and spacing axis labels in ggplot2 - Stack Overflow
To make the text on the tick labels fully visible and read in the same direction as the y-axis label, change the last...
Read more >
Label y-axis - MATLAB ylabel - MathWorks
This MATLAB function labels the y-axis of the current axes or standalone visualization. ... To change the font units, use the FontUnits property....
Read more >
Axis | Vega-Lite
The minimum extent in pixels that axis ticks and labels should use. This determines a minimum offset value for axis titles. Default value:...
Read more >
axis label options - Stata
Use about 5 automatically chosen ticks and labels on the y axis ... ztick(rule or values) specify the major values to be ticked...
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