diff --git a/README.md b/README.md
index 1613a3b0..1f481a1e 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.
+This Github tracker project was made on week 7 for Technigo bootcamp.
+This week's goal was to deepen the knowledge about APIs and fetch some data using GitHub REST API documentation. So this Github tracker keeps track of the GitHub repos that we create during studies in Technigo.
## 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 really enjoyed fetching required information from API to my project and did not have any problems on the way. But it was a bit challenging to work with Chart.js and try some other types of chart, in my case I tried bar chart for repo sizes. This task required good JavaScript skills and understanding of local and global scopes as well as good uinderstanding of the documentation on configuration of charts. I'm very proud that I've tried some of requirements for red level and if I had more time I would add a modal popup for commit messages or comments for each repo.
## 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-julianiki.netlify.app/
diff --git a/code/chart.js b/code/chart.js
index 92e85a30..2e6bb5c2 100644
--- a/code/chart.js
+++ b/code/chart.js
@@ -1,4 +1,73 @@
//DOM-selector for the canvas 👇
const ctx = document.getElementById('chart').getContext('2d')
+const cty = document.getElementById('chartTwo').getContext('2d')
//"Draw" the chart here 👇
+
+const drawChart = (amount) => {
+ const config = {
+ type: 'doughnut', //what type of chart it is
+ data: {
+ labels: [
+ 'Finished projects',
+ 'Projects left',
+ ],
+ datasets: [{
+ label: 'Technigo projects',
+ data: [amount, 19 - amount],
+ backgroundColor: [
+ '#1e7898',
+ '#a8d5e5'
+ ],
+ hoverOffset: 4
+ }]
+ }
+ }
+ const myChart = new Chart(ctx, config);
+ // to inject it and put it in the browser (important part, needs to be here, where to put it, what to put)
+}
+
+const drawChartTwo = (repo) => {
+
+ const labels = repo.map((repo) => repo.name);
+ const data = repo.map((repo) => repo.size);
+
+ const config = {
+ type: 'bar',
+ data: {
+ labels,
+ datasets: [{
+ label: 'Repositories size (KB)',
+ data,
+ backgroundColor: [
+ 'rgba(255, 99, 132, 0.2)',
+ 'rgba(255, 159, 64, 0.2)',
+ 'rgba(255, 205, 86, 0.2)',
+ 'rgba(75, 192, 192, 0.2)',
+ 'rgba(54, 162, 235, 0.2)',
+ 'rgba(153, 102, 255, 0.2)',
+ 'rgba(201, 203, 207, 0.2)'
+ ],
+ borderColor: [
+ 'rgb(255, 99, 132)',
+ 'rgb(255, 159, 64)',
+ 'rgb(255, 205, 86)',
+ 'rgb(75, 192, 192)',
+ 'rgb(54, 162, 235)',
+ 'rgb(153, 102, 255)',
+ 'rgb(201, 203, 207)'
+ ],
+ borderWidth: 1
+ }]
+ },
+ options: {
+ scales: {
+ y: {
+ beginAtZero: true
+ }
+ }
+ },
+ }
+
+ const myChartTwo = new Chart(cty, config)
+}
diff --git a/code/images/chain.png b/code/images/chain.png
new file mode 100644
index 00000000..2737d4d0
Binary files /dev/null and b/code/images/chain.png differ
diff --git a/code/images/github-icon.png b/code/images/github-icon.png
new file mode 100644
index 00000000..5eb5bc2d
Binary files /dev/null and b/code/images/github-icon.png differ
diff --git a/code/images/location.png b/code/images/location.png
new file mode 100644
index 00000000..578aa906
Binary files /dev/null and b/code/images/location.png differ
diff --git a/code/index.html b/code/index.html
index 2fb5e0ae..d6c3c995 100644
--- a/code/index.html
+++ b/code/index.html
@@ -1,21 +1,38 @@
+
`
+
+ })
+}
+
+/*------Tried to do accordion, but did not have time to style it----*/
+// here is the function to display commit messages
+// getComments = (commentsURL, repo) => {
+// fetch(commentsURL)
+// .then(res => res.json())
+// .then(data => {
+// console.log(data)
+// document.getElementById(`${repo.name}-container-comments`).innerHTML += `
+//
+//