-
Notifications
You must be signed in to change notification settings - Fork 131
Project Github Tracker - Michael #87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
michaelchangdk
wants to merge
32
commits into
Technigo:main
Choose a base branch
from
michaelchangdk:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
b954439
playing around
michaelchangdk b2dab5f
finished quite a bit today
2074c87
finally figured out how to do this damn token thing
b839392
added --save to the chart install
15c4c35
trying the token again
00f4be8
trying the token again
fa46e8d
trying authentication again
5621144
trying authentication again again...
bff6b9a
think i finally figured out the damn authentication
7abbf60
trying once more
3e261f7
trying again
823c29d
delete files??
960218a
trying again
9f9544c
trying authentication again
6e9ab30
added a second chart & refactored javascript
7836bb1
added favicon
87ed030
refactored CSS
b883873
managed to fix axis and font family on charts
0deb73b
removed a tiny error
fb03b8e
trying to fix a small landscape error on safari ios
michaelchangdk 161b99e
trying one more thing for safari ios
michaelchangdk c230afc
trying one more fix for ios landscape
michaelchangdk 3933a72
final code cleanup
michaelchangdk f1c9cb1
https://github-tracker-week7.netlify.app/
michaelchangdk b0dc2e5
https://github-tracker-week7.netlify.app/
michaelchangdk 5447a01
Update README.md
michaelchangdk 22ae41c
https://github-tracker-week7.netlify.app/
michaelchangdk 33e6fdd
https://github-tracker-week7.netlify.app/
michaelchangdk aff40e8
https://github-tracker-week7.netlify.app/
michaelchangdk 787f4e3
https://github-tracker-week7.netlify.app/
michaelchangdk 1771d71
https://github-tracker-week7.netlify.app/
michaelchangdk cfb2fba
https://github-tracker-week7.netlify.app/
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| #API KEY | ||
| code/token.js | ||
|
|
||
| # Ignore node_modules folder | ||
| node_modules | ||
|
|
||
| # Ignore files related to API keys | ||
| .env |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 brief was to create a tracker over all of our forked technigo projects from Github, as well as a chart showing our current progress. | ||
|
|
||
| ## 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 first tried the API and played around to try to find the different data I would need, and where I would find the links to the rest of the fetches I needed. After feeling comfortable with where I could find the different information I needed, I began setting up my javascript. I didn't spend much time on design this week, and I struggled a bit with the chart.js documentation, but in the end I was very satisfied with the solutions I came up with. I also spent some time debugging a few small issues I had and refactoring my code to make it more readable. | ||
|
|
||
| ## 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-week7.netlify.app |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,49 @@ | ||
| //DOM-selector for the canvas 👇 | ||
| const ctx = document.getElementById('chart').getContext('2d') | ||
| // Global Font Family for Chart | ||
| Chart.defaults.font.family = 'Roboto Mono, monospace'; | ||
|
|
||
| //"Draw" the chart here 👇 | ||
| //DOM-selector | ||
| const ctx = document.getElementById('myChart') | ||
|
|
||
| //Drawing the doughnut chart | ||
| const completedProjects = (complete) => { | ||
| const data = { | ||
| labels: [ | ||
| `Completed Projects`, | ||
| `Incomplete Projects`, | ||
| ], | ||
| // Pulls complete from script.js | ||
| datasets: [{ | ||
| data: [complete, (19 - complete)], | ||
| backgroundColor: [ | ||
| '#2d2e2f', | ||
| '#DCD8DC' | ||
| ], | ||
| hoverOffset: 8, | ||
| hoverBorderColor: [ | ||
| '#FFFFFF' | ||
| ] | ||
| }] | ||
| }; | ||
|
|
||
| const config = { | ||
| type: 'doughnut', | ||
| data: data, | ||
| options: { | ||
| plugins: { | ||
| legend: { | ||
| position: 'top', | ||
| labels: { | ||
| font: { | ||
| size: 16, | ||
| }, | ||
| } | ||
| }, | ||
| } | ||
| } | ||
| }; | ||
|
|
||
| const myChart = new Chart( | ||
| ctx, | ||
| config, | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,235 @@ | ||
| //DOM-selector for sprint chart | ||
| const sprint = document.getElementById('sprintChart') | ||
|
|
||
| // Date Consts (In Epoch - Milliseconds) | ||
| const feb21 = 1645401600000 | ||
| const feb28 = 1646006400000 | ||
| const mar7 = 1646611200000 | ||
| const mar14 = 1647216000000 | ||
| const mar21 = 1647820800000 | ||
| const mar28 = 1648425600000 | ||
| const apr4 = 1649030400000 | ||
| const apr11 = 1649635200000 | ||
| const apr18 = 1650240000000 | ||
| const apr25 = 1650844800000 | ||
| const may2 = 1651449600000 | ||
| const may9 = 1652054400000 | ||
| const may16 = 1652659200000 | ||
| const may23 = 1653264000000 | ||
| const may30 = 1653868800000 | ||
| const jun6 = 1654473600000 | ||
| const jun13 = 1655078400000 | ||
| const jun20 = 1655683200000 | ||
|
|
||
| // Let declarations | ||
| let sprint1 | ||
| let sprint2 | ||
| let sprint3 | ||
| let sprint4 | ||
| let sprint5 | ||
| let sprint6 | ||
| let colors = [] | ||
| let now = Date.now() | ||
|
|
||
| // Function for determining date & setting sprint data and colors on bar chart | ||
| const dataColors = () => { | ||
| // If statements for sprints | ||
| if (now > feb21 && now < feb28) { | ||
| sprint1 = 4; | ||
| sprint2 = 3; | ||
| sprint3 = 0; | ||
| sprint4 = 0; | ||
| sprint5 = 0; | ||
| sprint6 = 0; | ||
| colors = ['#2d2e2f', '#DCD8DC', '#DCD8DC', '#DCD8DC', '#DCD8DC', '#DCD8DC'] | ||
| } if (now > feb28 && now < mar7) { | ||
| sprint1 = 4; | ||
| sprint2 = 4; | ||
| sprint3 = 0; | ||
| sprint4 = 0; | ||
| sprint5 = 0; | ||
| sprint6 = 0; | ||
| colors = ['#2d2e2f', '#2d2e2f', '#DCD8DC', '#DCD8DC', '#DCD8DC', '#DCD8DC'] | ||
| } if (now > mar7 && now < mar14) { | ||
| sprint1 = 4; | ||
| sprint2 = 4; | ||
| sprint3 = 1; | ||
| sprint4 = 0; | ||
| sprint5 = 0; | ||
| sprint6 = 0; | ||
| colors = ['#2d2e2f', '#2d2e2f', '#DCD8DC', '#DCD8DC', '#DCD8DC', '#DCD8DC'] | ||
| } if (now > mar14 && now < mar21) { | ||
| sprint1 = 4; | ||
| sprint2 = 4; | ||
| sprint3 = 2; | ||
| sprint4 = 0; | ||
| sprint5 = 0; | ||
| sprint6 = 0; | ||
| colors = ['#2d2e2f', '#2d2e2f', '#DCD8DC', '#DCD8DC', '#DCD8DC', '#DCD8DC'] | ||
| } if (now > mar21 && now < mar28) { | ||
| sprint1 = 4; | ||
| sprint2 = 4; | ||
| sprint3 = 3; | ||
| sprint4 = 0; | ||
| sprint5 = 0; | ||
| sprint6 = 0; | ||
| colors = ['#2d2e2f', '#2d2e2f', '#DCD8DC', '#DCD8DC', '#DCD8DC', '#DCD8DC'] | ||
| } if (now > mar28 && now < apr4) { | ||
| sprint1 = 4; | ||
| sprint2 = 4; | ||
| sprint3 = 4; | ||
| sprint4 = 0; | ||
| sprint5 = 0; | ||
| sprint6 = 0; | ||
| colors = ['#2d2e2f', '#2d2e2f', '#2d2e2f', '#DCD8DC', '#DCD8DC', '#DCD8DC'] | ||
| } if (now > apr4 && now < apr11) { | ||
| sprint1 = 4; | ||
| sprint2 = 4; | ||
| sprint3 = 4; | ||
| sprint4 = 1; | ||
| sprint5 = 0; | ||
| sprint6 = 0; | ||
| colors = ['#2d2e2f', '#2d2e2f', '#2d2e2f', '#DCD8DC', '#DCD8DC', '#DCD8DC'] | ||
| } if (now > apr11 && now < apr18) { | ||
| sprint1 = 4; | ||
| sprint2 = 4; | ||
| sprint3 = 4; | ||
| sprint4 = 2; | ||
| sprint5 = 0; | ||
| sprint6 = 0; | ||
| colors = ['#2d2e2f', '#2d2e2f', '#2d2e2f', '#DCD8DC', '#DCD8DC', '#DCD8DC'] | ||
| } if (now > apr18 && now < apr25) { | ||
| sprint1 = 4; | ||
| sprint2 = 4; | ||
| sprint3 = 4; | ||
| sprint4 = 3; | ||
| sprint5 = 0; | ||
| sprint6 = 0; | ||
| colors = ['#2d2e2f', '#2d2e2f', '#2d2e2f', '#DCD8DC', '#DCD8DC', '#DCD8DC'] | ||
| } if (now > apr25 && now < may2) { | ||
| sprint1 = 4; | ||
| sprint2 = 4; | ||
| sprint3 = 4; | ||
| sprint4 = 4; | ||
| sprint5 = 0; | ||
| sprint6 = 0; | ||
| colors = ['#2d2e2f', '#2d2e2f', '#2d2e2f', '#2d2e2f', '#DCD8DC', '#DCD8DC'] | ||
| } if (now > may2 && now < may9) { | ||
| sprint1 = 4; | ||
| sprint2 = 4; | ||
| sprint3 = 4; | ||
| sprint4 = 4; | ||
| sprint5 = 1; | ||
| sprint6 = 0; | ||
| colors = ['#2d2e2f', '#2d2e2f', '#2d2e2f', '#2d2e2f', '#DCD8DC', '#DCD8DC'] | ||
| } if (now > may9 && now < may16) { | ||
| sprint1 = 4; | ||
| sprint2 = 4; | ||
| sprint3 = 4; | ||
| sprint4 = 4; | ||
| sprint5 = 2; | ||
| sprint6 = 0; | ||
| colors = ['#2d2e2f', '#2d2e2f', '#2d2e2f', '#2d2e2f', '#DCD8DC', '#DCD8DC'] | ||
| } if (now > may16 && now < may23) { | ||
| sprint1 = 4; | ||
| sprint2 = 4; | ||
| sprint3 = 4; | ||
| sprint4 = 4; | ||
| sprint5 = 3; | ||
| sprint6 = 0; | ||
| colors = ['#2d2e2f', '#2d2e2f', '#2d2e2f', '#2d2e2f', '#DCD8DC', '#DCD8DC'] | ||
| } if (now > may23 && now < may30) { | ||
| sprint1 = 4; | ||
| sprint2 = 4; | ||
| sprint3 = 4; | ||
| sprint4 = 4; | ||
| sprint5 = 4; | ||
| sprint6 = 0; | ||
| colors = ['#2d2e2f', '#2d2e2f', '#2d2e2f', '#2d2e2f', '#2d2e2f', '#DCD8DC'] | ||
| } if (now > may30 && now < jun6) { | ||
| sprint1 = 4; | ||
| sprint2 = 4; | ||
| sprint3 = 4; | ||
| sprint4 = 4; | ||
| sprint5 = 4; | ||
| sprint6 = 1; | ||
| colors = ['#2d2e2f', '#2d2e2f', '#2d2e2f', '#2d2e2f', '#2d2e2f', '#DCD8DC'] | ||
| } if (now > jun6 && now < jun13) { | ||
| sprint1 = 4; | ||
| sprint2 = 4; | ||
| sprint3 = 4; | ||
| sprint4 = 4; | ||
| sprint5 = 4; | ||
| sprint6 = 2; | ||
| colors = ['#2d2e2f', '#2d2e2f', '#2d2e2f', '#2d2e2f', '#2d2e2f', '#DCD8DC'] | ||
| } if (now > jun13 && now < jun20) { | ||
| sprint1 = 4; | ||
| sprint2 = 4; | ||
| sprint3 = 4; | ||
| sprint4 = 4; | ||
| sprint5 = 4; | ||
| sprint6 = 3; | ||
| colors = ['#2d2e2f', '#2d2e2f', '#2d2e2f', '#2d2e2f', '#2d2e2f', '#DCD8DC'] | ||
| } else if (now > jun20) { | ||
| sprint1 = 4; | ||
| sprint2 = 4; | ||
| sprint3 = 4; | ||
| sprint4 = 4; | ||
| sprint5 = 4; | ||
| sprint6 = 4; | ||
| colors = ['#2d2e2f', '#2d2e2f', '#2d2e2f', '#2d2e2f', '#2d2e2f', '#2d2e2f'] | ||
| } | ||
| } | ||
|
|
||
| //Chart function | ||
| const sprintProgress = () => { | ||
|
|
||
| // Run dataColors for determining sprint progress & bar colors | ||
| dataColors(); | ||
|
|
||
| const data = { | ||
| labels: [ | ||
| 'Sprint 1', | ||
| 'Sprint 2', | ||
| 'Sprint 3', | ||
| 'Sprint 4', | ||
| 'Sprint 5', | ||
| 'Sprint 6' | ||
| ], | ||
| datasets: [{ | ||
| data: [sprint1, sprint2, sprint3, sprint4, sprint5, sprint6], | ||
| backgroundColor: colors, | ||
| hoverOffset: 8, | ||
| hoverBorderColor: [ | ||
| '#FFFFFF' | ||
| ], | ||
| }] | ||
| }; | ||
|
|
||
| const config = { | ||
| type: 'bar', | ||
| data: data, | ||
| options: { | ||
| scales: { | ||
| x: { | ||
| ticks: { | ||
| stepSize: 1, | ||
| } | ||
| } | ||
| }, | ||
| indexAxis: 'y', | ||
| plugins: { | ||
| legend: { | ||
| display: false, | ||
| }, | ||
| } | ||
| } | ||
| }; | ||
|
|
||
| const sprintChart = new Chart( | ||
| sprint, | ||
| config, | ||
| ); | ||
| } | ||
|
|
||
| sprintProgress(); | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The HOURS that must have gone into this is just astounding, such patience and brains!! The result also looks so good, even though as you had noticed, once October comes it'll need some small changes, but by then you'll be an actual developer god!