Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Removed unneeded code
  • Loading branch information
Alfie Hopkin authored Jan 27, 2019
commit c50318d8eafad618c070cdeeb124fcdc9a139e03
5 changes: 2 additions & 3 deletions src/plugins/plugin.legend.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,9 +369,8 @@ var Legend = Element.extend({
if (opts.labels && opts.labels.usePointStyle) {
// Recalculate x and y for drawPoint() because its expecting
// x and y to be center of figure (instead of top left)
var pointWidth = Math.min(boxWidth, fontSize);
var radius = pointWidth * Math.SQRT2 / 2;
var centerX = x + pointWidth / 2;
var radius = boxWidth * Math.SQRT2 / 2;
var centerX = x + boxWidth / 2;
var centerY = y + fontSize / 2;

// Draw pointStyle as legend symbol
Expand Down