diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 00000000..72a188b1 Binary files /dev/null and b/.DS_Store differ diff --git a/README.md b/README.md index 1613a3b0..2c46cc7c 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,15 @@ # 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 this week was to create a place to keep track of the GitHub repositories that we are using during the Technigo Boot Camp. For this we were instructed to fetch data using the GitHub API:s and then style the page to be responsive. ## 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? +The challenge this week was to adapt to the fact that the GitHub API has a rate limit of 60 requests per hour. This means that when you are fetching all the requested data in the minimum requirements, you can only reload the page a few times before you reach the API limits... + +When I had added the minimum requirements, I therefore inserted dummmy code to the html to be able to style the page according to my likings without running into the 403 issues and the content not being displayed. I also noticed that the API request limit is applied at the network level and that I was able to work around the limitations by connecting to the mobile network on the different cell phones available in my household. + +This week I only had time to work on the blue levels requirements. If I had more time, I would like to also add some of the red level requirements, for example make it possible to sort my list of repos in different ways and to disply the comments I got from each pull request. ## 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://molbimien-week-7-project-github-tracker.netlify.app diff --git a/code/chart.js b/code/chart.js index 92e85a30..3c7e8eaa 100644 --- a/code/chart.js +++ b/code/chart.js @@ -1,4 +1,27 @@ //DOM-selector for the canvas ๐ -const ctx = document.getElementById('chart').getContext('2d') +const ctx = document.getElementById('chart').getContext('2d'); //"Draw" the chart here ๐ + +const drawChart = (amount) => { + const config = { + type: 'doughnut', + data: { + labels: [ + 'Completed projects', + 'Projects left to build', + ], + datasets: [{ + label: 'My Technigo projects', + data: [amount, 19-amount], + backgroundColor: [ + 'rgb(219,57,141)', + 'rgb(0,255,255)', + ], + hoverOffset: 4 + }], + }, + }; + + const projectsChart = new Chart(ctx, config); +} diff --git a/code/index.html b/code/index.html index 2fb5e0ae..0194f8a0 100644 --- a/code/index.html +++ b/code/index.html @@ -4,18 +4,32 @@ -