From beb1a05f9ca3786fa67b575003960e307c1627a2 Mon Sep 17 00:00:00 2001 From: Gavin Fenton Date: Wed, 1 Jan 2025 20:32:02 +0000 Subject: [PATCH] Fix typos in 5.3-Legend/../stacked-bars.js --- chapter_05/5.3-Legend/end/js/stacked-bars.js | 10 +++++----- chapter_05/5.3-Legend/start/js/stacked-bars.js | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/chapter_05/5.3-Legend/end/js/stacked-bars.js b/chapter_05/5.3-Legend/end/js/stacked-bars.js index 7c31513..c249594 100644 --- a/chapter_05/5.3-Legend/end/js/stacked-bars.js +++ b/chapter_05/5.3-Legend/end/js/stacked-bars.js @@ -1,5 +1,5 @@ const drawStackedBars = (data) => { - + /*******************************/ /* Append the containers */ @@ -50,10 +50,10 @@ const drawStackedBars = (data) => { /*******************************/ /* Append the rectangles */ /*******************************/ - annotatedData.forEach(serie => { + annotatedData.forEach(series => { innerChart .selectAll(`.bar-${series.key}`) - .data(serie) + .data(series) .join("rect") .attr("class", d => `bar-${series.key}`) .attr("x", d => xScale(d.data.year)) @@ -80,5 +80,5 @@ const drawStackedBars = (data) => { innerChart .append("g") .call(leftAxis); - -}; \ No newline at end of file + +}; diff --git a/chapter_05/5.3-Legend/start/js/stacked-bars.js b/chapter_05/5.3-Legend/start/js/stacked-bars.js index 7c31513..c249594 100644 --- a/chapter_05/5.3-Legend/start/js/stacked-bars.js +++ b/chapter_05/5.3-Legend/start/js/stacked-bars.js @@ -1,5 +1,5 @@ const drawStackedBars = (data) => { - + /*******************************/ /* Append the containers */ @@ -50,10 +50,10 @@ const drawStackedBars = (data) => { /*******************************/ /* Append the rectangles */ /*******************************/ - annotatedData.forEach(serie => { + annotatedData.forEach(series => { innerChart .selectAll(`.bar-${series.key}`) - .data(serie) + .data(series) .join("rect") .attr("class", d => `bar-${series.key}`) .attr("x", d => xScale(d.data.year)) @@ -80,5 +80,5 @@ const drawStackedBars = (data) => { innerChart .append("g") .call(leftAxis); - -}; \ No newline at end of file + +};