Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

V5 Reusable Examples - Nested data, Chart (line) series - Example 2 (unnested)

Public visualization

Viewing a saved revision (read-only)

236edfb7d2b14211aef68a6751a19174

V5 Reusable Examples - Nested data, Chart (line) series - Example 2 (unnested)

0 stars1🌍 Public
JJimMaltby
Last edited Nov 9, 2021
Created on Oct 31, 2021

This example demonstrates a simple line chart using unnested data, plotting monthly sales figures for three fruit categories (strawberry, grape, blueberry) as a single red line. The chart uses the D3.js v5 library with a reusable chart structure based on the ProD3 pattern, incorporating d3.scaleTime for the x-axis, d3.scaleLinear for the y-axis, and d3.line to generate the SVG path. The visualization includes labeled axes and a title, with data loaded from a CSV file containing Month, Sales, and Fruit columns.

AI-generated description

An exploration of nesting data. 1 - simple line chart.

Using the tutorial and series of charts described here:

https://amber.rbind.io/2017/05/02/nesting/

d3.js ver: v5.

D3 pattern used:

Addtional help from and aknowledgement to: