Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Line_Chart_ChoclateSales

Public visualization

Viewing a saved revision (read-only)

34b22ba6beba419cabed7ac656e70b34

Fork of Line_Chart_ChoclateSales

0 stars1🌍 Public
RRahulChaitu999
Last edited Jul 3, 2022
Created on Jul 3, 2022

This D3.js line chart visualizes chocolate sales data from 2008 to 2021, plotting total sales against years. The chart uses SVG rendering within a React starter setup, with axes labeled "years" and "totalsales." The code loads CSV data via D3's `csv` function, transforms date strings using `d3.timeParse`, and builds the visualization with `scaleTime`, `scaleLinear`, `axisBottom`, `axisLeft`, and `line`. Grid lines and axis labels are styled through CSS, while the sales trend line is drawn in red.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.