Skip to content

ComposedChart or BarChart custom label x position #999

Description

@eldyvoon

How to get the width of the bars in custom label? I need that to set the x for my ComposedChart

https://imgur.com/a/TJNa3

class CustomLabel extends Component {
	render() {
		const {x, y, stroke, value} = this.props;

		console.log(this.props) // I found nothing here
		return (
			<text 
				x={x * 2}
				y={y + 16}
	            fontSize={14}
	            textAnchor="middle"
	            >{value != 0 ? value + '%': ''}</text>
	    )
	}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions