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

Skip to content

Commit e3a068e

Browse files
committed
Fix group title click resolving to wrong legend by adding missing legend property
1 parent 6f6fd91 commit e3a068e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/components/legend/attributes.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,8 @@ module.exports = {
185185
'*toggle* toggles the visibility of all items in the legend.',
186186
'*toggleothers* toggles the visibility of all other legends.',
187187
'*false* disables legend title click interactions.',
188-
'Defaults to *toggle* when there are multiple legends, *false* otherwise.'
188+
'Defaults to *toggle* when there are multiple legends, *false* otherwise.',
189+
'Does not work for legends containing pie and pie-like traces.'
189190
].join(' ')
190191
},
191192
titledoubleclick: {
@@ -197,7 +198,8 @@ module.exports = {
197198
'*toggle* toggles the visibility of all items in the legend.',
198199
'*toggleothers* toggles the visibility of all other legends.',
199200
'*false* disables legend title double-click interactions.',
200-
'Defaults to *toggleothers* when there are multiple legends, *false* otherwise.'
201+
'Defaults to *toggleothers* when there are multiple legends, *false* otherwise.',
202+
'Does not currently work for legends containing pie and pie-like traces.'
201203
].join(' ')
202204
},
203205
x: {

src/components/legend/get_legend_data.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ module.exports = function getLegendData(calcdata, opts, hasMultipleLegends) {
164164
trace: {
165165
showlegend: firstItemTrace.showlegend,
166166
legendgroup: firstItemTrace.legendgroup,
167+
legend: firstItemTrace.legend,
167168
visible: opts.groupclick === 'toggleitem' ? true : firstItemTrace.visible
168169
}
169170
});

0 commit comments

Comments
 (0)