Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/plugins/plugin.legend.js
Original file line number Diff line number Diff line change
Expand Up @@ -474,8 +474,8 @@ export class Legend extends Element {
}

// Now that we know the left edge of the inner legend box, compute the correct
// X coordinate from the title alignment
const x = _alignStartEnd(position, left, left + maxWidth);
// X coordinate from the title alignment, accounting for horizontal padding
const x = _alignStartEnd(position, left + titlePadding.left, left + maxWidth - titlePadding.right);

// Canvas setup
ctx.textAlign = rtlHelper.textAlign(_toLeftRightCenter(position));
Expand Down