I some variables coming into my function.
If the first of these is a d3 selection I want to use it, otherwise I want to use a default selection.
How do I check if a variable is a d3 selection or not?
To check if variable sel
is a d3.selection:
var isselection = sel instanceof d3.selection;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With