Style Reference Line Label
See original GitHub issueRequest for documentation
I am unable to style the reference line label to match this example: http://recharts.org/#/en-US/api/ReferenceLine
It ends up looking like this:
I tried passing a ReactComponent into the label props. The result is no that no label gets displayed.
My code looked like
<ReferenceLine x={firstQuadPercentile} stroke={'green'} label={<text>{'25th percentile'}</text>} />
and
<ReferenceLine x={firstQuadPercentile} stroke={'green'} label={<div>{'25th percentile'}</div>} />
Since no label gets displayed, it didn’t seem like this solution would work.
How can I style the label to match the first example shown in this request?
My recharts version : 1.0.0-alpha.2
Issue Analytics
- State:
- Created 6 years ago
- Reactions:12
- Comments:16 (2 by maintainers)
Top Results From Across the Web
Custom Name for a Reference Line | Tableau Software
In the Line section, select Custom from the Label drop-down menu. ... Click OK. Click the reference line and select Format to customize...
Read more >Questions from Tableau Training: Moving Reference Line ...
Formatting Labels in Tableau. For starters, right-click directly on top of your reference line and select Format.
Read more >How do I Customise Labels on Reference Lines in Tableau?
To add a Reference Line we need to go to the Analytics tab and select Reference Line. · To proceed from here you...
Read more >Reference Line Label Format - Qlik Community - 1641343
Reference Line Label Format. LCLbug.PNG. I am finding that on reference lines added to my line chart visualization that negative numbers are ...
Read more >Add label to ReferenceLine in recharts - Stack Overflow
Change the position from center to top <ReferenceLine type="monotone" y={props.data.avgAll} fill="violett" stroke="#8884d8"> <Label ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@westoncolemanl @fengshuo
The below is my custom ReferenceLabel component. you can try it.
use it
hope it can help you.
@wewoor @westoncolemanl
You can try the props
position
of label.