Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Reusable D3 Scatter Plot

Public visualization

Viewing a saved revision (read-only)

6d12a5e4d57c43718c01287d1852ae18

Fork of Reusable D3 Scatter Plot

0 stars0🌍 Public
Mmanthenasirisha06@gmail.com
Last edited Mar 28, 2024
Created on Mar 28, 2024

This fork of a D3.js scatter plot animates through three pairings of nutritional data from a CSV file of menu items: carbohydrates versus protein, carbohydrates versus total fat, and protein versus total fat. The code uses D3 modules such as `scaleLinear`, `extent`, `axisLeft`, and `axisBottom` to render axes and circles with an SVG. A `setInterval` callback updates the x and y value mappings every two seconds, changing the chart’s title accordingly. The visualization employs a custom `scatterPlot` function and D3’s `selectAll` and `join` for efficient updates.

AI-generated description

scatter plot for menu items vs carbohydrates, protein, total_fat