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 height not working

See original GitHub issue

I’m trying to define a height on y axis, but looks like it is calclauting the height internally and not taking my height into account. The reason I’m trying to set height is, the height first calculated is different from subsequent renders. Not sure why

<ResponsiveContainer> <BarChart layout='vertical' data={this.props.data} margin={{top: 5, right: 30, left: 20, bottom: 5}} barGap={2}> <XAxis tick={{fontSize: 12}} tickFormatter={this.formatValue} type="number" dataKey="value" /> <YAxis tick={<CustomizedTick tickFontSize={this.tickLabelFontSize}/>} tickSize={4} interval={0} type="category" width={70} height={190} dataKey="name" /> <Tooltip formatter={this.formatValue} wrapperStyle={{ fontSize : 12, maxWidth:200, whiteSpace: 'normal'}}/> <Legend chartHeight={195}/> <Bar name={this.props.legend} dataKey="value" label={this.renderCustomizedLabel} maxBarSize={12}> </Bar> </BarChart> </ResponsiveContainer>

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
huei-tan-sociomanticcommented, Nov 20, 2017

Try using the domain and allowDataOverflow

<YAxis height="100" domain={[ ..., ... ]} allowDataOverflow={true}/>
0reactions
tomtobaccommented, Feb 1, 2018

http://jsfiddle.net/ndLhnegs/686/

I am just playing with library and try to have a little bit of marginTop between the label of XAxis and the line of XAxies, but with the property height doesn’t work (maybe is not the behavior of this prop)

Also I wanted to have for the legend a line without the dot, it is possible?

This is what I want to achieve.

image

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

yAxis.height | highstock API Reference - Highcharts API
A class name that opens for styling the axis by CSS, especially in Highcharts styled mode. The class name is applied to group...
Read more >
Highcharts yAxis is not scaling to fill available height
EDIT : I didn't see you set a tickInterval, but the solution (removing the empty categories from y-axis) still solved the problem.
Read more >
Change the scale of the horizontal (category) axis in a chart
To change the point where you want the vertical (value) axis to cross the horizontal (category) axis, expand Axis Options, and then under...
Read more >
Charts - everviz Knowledge Base
Why is my chart is not loading, or is just showing the background? Copy link ... How do I change the height/width sizes...
Read more >
scaleY() - CSS: Cascading Style Sheets - MDN Web Docs
scale · rotate; Note: there is no skew property. Found a problem with this page?
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