I have used ‘vacations’ datasource using Name v/s Date to Plot.
Vacations structure is
Name (name of person)
Country
Date_start
Date_end
I want to overlap ‘holidays’ datasource on top of Plot already plotted above using Country v/s Date for each user where vacations.country == holidays.country
Holidays structure is
Name (name of holiday)
Country
Date_start
Date_end
Example:
In Vacations - “abe” belongs to “USA”. I want to plot all the “USA Holidays” on “abe’s” barX.
Thanks for your question! I sent you a suggestion for one way to accomplish this. The general gist is that there isn’t a “canonical” way to do this entirely within Plot without some data wrangling beforehand. The changes I (and @Fil) made were to:
Order the y domain so people in the same country are grouped together
Do some data wrangling (outside of Plot) to get objects in the same shape of the vacations array but for each holiday (so each holiday gets repeated for each person in that country)
Add rects for each holiday, adding a title channel which will provide a tooltip for what the holiday is
Style the rects so they appear to span all of the people in that country
We also added some line marks on the right side to show the country groupings, but as @Fil pointed out some names appear in multiple countries (len) so that’s probably not going to work in your situation.
Thanks @duaneatat for detailed summary to approach. I read the post couple of times, Did you intend to add any reference link here? There are reference to you and Fil working on it.
@hellonearthis Thanks for the suggestion. I aligned all the country code to “alpha3” and fixed all the vacations with empty country and mixed countries. It looks beautiful.