Skip to main content
Public

Share visualization

Loading preview…

Fork of Butter Macronutrients

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

Fork of Butter Macronutrients

0
224cs077@kpriet.ac.in
Last edited Aug 18, 2025
Created on Aug 18, 2025
Forked from Clickable Circles

This example shows a reusable pie chart that displays two different macronutrient datasets, toggled by a button. The chart renders SVG arcs with white text labels at each slice’s centroid, using `d3.pie()` and `d3.arc()`. It demonstrates a function-based reusable chart pattern with getter/setter methods for width, height, value, label, and color scales. The `d3.schemeCategory10` ordinal scale assigns colors to slices, and the button switches between the two sample datasets.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed