Skip to main content
Public

Share visualization

Loading preview…

LoadCsv-v2

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

LoadCsv-v2

0
JJimMaltby
Last edited Jun 5, 2022
Created on Jun 5, 2022
Forked from LoadCsv-v1

This example demonstrates how to dynamically update displayed text content using D3’s selection API. It presents a dropdown menu and a paragraph; selecting a new option triggers the paragraph’s text to change. The code uses `d3.select` to bind the dropdown and paragraph, `property('value')` to read the current selection, and `text` to render the corresponding string. It also showcases D3’s event handling via `on('change', ...)` and a reusable update function pattern, drawing from the “Towards Reusable Charts” concept.

AI-generated description

A reusable scatter plot inspired by Towards Reusable Charts and Observable: selection.join.

Shows the Iris Dataset.

Comments

Sign in to join the discussion.

MIT Licensed