Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b2538e1

Browse files
committed
Legend: set tspan.line's x in the callback
* Set tspan.line's x in the callback to convertToSpans, otherwise they won't be set in the first render. * Checked all jasmine and image tests still pass.
1 parent 869538c commit b2538e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/legend/draw.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,8 @@ function drawTexts(gd, context, legendItem, traces) {
338338
computeLegendDimensions(gd, traces);
339339
expandMargin(gd);
340340
}
341+
s.selectAll('tspan.line').attr({x: s.attr('x')});
341342
});
342-
s.selectAll('tspan.line').attr({x: s.attr('x')});
343343
}
344344

345345
if(gd._context.editable && !isPie) {

0 commit comments

Comments
 (0)