I was thinking of using d3.group to group by date, so you could easily look up the values. We can even create the tooltips at that point with d3.rollup:
Ahh ok. Thanks for clarifying. That gives all the “brands” data in the tip in each facet.
I didn’t say I was going for a single tip like
date: 1
honda: 24
toyota: 26
So in each brand’s facet, only their data and toyota data are shown, instead of all brands. I could pre-construct the tips so when rendering its just a lookup by date+brand or something. But that also seems extra because not all points need a tip drawn.
And also, just thinking aloud, what about mis-aligned timestamps. Like if the “toyota” data has weekly samples and the other brands are monthly how does a person get the interpolated value Plot draws on the honda line when showing the tip on a mid-month toyota data point.
I wonder if there’s a way to access the data in the active facet when constructing the tip.