Untitled
✓ Published0🌍 Public
This example displays a choropleth map of Kazakhstan’s administrative regions using D3 v7. On mouse movement over a province, a tooltip div appears, showing the region’s name from the GeoJSON properties, while the cursor position determines the tooltip’s placement. The tooltip is hidden on mouseout. The map uses `d3.geoAlbers` projection and `d3.geoPath` to render SVG paths from the loaded GeoJSON data.
AI-generated descriptionAn example showing hovering on a map:
- Loads d3v7 via UNPKG.
- Loads map of Canada
- On mouse move :
- shows a div by modifying its css properties
- modifies the content and position of a div (the tooltip)
- changes the css class of the state to change its color
- On mouse out :
- hides the tooltip div
MIT Licensed