Skip to main content
Public

Share visualization

Loading preview…

Mental Health Survey Pie Chart Project Momentum 5

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

Mental Health Survey Pie Chart Project Momentum 5

0
JJoe Rozman
Last edited Nov 26, 2024
Created on Nov 26, 2024

This interactive pie chart visualizes mental health survey data, showing the average of a selected metric (e.g., study satisfaction, anxiety) across categories of a chosen attribute (e.g., academic year, gender), with an optional filter for university. It uses the D3.js library to build the pie chart with the `pie` and `arc` generators, and employs `rollups` to compute group means. Dropdown menus and a reset button control the selections, while hover interactions display tooltips with the precise average value for each slice.

AI-generated description

An approximation of a line chart using D3.js!

Watch the video and study the code to learn about:

  • SVG Path Elements
  • fill, stroke, stroke-width
  • stroke-linecap, stroke-linejoin
  • Vanilla HTML SVG Paths
  • D3.line
  • AI Assist

See also:

Full Playlist: Constructing Visualizations

Comments

Sign in to join the discussion.

MIT Licensed