Skip to main content
100%

Fork of D3 Scatter Plot Vanilla Javascript (simple_example)

✓ Published0🌍 Public
FFrancisco Ibelles
Last edited Jun 15, 2023
Created on Jun 15, 2023

This example shows a scatter plot of ice cream prices against temperatures, with twelve data points plotted on a fixed 10–26°C x-axis and 0–700 price y-axis. The visualization uses d3.v7’s `scaleLinear`, `axisLeft`, `axisBottom`, and SVG circle rendering through the `join` method. Data is hard-coded in JavaScript arrays `xVal` and `yVal`, and the chart includes gridlines via tick marks and a title. The SVG output is generated entirely in vanilla JavaScript without external datasets.

AI-generated description

Create a scatter plot with vanilla javascript [ICE CREAM]

MIT Licensed

Similar vizzes