Skip to main content
100%

Activity6_question-3

✓ Published0🌍 Public
Kkandulasunny17@gmail.com
Last edited Oct 22, 2024
Created on Oct 22, 2024
Forked from Activity6_task3

This example displays a scatter plot of car data, showing the relationship between BMI (on the x-axis) and age (on the y-axis), with points colored by smoking status via a Tableau10 ordinal color scale. The visualization loads a CSV file from a GitHub repository using D3’s `csv` function, then applies linear scales with `scaleLinear` and renders circles as SVG elements. Axes are generated with `axisLeft` and `axisBottom`, while a legend is manually constructed to map colors to the smoking categories. The chart fills the browser window using `window.innerWidth` and `window.innerHeight`.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes