Skip to main content
100%

Fork of Exersice Episode 8 - Scatter plot + tooltips

✓ Published1🌍 Public
BBart van Pelt
Last edited Jan 17, 2023
Created on Jan 17, 2023

This scatter plot visualizes nutritional data from koolhydraten.nl, plotting kilocalories on the x-axis against fat content on the y-axis for a range of food products. Each circle represents a product, with native SVG tooltips displaying the product name, carbohydrate, fat, and kilocalorie values on hover. The visualization uses D3 v6 to load the CSV dataset with `d3.csv`, scales the data with `scaleLinear`, and renders the circles and axes via SVG elements. Interactive tooltips are added by appending `title` elements to each circle, providing detailed information without requiring additional DOM manipulation.

AI-generated description
MIT Licensed

Similar vizzes