From b63f74c3841a02b6555309bd69b74306743c1111 Mon Sep 17 00:00:00 2001 From: pdetli <74938586+pdetli@users.noreply.github.com> Date: Tue, 28 Sep 2021 16:10:22 +0200 Subject: [PATCH 1/6] followed jennie --- code/TODO list | 4 ++++ code/chart.js | 24 ++++++++++++++++++++++++ code/index.html | 3 +++ code/script.js | 30 ++++++++++++++++++++++++++++++ 4 files changed, 61 insertions(+) create mode 100644 code/TODO list diff --git a/code/TODO list b/code/TODO list new file mode 100644 index 00000000..9afac7b7 --- /dev/null +++ b/code/TODO list @@ -0,0 +1,4 @@ +fetch the repos and console log +get them in the browser +filter out the technigo repos +test chart library \ No newline at end of file diff --git a/code/chart.js b/code/chart.js index 92e85a30..f51228c7 100644 --- a/code/chart.js +++ b/code/chart.js @@ -2,3 +2,27 @@ const ctx = document.getElementById('chart').getContext('2d') //"Draw" the chart here 👇 + +const drawChart = (amount) => { + const config = { + type: 'doughnut', + data: { + labels: [ + 'Finished projects', + 'Projects left' + ], + datasets: [{ + label: 'My First Dataset', + data: [amount, 20-amount], + backgroundColor: [ + 'rgb(255, 99, 132)', + 'rgb(54, 162, 235)', + ], + hoverOffset: 4 + }] + }, + }; + + const myChart = new Chart(ctx, config ); +} + diff --git a/code/index.html b/code/index.html index 2fb5e0ae..9e516c43 100644 --- a/code/index.html +++ b/code/index.html @@ -15,6 +15,9 @@