Skip to main content
Public

Share visualization

Loading preview…

Reusable_Scatter Plot

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Reusable_Scatter Plot

0
RRahulbelede97@gmail.com
Last edited Mar 28, 2024
Created on Mar 28, 2024

This example shows how sales in 2019 relate to sales in 2021 for different car types, with each circle’s position encoding the two years’ values. The chart animates every two seconds, cycling the x-axis through 2019, 2020, and 2021 sales while keeping the y-axis fixed on 2019. The reusable scatter plot is built with D3 v6, using `scaleLinear`, `extent`, `axisLeft`, and `axisBottom` to render axes, and SVG circles with a radius of 5 pixels. Data is loaded from a CSV via `d3.csv`, and the plot’s dimensions adapt to the window size.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed