Skip to main content
100%

Fork of Car Sales Dateset - Adding Brush

✓ Published0🌍 Public
RRyanYun0017
Last edited Oct 24, 2021
Created on Oct 24, 2021
Forked from Car Sales Dateset

This fork of the Car Details dataset adds a brush interaction to a D3 scatter plot, enabling users to filter the x-axis range and dynamically update the visualization. The scatter plot displays mileage (km driven in thousands) against selling price (in million INR), with circles colored by owner category via `d3.scaleOrdinal`. The code uses `d3.brushX` to handle brush selections, which trigger an update function that resets the x-axis domain and transitions circle positions using `transition().duration(1000)`. Data is loaded from a CSV file with `d3.csv`, and the plot is rendered as an SVG.

AI-generated description

A vanilla HTML implementation of a D3 scatter plot. Shows the The car details dataset.

Update:

Adding Brush on for filltering data.

MIT Licensed

Similar vizzes