diff --git a/README.md b/README.md index 1613a3b0..447c913d 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,11 @@ # 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. +This weeks project where a deep dive into more APIs and to start using npm,unit tests and chart.js. ## 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? +I started this weeks projects as usuals, looking through all information and reading the instructions.After that I did start the project by fecthing API from my gitHub repositories etc. It was hard for me to grasp what the assignment was and what I was suppose to do! So I spent a lot of time googling on the wrong search words and just trying to understand the instructions and trying to wrap my head around the task. I asked my teammates for help. ## 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://tracker-bootcamp2022.netlify.app/ diff --git a/code/chart.js b/code/chart.js index 92e85a30..c9fb3d29 100644 --- a/code/chart.js +++ b/code/chart.js @@ -1,4 +1,21 @@ //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 data = { + labels: ["completed projects", "projects left"], + datasets: [ + { + backgroundColor: ["grey", "black"], + data: [amount, 19 - amount], + hoverOffSet: 4, + }, + ], + }; + const config = { + type: "doughnut", + data: data, + }; + const myChart = new Chart(ctx, config); +}; diff --git a/code/index.html b/code/index.html index 2fb5e0ae..fd88239d 100644 --- a/code/index.html +++ b/code/index.html @@ -1,21 +1,38 @@ -
- - - -