I would like to select elements in my data array that have a specific paramter value.
ex:
[{type: "suv", value:10},{type: "suv", value:20},{type: "berline", value:15},{type: "berline", value:5}]
So, how would I only have the type:"suv" to be taken into account when plotting my value data?
The only similar thing I could find is selectAll, but it seems to only select elements in the UI (?)
Bear with me if this is simpler, I’m not too used to d3.js, and the information on the subject is rare.
If you’re trying to filter your data before using
d3.selectAll(...).data(...)..., then use this:Are you instead trying to modify what’s already displayed?