Viewing a saved revision (read-only)
4afbac338692495d823c672f99519296
line chart using d3
This example uses D3.js v7 to create a line chart visualizing restaurant profit trends over recorded years. It loads CSV data from a GitHub gist and maps the year and profit columns to a linear x-axis and y-axis, rendering the line as an SVG path with a steelblue stroke. The chart includes axes labeled "Recorded Year" and "Profit In Million," plus an interactive tooltip that displays the data values on mouse movement. The SVG container is configured with custom margins, and the entire chart is styled with a black background and white text via CSS.
AI-generated descriptionA line chart in D3
BTW: The data was simplified to help with creating this visualization.
Link to original dataset: https://corgis-edu.github.io/corgis/csv/global_development/