I want to word-wrap long labels like in this demo. Supposedly this PR supports it, but I couldn't get it to work with
<XAxis dataKey="name" interval={0} width={30} label={<Text width={30} />} />
There is an example here done by lisamartin00
She used a custom axis tick:
const CustomizedAxisTick = React.createClass({
render () {
const {x, y, payload} = this.props;
return <Text x={x} y={y} width={75} textAnchor="middle" verticalAnchor="start">{payload.value}</Text>
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With