Yaxis height not working
See original GitHub issueI’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:
- Created 6 years ago
- Comments:11 (5 by maintainers)
Top GitHub Comments
Try using the domain and allowDataOverflow
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 propertyheight
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.
Thanks!