pie
✓ Published1🌍 Public
This pie chart compares the number of high-price days (above $100) versus low-price days in Apple’s stock history. The code loads CSV data from a Plotly-hosted dataset, counts occurrences in each category, and renders an SVG pie chart using d3.pie and d3.arc. A d3.scaleOrdinal with d3.schemeCategory10 assigns colors to the two slices, and labels are positioned at each arc’s centroid via arc.centroid. A legend is built with plain HTML divs, replicating the slice colors. The chart is minimal, showing only the split between two price thresholds without additional axes or time detail.
AI-generated descriptionMIT Licensed