Reputation: 993
I want to add a <Label/>
to a <ReferenceLine/>
.
This works but I want the <Label/>
s position to be on the line (or near the line) instead of being in the right corner (-> image).
Here is my code:
<ReferenceLine type="monotone" y={props.data.avgAll} fill="violett" stroke="#8884d8">
<Label content={<AverageCircle/>} position={"center"}/>
</ReferenceLine>
Any suggestions how to do that?
Upvotes: 0
Views: 3448
Reputation:
Change the position from center
to top
<ReferenceLine type="monotone" y={props.data.avgAll} fill="violett" stroke="#8884d8">
<Label content={<AverageCircle/>} position={"top"}/>
</ReferenceLine>
you can refer to the documentation here
Upvotes: 2