diff --git a/.vscode/settings.json b/.vscode/settings.json index e8783bfe..d0a75e64 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,4 @@ { - "liveServer.settings.port": 5505 + "liveServer.settings.port": 5505, + "git.ignoreLimitWarning": true } \ No newline at end of file diff --git a/code/chart.js b/code/chart.js index 92e85a30..0dcfd0c5 100644 --- a/code/chart.js +++ b/code/chart.js @@ -1,4 +1,24 @@ //DOM-selector for the canvas 👇 -const ctx = document.getElementById('chart').getContext('2d') +const ctx = document.getElementById("chart").getContext("2d"); +Chart.defaults.font.size = 16; +Chart.defaults.color = "#ffffff"; //"Draw" the chart here 👇 +const drawChart = amount => { + const config = { + type: "doughnut", + data: { + labels: ["Finished Projects", "Projects Left"], + datasets: [ + { + label: "My First Dataset", + data: [amount, 20 - amount], + backgroundColor: ["#002929", "#545454"], + hoverOffset: 4, + }, + ], + }, + }; + + const myChart = new Chart(ctx, config); +}; diff --git a/code/index.html b/code/index.html index 2fb5e0ae..eadb8e60 100644 --- a/code/index.html +++ b/code/index.html @@ -1,21 +1,43 @@ -
- - - -