Hi there, I’ve created a notebook that imports labor market data from Google Sheets and allows the user to select the measure of interest from a dropdown (right now it’s just two measures). Dashboard / Berkeley Institute for Young Americans | Observable
I can’t figure out how to have the tooltip values reflect the user input from the dropdown and, therefore, the measure being visualized.
The relevant code within the visualization is:
title: (d) => ${d.unrate}% \n ${d.division} \n ${d.month} ${d.year} // \n makes a new line
}),
I tried:
title: ${Object.values(favorite)[1]}
That worked, but I wasn’t able to figure out how to add other text to the tooltip.