Skip to content

Commit b2ef711

Browse files
committed
Add titleclick and titledoubleclick attributes
1 parent 88a6c0d commit b2ef711

2 files changed

Lines changed: 27 additions & 0 deletions

File tree

src/components/legend/attributes.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,30 @@ module.exports = {
176176
'*togglegroup* toggles the visibility of all items in the same legendgroup as the item clicked on the graph.'
177177
].join(' ')
178178
},
179+
titleclick: {
180+
valType: 'enumerated',
181+
values: ['toggle', 'toggleothers', false],
182+
dflt: 'toggle',
183+
editType: 'legend',
184+
description: [
185+
'Determines the behavior on legend title click.',
186+
'*toggle* toggles the visibility of all items in the legend.',
187+
'*toggleothers* toggles the visibility of all other legends.',
188+
'*false* disables legend title click interactions.'
189+
].join(' ')
190+
},
191+
titledoubleclick: {
192+
valType: 'enumerated',
193+
values: ['toggle', 'toggleothers', false],
194+
dflt: 'toggleothers',
195+
editType: 'legend',
196+
description: [
197+
'Determines the behavior on legend title double-click.',
198+
'*toggle* toggles the visibility of all items in the legend.',
199+
'*toggleothers* toggles the visibility of all other legends.',
200+
'*false* disables legend title double-click interactions.'
201+
].join(' ')
202+
},
179203
x: {
180204
valType: 'number',
181205
editType: 'legend',

src/components/legend/defaults.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,9 @@ function groupDefaults(legendId, layoutIn, layoutOut, fullData) {
238238
});
239239

240240
Lib.coerceFont(coerce, 'title.font', dfltTitleFont);
241+
242+
coerce('titleclick');
243+
coerce('titledoubleclick');
241244
}
242245
}
243246

0 commit comments

Comments
 (0)