🌍 Public
Viewing a saved revision (read-only)
3dc306800ddd41e0ab12a364969962ff
Claude 3.7 Test
This stacked bar chart displays four groups with five categorical segments each, using a harmonious color palette with white strokes between segments. The visualization includes grid lines behind the bars, axes with labels, a legend, and a title. Built with D3.js v7, the code uses d3.stack(), d3.scaleBand(), and d3.scaleLinear() to generate the chart, with data hardcoded in the script and rendered as SVG that fills the browser window.
AI-generated descriptionD3 Pie Chart Example
This is a simple example that demonstrates how to create a pie chart using D3.js. The visualization includes:
- A pie chart with 5 categories
- Percentage labels inside each slice
- A legend showing each category
- A title
The SVG is set to fill the entire page, and each slice has a different color with a white stroke for better visibility.
Features
- Responsive layout that fills the browser window
- Color-coded pie slices
- Percentage labels
- Legend showing category names
Running the Example
- Install dependencies:
npm install - Build the project:
npm run build - Open index.html in your browser