diff --git a/.vscode/settings.json b/.vscode/settings.json index e8783bfe..2e941084 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,4 @@ { - "liveServer.settings.port": 5505 -} \ No newline at end of file + "liveServer.settings.port": 5505, + "prettier.arrowParens": "avoid" +} diff --git a/README.md b/README.md index 1613a3b0..61db2b2d 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. +The assignment was to create a tracker website for my github and fetch the projects and relevant information. ## 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 had a problem with knowing how to start writing the JavaScript. I took a look at last week's project (project-weather-app) and used that as a guide for the API fetch. ## 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. +Link to deployed website: https://githubtrackerefstasia.netlify.app/ diff --git a/code/chart.js b/code/chart.js index 92e85a30..9b296c43 100644 --- a/code/chart.js +++ b/code/chart.js @@ -1,4 +1,29 @@ //DOM-selector for the canvas 👇 -const ctx = document.getElementById('chart').getContext('2d') +const ctx = document.getElementById("chart").getContext("2d"); //"Draw" the chart here 👇 +Chart.defaults.font.size = 16; +Chart.defaults.color = "#5f939a"; + +const drawChart = amount => { + const config = { + type: "pie", + data: { + labels: ["finished projects", "projects left"], + + datasets: [ + { + label: "My First Dataset", + data: [amount, 20 - amount], + backgroundColor: ["#5F939A", "#D8AC9C"], + hoverOffset: 4, + hoverOpacity: 1, + borderColor: "#161616", + responsive: true, + maintainAspectRatio: false, + }, + ], + }, + }; + const myChart = new Chart(ctx, config); +}; diff --git a/code/index.html b/code/index.html index 2fb5e0ae..5d507e8f 100644 --- a/code/index.html +++ b/code/index.html @@ -1,21 +1,49 @@ -
- - - -