Legend text overlapping Labels of Y axis when legends set tot left of Chart
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 18.3k
- Forks
- 2k
- Ø Merge
- 2 T. 12 Std.
- Gemergte PRs (30 T.)
- 28
Beschreibung
When legends are left aligned to the chart and Y axis labels have long string. The legend and labels text seems to overlap each other

The reason behind seems the way marginPushers are calculated and the labels are rendered. Labels are rendered considering the anchor point for the text as "start" or "end" based on the side where the labels are displayed. In case of labels being displayed on left the text-anchor is set to "right" while the rest of the whole calculations for the charts does not consider this and all the other layers are rendered without considering the extra space that will be required for the labels to render themselves taking space from right to left (read here. When labels are on right we should consider them as margin pushers and calculate them for transformation/axis translations of all layers of the Charts such as zeroline/grid/plots etc,
Please share your point of view or any workarounds, if can be used.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit nachzuverfolgen, wie marginPushers berechnet werden und wie Y-Achsenbeschriftungen und linksbündige Legenden gerendert werden, wobei du dich auf das im Issue beschriebene SVG-Verhalten von text-anchor konzentrierst. Reproduziere das Diagramm mit langen Y-Achsenbeschriftungen auf der linken Seite und einer linksbündigen Legende; abgeschlossen ist die Aufgabe, wenn sich Legende, Beschriftungen, zeroline, Raster, Plots und Achsentranslationen nicht mehr überlappen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript
- Bereich
- data-visualization
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100