From 1e7cd77fed23e76fe4cafc4d7bd5c829813696ba Mon Sep 17 00:00:00 2001
From: Marianne Ardin <55622908+MarianneArdin@users.noreply.github.com>
Date: Sun, 27 Feb 2022 16:35:53 +0100
Subject: [PATCH 1/4] new project
---
README.md | 15 +++++---
code/.gitignore | 1 +
code/chart.js | 25 +++++++++++--
code/index.html | 37 ++++++++++++++++---
code/script.js | 96 +++++++++++++++++++++++++++++++++++++++++++++++++
code/style.css | 82 ++++++++++++++++++++++++++++++++++++++++--
6 files changed, 243 insertions(+), 13 deletions(-)
create mode 100644 code/.gitignore
diff --git a/README.md b/README.md
index 1613a3b0..c564ca8f 100644
--- a/README.md
+++ b/README.md
@@ -1,13 +1,20 @@
# GitHub Tracker
+Requirements:
-Replace this readme with your own information about your project.
+- A list of all repos that are forked from Technigo
+- Your username and profile picture
+- Most recent update (push) for each repo
+- Name of your default branch for each repo
+- URL to the actual GitHub repo
+- Number of commits for each repo
+- It should be responsive (mobile first)
+- A visualisation, for example through a pie chart, of how many projects you've done so far, compared to how many you will do (in total it will be 19 weekly projects 🥳) using [Chart.js](https://www.chartjs.org/).
-Start by briefly describing the assignment in a sentence or two. Keep it short and to the point.
## The problem
-Describe how you approached to problem, and what tools and techniques you used to solve it. How did you plan? What technologies did you use? If you had more time, what would be next?
+This project wasn't easy to get my head around. It took me a while to get all fetches to show. I also struggled a bit with the chart.
## View it live
-Every project should be deployed somewhere. Be sure to include the link to the deployed project so that the viewer can click around and see what it's all about.
+
diff --git a/code/.gitignore b/code/.gitignore
new file mode 100644
index 00000000..1c453411
--- /dev/null
+++ b/code/.gitignore
@@ -0,0 +1 @@
+token.js
\ No newline at end of file
diff --git a/code/chart.js b/code/chart.js
index 92e85a30..0acaedd5 100644
--- a/code/chart.js
+++ b/code/chart.js
@@ -1,4 +1,23 @@
-//DOM-selector for the canvas 👇
-const ctx = document.getElementById('chart').getContext('2d')
+//DOM-selector for the canvas
-//"Draw" the chart here 👇
+//Chart showing completed and remaining projects
+
+const drawChart = (numberOfProjects) => {
+ const ctx = document.getElementById('chart').getContext('2d')
+ const config = {
+ type: "pie",
+ data: {
+ labels: ["Projects completed", "Projects remaining"],
+ datasets:[{
+ label: "Technigo Projects",
+ data: [numberOfProjects, 19 - numberOfProjects],
+ backgroundColor:["rgb(255,255,255)", "rgb(102,153,153)"],
+ hoverOffset: 4,
+ }]
+ }
+ }
+
+const chart = new Chart(document.getElementById('chart'),
+config);
+
+}
\ No newline at end of file
diff --git a/code/index.html b/code/index.html
index 2fb5e0ae..4ded4b97 100644
--- a/code/index.html
+++ b/code/index.html
@@ -6,15 +6,44 @@