Skip to content

Commit 20fbf18

Browse files
committed
👾 fix sloppy mistake
1 parent 4e752fb commit 20fbf18

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/legend/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ legend.draw = function(td) {
570570
}
571571

572572
if(opts.yanchor === 'bottom' || (opts.yanchor === 'auto' && opts.y <= 1 / 3)) {
573-
ly -= opts.width;
573+
ly -= opts.height;
574574
}
575575
else if(opts.yanchor === 'middle' || (opts.yanchor === 'auto' && opts.y < 2 / 3)) {
576576
ly -= opts.height / 2;
@@ -764,7 +764,7 @@ legend.repositionLegend = function(td, traces){
764764

765765
var yanchor = 'top';
766766
if(opts.yanchor === 'bottom' || (opts.yanchor === 'auto' && opts.y <= 1 / 3)) {
767-
ly -= opts.width;
767+
ly -= opts.height;
768768
yanchor = 'bottom';
769769
}
770770
else if(opts.yanchor === 'middle' || (opts.yanchor === 'auto' && opts.y < 2 / 3)) {

0 commit comments

Comments
 (0)