diff --git a/README.md b/README.md index 1613a3b0..efcab786 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. +https://marianneardin-githubtracker.netlify.app/ 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..d1b6a82a 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); +}; diff --git a/code/index.html b/code/index.html index 2fb5e0ae..b33709c2 100644 --- a/code/index.html +++ b/code/index.html @@ -1,21 +1,46 @@ -
- - - -