Viewing a saved revision (read-only)
55a8a5e0dca244fcb811a9b6e6c49ba5
Reusable ScatterPlot of the dataset
This interactive scatter plot visualizes the relationship between the year and sales figures of various chocolate products, with a focus on Snickers bars, using D3.js. The visualization cycles through four different product categories—Kinder Joy, Twix, Cadbury, and Snickers—updating the y-axis every 3 seconds while maintaining the year on the x-axis. Rendered as an animated SVG, the chart features a clean, dark-themed design with clearly labeled axes and a dynamic title that updates to reflect the currently displayed product. The reusable chart function allows for flexible data binding and transitions, making it easy to adapt to similar datasets.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.