@@ -793,13 +793,16 @@ export class SVGLegend implements ILegend {
793793
794794 // When the legend is right-aligned (TopRight/BottomRight):
795795 // - If everything fits, the group is translated to the right edge in
796- // drawLegendInternal and items render right-aligned with no arrow.
797- // - If items overflow, native visuals fall back to left-aligned rendering
798- // with the "next" arrow at the right edge of the viewport — matching the
799- // standard Top/Bottom overflow behavior. We achieve that here by setting
800- // visibleLegendWidth to the full parent width so the translation in
801- // drawLegendInternal becomes 0; the arrow keeps its default x set by
802- // updateNavigationArrowLayout (parentViewport.width - LegendArrowWidth).
796+ // drawLegendInternal and items render right-aligned.
797+ // - If items overflow, we unconditionally fall back to left-aligned
798+ // rendering by setting visibleLegendWidth to the full parent width so
799+ // the translation in drawLegendInternal becomes 0. This matches the
800+ // standard Top/Bottom overflow layout.
801+ // When scrolling is enabled (isScrollable), updateNavigationArrowLayout
802+ // will additionally place the "next" arrow at the right edge of the
803+ // viewport (parentViewport.width - LegendArrowWidth); when scrolling
804+ // is disabled, navigationArrows is empty and no arrow is rendered, but
805+ // the left-aligned fallback still applies.
803806 if ( isRightAligned ( this . orientation ) && numberOfItems !== dataPointsLength ) {
804807 this . visibleLegendWidth = this . parentViewport . width ;
805808 }
0 commit comments