diff --git a/README.md b/README.md index 1613a3b0..0699b3bf 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,12 @@ # 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 aim of the project was to build a personal github tracker that would show my technigo-projects. This was done by fetching and displaying data from API's, using forEach, filter and find methods. A doughnut chart was also implemented to give a visual display of the amount of projects done. In terms of styling, a CSS grid and a hero header was used. ## 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? +In the beginning of the project it felt like there were a lot of API fetches that needed to be done. It was also hard to understand were to place, and where to call the different functions. +The solution were to scale down the project and do small chunks at a time. ## 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://github-tracker-fatima.netlify.app/ diff --git a/code/assets/background.png b/code/assets/background.png new file mode 100644 index 00000000..ed1f59ff Binary files /dev/null and b/code/assets/background.png differ diff --git a/code/chart.js b/code/chart.js index 92e85a30..cfbecc86 100644 --- a/code/chart.js +++ b/code/chart.js @@ -1,4 +1,24 @@ //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) => { + //This function is being called inside the getRepos function + + const config = { + type: "doughnut", + data: { + labels: ["P. Finished", "P. Left"], + datasets: [ + { + label: "My First Dataset", + data: [amount, 20 - amount], //1st number:the lenght of my repo array, 20(total projects I must do) minus the repo array + backgroundColor: ["#FFB319", "grey"], + hoverOffset: 4, + }, + ], + }, + }; + const myChart = new Chart(ctx, config); +}; diff --git a/code/index.html b/code/index.html index 2fb5e0ae..a3929c44 100644 --- a/code/index.html +++ b/code/index.html @@ -1,21 +1,81 @@ -
- - - -