diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index e8783bfe..00000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "liveServer.settings.port": 5505 -} \ No newline at end of file diff --git a/README.md b/README.md index 1613a3b0..d7fd20e8 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,10 @@ # GitHub Tracker -Replace this readme with your own information about your project. +A simple copy of GitHub. With that project I learned how to fetch an API, how JavaScript functions communicate with each others and how to display data from API. -Start by briefly describing the assignment in a sentence or two. Keep it short and to the point. +UPDATE 2.0 +For this update of ther project, I added a search functionality. -## The problem +# View it live -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? - -## 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. +Demo: https://github-tracker-by-darya.netlify.app/ diff --git a/code/chart.js b/code/chart.js index 92e85a30..8dfb8629 100644 --- a/code/chart.js +++ b/code/chart.js @@ -1,4 +1,19 @@ -//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 = (number) => { + const config = { + type: 'doughnut', + data: { + labels: ['Done', 'Todo'], + datasets: [ + { + label: 'My first Dataset', + data: [number, 20 - number], // divide donut to 2 different parts + backgroundColor: ['rgb(255, 99, 132)', 'rgb(54, 162, 235)'], + hoverOffset: 4, + }, + ], + }, + }; + const myChart = new Chart(ctx, config); +}; diff --git a/code/index.html b/code/index.html index 2fb5e0ae..4078fe5a 100644 --- a/code/index.html +++ b/code/index.html @@ -1,21 +1,53 @@ -
- - - -