Emissions Beeswarm | Alvaro | Observable
ojs
ojs
ojs
ojs
ojs
Author
Alvaro
@bluesmile82
Frontend / Data viz engineer currently working at
@Vizzuality
Comments (2)
Pablo Urrutia
Mar 8, 2023
Is this whole cell for the tooltips? addTooltips(Plot.plot({ height: 280, width: 1000, x: {domain: [0.2, range]}, grid: true, marks: [ Plot.dot(data, Plot.dodgeY({x: vulnerabilityAttribute, stroke: (d) => countryIsSelected(d) ? '#000' : d.iso3, r: yearAttribute, strokeWidth: (d) => countryIsSelected(d) ? 5: 1, fill: (d) => (noSelection(d) || countryIsSelected(d)) ? d.iso3 : "lavender", label: 'name', anchor: 'middle', padding: 3, title: (d) => `${
d.name
} \n vulnerability: ${d[vulnerabilityAttribute]} \n emissions: ${d[yearAttribute]}` })), Plot.text(data, Plot.dodgeY({filter: d => d[yearAttribute] > maxEmissionsData / 5, x: vulnerabilityAttribute, text: 'name', anchor: 'middle', padding: 3 })), ], label: "Vulnerability", }))
Alvaro
Mar 8, 2023
No, This is for the Plot, the whole chart. I'm using the Plot library and wrapping it on the addTooltips observable as the standard tooltip was not working well on Plot.dodgeY
Reply
Add comment
Subscribe to notifications
© 2026 Observable, Inc.
Terms of service
Privacy policy
Product
About
Pricing
Documentation
Release notes
Contact us
Open source
Notebook Kit
Plot
D3
Community
Explore
Forum
Bluesky
YouTube
X
1
Follow
Follow
Emissions Beeswarm | Alvaro | Observable