From f8f80ea89bec43f5b3e4cdc68facde2ec56a7f9f Mon Sep 17 00:00:00 2001 From: Yan Holtz Date: Thu, 8 Aug 2024 14:09:23 +0200 Subject: [PATCH] u --- pages/course/svg/path-element.tsx | 44 +++++++++++++++++++ .../SvgPathFirstAreaChartPractice/Graph.tsx | 5 +-- .../SvgPathFirstAreaChartSolution/Graph.tsx | 5 ++- 3 files changed, 49 insertions(+), 5 deletions(-) diff --git a/pages/course/svg/path-element.tsx b/pages/course/svg/path-element.tsx index a4262054..49b772d1 100644 --- a/pages/course/svg/path-element.tsx +++ b/pages/course/svg/path-element.tsx @@ -182,6 +182,50 @@ export default function Home() { practiceSandbox: 'exercise/SvgPathFirstLineChartPractice', solutionSandbox: 'exercise/SvgPathFirstLineChartSolution', }, + + { + title: ( + + Close a path with Z (and build your first area + chart) + + ), + whyItMatters: ( + <> +

+ The <path> element can be used to draw + extended lines or create closed shapes. +

+

+ To close a shape, add Z at the end of the{' '} + d attribute and use the fill{' '} + property to apply a color. +

+ + ), + toDo: ( + + ), + practiceSandbox: 'exercise/SvgPathFirstAreaChartPractice', + solutionSandbox: 'exercise/SvgPathFirstAreaChartSolution', + }, ]} /> diff --git a/viz/exercise/SvgPathFirstAreaChartPractice/Graph.tsx b/viz/exercise/SvgPathFirstAreaChartPractice/Graph.tsx index 603c8306..1d9985e7 100644 --- a/viz/exercise/SvgPathFirstAreaChartPractice/Graph.tsx +++ b/viz/exercise/SvgPathFirstAreaChartPractice/Graph.tsx @@ -2,10 +2,9 @@ export const Graph = () => { return ( ); diff --git a/viz/exercise/SvgPathFirstAreaChartSolution/Graph.tsx b/viz/exercise/SvgPathFirstAreaChartSolution/Graph.tsx index b4139d52..603c8306 100644 --- a/viz/exercise/SvgPathFirstAreaChartSolution/Graph.tsx +++ b/viz/exercise/SvgPathFirstAreaChartSolution/Graph.tsx @@ -2,9 +2,10 @@ export const Graph = () => { return ( );