Skip to main content
100%

Trivikram_ScatterPlot

✓ Published0🌍 Public
Ttrivikramcheluri@gmail.com
Last edited Mar 21, 2024
Created on Mar 21, 2024

This example shows the relationship between flight prices and airlines as a scatter plot, with flight price on the x-axis and airline names on the y-axis. It uses D3 v7 to load CSV data, scale the axes with `scaleLinear` and `scaleBand`, and render circular marks via SVG. The code builds the chart by selecting the body, appending an SVG element, and drawing circles positioned with `cx` and `cy` attributes. Axis labels are added with `axisLeft` and `axisBottom`, and the flight-price axis includes extra bottom margin for readability. The dataset is fetched from a remote CSV file, and the visualization fills the entire viewport.

AI-generated description

A responsive scatter plot.

MIT Licensed

Similar vizzes