Legend symbol/label are misaligned in some cases
See original GitHub issueVersion
5.0.1
Steps to reproduce
- Create any chart with a legend
- Use the legend options below
Note: The use of “Hind” for fontFamily
is important here
{
...
icon: 'circle',
itemWidth: 8,
itemHeight: 8,
textStyle: {
fontFamily: 'Hind',
fontSize: 12
}
...
}
What is expected?
It is expected that the symbol (circle) and the label are vertically-aligned with each other.
What is actually happening?
When using “Hind” as the font family, the symbol and label are not vertically-aligned with one another. Other fonts (including custom fonts) do not have this issue. I tried modifying nearly all related options, including trying to “hack” together something that forced the label and symbol to align but nothing worked.
v4 of eCharts worked fine for the “Hind” font so it’s something to do with v5.
After upgrading to v5, the legend symbol/labels were no longer aligned. We had been using v4 for 2-3 years with no problem.
Screenshots
Notice how the symbol (circle) and the label are not vertically-aligned with one another (“Hind” font)
Notice when using other fonts (Montserrat and default font, respectively), the symbol and labels are perfectly aligned
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Dynamic Legend - alignment issues - Esri Community
I have been trying to create a dynamic legend for my maps but I am having some major issues with the alignment of...
Read more >Legend symbol and text alignment is incorrect #1198 - GitHub
I want to generate a legend where the symbol alignment is set correctly to the respective text. Actual behaviour. The height of the...
Read more >in highcharts, how can I align legend symbol and legend text?
As you can see in the jsfiddle example, the legend symbol is not aligned with the legend text. Is there a way to...
Read more >Why is the text in the legend not aligned properly to its ...
The legend that is created is misaligned. The text does not align vertically with the plot figures in the legend. It is a...
Read more >Spine Misalignment Symptoms, Risk Factors, and Treatments
Minor issues with spine alignment may not necessarily be a cause for ... In some cases, severe misalignment may require medical treatment.
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
Hello, just following up on this. It’s labeled as “not-a-bug” but @Ovilia’s suggestion does not work. If there is no solution to the issue, then I believe this is a bug.
Can someone please reply with a way to address the issue in the initial comment?
@Ovilia Any thoughts or suggestions on my comment above?