Skip to content

Commit

Permalink
pass boxWidth only if pointStyleWidth presents (#10524)
Browse files Browse the repository at this point in the history
  • Loading branch information
touletan authored Jul 29, 2022
1 parent e800b46 commit a31e1e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/plugin.legend.js
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ export class Legend extends Element {
const centerY = y + halfFontSize;

// Draw pointStyle as legend symbol
drawPointLegend(ctx, drawOptions, centerX, centerY, boxWidth);
drawPointLegend(ctx, drawOptions, centerX, centerY, labelOpts.pointStyleWidth && boxWidth);
} else {
// Draw box as legend symbol
// Adjust position when boxHeight < fontSize (want it centered)
Expand Down

0 comments on commit a31e1e5

Please sign in to comment.