diff --git a/README.md b/README.md index 1613a3b0..b2119f63 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,9 @@ # 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 was to create a GitHub tracker using Javascript and the GitHub API. ## 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 the project with doing a list of all the things I wanted to fetch from the API. I then started to fetch that data. My main struggle this week was Javascript, I find it hard to know how to create more complex structure of it. To solve my problems I googled, used StackOverflow and programmed togheter with classmates. If I had more time I would like to fetch some more data to display on my page to practice to use Javascript more. ## 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://emmas-github-tracker.netlify.app/ diff --git a/code/chart.js b/code/chart.js index 92e85a30..2deac33c 100644 --- a/code/chart.js +++ b/code/chart.js @@ -2,3 +2,28 @@ const ctx = document.getElementById('chart').getContext('2d') //"Draw" the chart here 👇 +const drawChart = (amount) => { + console.log("Draw chart with amount: " + amount) + const data = { + labels: [ + 'Completed', + 'Remaining' + ], + datasets: [ + { + backgroundColor: ['#A8DADC', '#457B9D'], + 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..77db8134 100644 --- a/code/index.html +++ b/code/index.html @@ -4,18 +4,35 @@ -