Skip to main content
100%

Best Fit Line

✓ Published0🌍 Public
Sseanlucano
Last edited Dec 24, 2020
Created on Dec 6, 2020
Forked from HTML Starter

An interactive scatter plot displays the relationship between Microsoft and Walmart stock returns. Users click and drag to draw their own estimated regression line onto the chart. A button reveals the actual least squares fit, computed using the `d3-regression` library’s `regressionLinear()` function. Data points render as circles from the CSV file, while the user’s line is drawn with `d3.drag()` pointer events. The SVG visualization uses D3 v6 scales, axes, and `transition`-less direct attribute updates.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes