Skip to content

Commit f309b5f

Browse files
committed
show legend2, legend3, etc when having one legend item or more
1 parent 513fcfc commit f309b5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/legend/defaults.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ function groupDefaults(legendId, layoutIn, layoutOut, fullData) {
9191

9292
var showLegend = Lib.coerce(layoutIn, layoutOut,
9393
basePlotLayoutAttributes, 'showlegend',
94-
legendReallyHasATrace && legendTraceCount > 1);
94+
legendReallyHasATrace && (legendTraceCount > (legendId === 'legend' ? 1 : 0)));
9595

9696
// delete legend
9797
if(showLegend === false) layoutOut[legendId] = undefined;

0 commit comments

Comments
 (0)