Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Exersice Episode 8 - Scatter plot + tooltips

Public visualization

Viewing a saved revision (read-only)

7058abb117604ac3b4830fcfd28f687d

Fork of Exersice Episode 8 - Scatter plot + tooltips

0 stars1🌍 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