From eeb4942d7da9941cb91fab1fc68d81b8770bc56d Mon Sep 17 00:00:00 2001
From: vrill <52007698+vrill@users.noreply.github.com>
Date: Sun, 17 Oct 2021 00:21:34 +0200
Subject: [PATCH 1/4] First and final commit.
---
README.md | 11 +++---
code/chart.js | 36 +++++++++++++++++--
code/index.html | 33 ++++++++++++++----
code/script.js | 79 ++++++++++++++++++++++++++++++++++++++++++
code/style.css | 91 ++++++++++++++++++++++++++++++++++++++++++++++++-
5 files changed, 236 insertions(+), 14 deletions(-)
diff --git a/README.md b/README.md
index 1613a3b0..051b5bb6 100644
--- a/README.md
+++ b/README.md
@@ -1,13 +1,14 @@
# GitHub Tracker
-Replace this readme with your own information about your project.
-
-Start by briefly describing the assignment in a sentence or two. Keep it short and to the point.
+The assignment was to create a tracker of our GitHub repositories, using their API. Flesh it out with profile name & avatar, commits per repo and a chart among a few more things.
## 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?
+We had to fetch the data from the GitHub API, parse it and present it on our page. With a lot of repositories and objects in general, we had to apply a few filters in order to find the ones we want to use.
+
+The Rate Limit of the API (60 per hour) had me frustrated more than once. However, it was good practice to be more thorough when coding; to rely less on the Live Server output showing you small changes. DevTools is a good alternative to try iterative type of improvements.
+
+Had the Rate Limit not been such a time sink, I would've spent more time pulling different types of data in & presenting it, sorting of the projects, and styling.
## 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/chart.js b/code/chart.js
index 92e85a30..a5c09205 100644
--- a/code/chart.js
+++ b/code/chart.js
@@ -1,4 +1,36 @@
-//DOM-selector for the canvas 👇
const ctx = document.getElementById('chart').getContext('2d')
+const technigoProjects = 20
-//"Draw" the chart here 👇
+const drawBarChart = (repos) => {
+ new Chart(ctx, {
+ type: 'doughnut',
+ data: {
+ labels: [
+ 'Technigo projects',
+ 'Finished projects'
+ ],
+ datasets: [
+ {
+ data: [
+ technigoProjects,
+ repos.length
+ ],
+ backgroundColor: [
+ '#d5a7b6',
+ '#5c7fe9'
+ ]
+ }
+ ]
+ },
+ options: {
+ plugins: {
+ legend: {
+ display: true,
+ labels: {
+ color: 'rgb(0, 0, 0)'
+ }
+ }
+ },
+ },
+ })
+}
\ No newline at end of file
diff --git a/code/index.html b/code/index.html
index 2fb5e0ae..8700a4e8 100644
--- a/code/index.html
+++ b/code/index.html
@@ -1,21 +1,42 @@
+