score:0

You can change the opacity property on the event depending on the filter as such:

d3.selectAll(".events").attr('opacity', d => {   
   const includes = genreType.filter(item => d.Genre.indexOf(item) !== -1)
   return includes ? 1 : 0
})

this will work on the assumptions that d.Genre is a string as such "Standup, Comedy Rock, Comedy, Standup Comedy, Funny, Humor" and genreType is an array of keywords as such: ["Standup", "Comedy"].

Of the genreType is another string you should execute a split as such .split(/, ?/g) in order to convert it


Related Query