MCPcopy Index your code
hub / github.com/plotly/plotly.js / isSelectable

Function isSelectable

src/components/modebar/manage.js:289–317  ·  view source on GitHub ↗
(fullData)

Source from the content-addressed store, hash-verified

287// look for traces that support selection
288// to be updated as we add more selectPoints handlers
289function isSelectable(fullData) {
290 var selectable = false;
291
292 for(var i = 0; i < fullData.length; i++) {
293 if(selectable) break;
294
295 var trace = fullData[i];
296
297 if(!trace._module || !trace._module.selectPoints) continue;
298
299 if(Registry.traceIs(trace, 'scatter-like')) {
300 if(scatterSubTypes.hasMarkers(trace) || scatterSubTypes.hasText(trace)) {
301 selectable = true;
302 }
303 } else if(Registry.traceIs(trace, 'box-violin')) {
304 if(trace.boxpoints === 'all' || trace.points === 'all') {
305 selectable = true;
306 }
307 } else {
308 // assume that in general if the trace module has selectPoints,
309 // then it's selectable. Scatter is an exception to this because it must
310 // have markers or text, not just be a scatter type.
311
312 selectable = true;
313 }
314 }
315
316 return selectable;
317}
318
319// check whether all trace are 'noHover'
320function hasNoHover(fullData) {

Callers 1

getButtonGroupsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…