G’day everyone,
I’m pretty new to all of this (I’ve used lots of Stata and some R but not java stuff) so I hope that this is an easy question, but I’ve had a lot of googling etc. and can’t find the answer (likely my bad searching!)
So I have a dataset with multiple variables (e.g. temperature, electricity demand and time) and can make a scatterplot of one variable vs another. (e.g. temperature vs demand - Excellent!)
I can then add a selection box to select something about a third variable and have it highlighted on the graph based on that selection. (e.g. temperature vs demand at 6 o’clock - Excellent!)
What I would like is to be able to have multiple (or no) selection from the selection input and have it also show the multiple selections on the graph. (e.g. temperature vs demand at 6, 8 and 11 o’clock).
I think it’s because my filter for the data in the plot uses…
filter: (d) => d.hour == selectTimes
And I guess I need to know what to change the == into so that it’s filtering based on the array contained within selectTimes?
I’m sharing an example notebook here and would greatly appreciate any help! Thanks!