Fork of Reusable D3 Scatter Plot
✓ Published0🌍 Public
This example presents three separate scatter plots visualizing nutritional information from a menu items dataset, comparing carbohydrates, protein, and total fat across different food items. Using D3.js v7, each plot renders with SVG circles, band scales for the categorical menu items along the x-axis, and linear scales for numeric nutritional values on the y-axis. The code loads the CSV data with `d3.csv`, then calls a reusable `createScatterPlot` function to generate each chart with rotated axis labels, titles, and rotated text ticks.
AI-generated descriptionA reusable scatter plot inspired by Towards Reusable Charts.
Shows the Iris Dataset.
MIT Licensed