Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
D
DV-Project
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
almohanad.hafez
DV-Project
Commits
90f05a83
Commit
90f05a83
authored
Feb 11, 2025
by
Almouhannad Hafez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Edit index page
parent
c29464d5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
63 additions
and
2 deletions
+63
-2
index.html
index.html
+61
-0
style.css
src/css/style.css
+1
-1
stacked-bar-chart-helper.ts
src/ts/charts-helpers/stacked-bar-chart-helper.ts
+1
-1
No files found.
index.html
View file @
90f05a83
...
@@ -9,6 +9,67 @@
...
@@ -9,6 +9,67 @@
</head>
</head>
<body>
<body>
<div
class=
"container mt-5"
>
<h2
class=
"text-center"
>
Olympic Games Statistics Dashboard
</h2>
<div
class=
"accordion"
id=
"olympicStatsAccordion"
>
<div
class=
"accordion-item"
>
<h2
class=
"accordion-header"
id=
"headingOne"
>
<button
class=
"accordion-button"
type=
"button"
data-bs-toggle=
"collapse"
data-bs-target=
"#collapseOne"
aria-expanded=
"true"
aria-controls=
"collapseOne"
>
Medal Distribution by Country
</button>
</h2>
<div
id=
"collapseOne"
class=
"accordion-collapse collapse show"
aria-labelledby=
"headingOne"
data-bs-parent=
"#olympicStatsAccordion"
>
<div
class=
"accordion-body"
>
<div
class=
"chart-description"
>
This chart shows the distribution of medals won by different countries in the Olympic Games.
</div>
<div
id=
"medalDistributionChart"
></div>
</div>
</div>
</div>
<div
class=
"accordion-item"
>
<h2
class=
"accordion-header"
id=
"headingTwo"
>
<button
class=
"accordion-button collapsed"
type=
"button"
data-bs-toggle=
"collapse"
data-bs-target=
"#collapseTwo"
aria-expanded=
"false"
aria-controls=
"collapseTwo"
>
Medal Distribution by Country
</button>
</h2>
<div
id=
"collapseTwo"
class=
"accordion-collapse collapse"
aria-labelledby=
"headingTwo"
data-bs-parent=
"#olympicStatsAccordion"
>
<div
class=
"accordion-body"
>
<div
class=
"chart-description"
>
This chart shows the distribution of medals won by different countries in the Olympic Games.
</div>
<canvas
id=
"topAthletesChart"
></canvas>
</div>
</div>
</div>
<div
class=
"accordion-item"
>
<h2
class=
"accordion-header"
id=
"headingThree"
>
<button
class=
"accordion-button collapsed"
type=
"button"
data-bs-toggle=
"collapse"
data-bs-target=
"#collapseThree"
aria-expanded=
"false"
aria-controls=
"collapseThree"
>
Medal Distribution by Country
</button>
</h2>
<div
id=
"collapseThree"
class=
"accordion-collapse collapse"
aria-labelledby=
"headingThree"
data-bs-parent=
"#olympicStatsAccordion"
>
<div
class=
"accordion-body"
>
<div
class=
"chart-description"
>
This chart shows the distribution of medals won by different countries in the Olympic Games.
</div>
<canvas
id=
"sportsParticipationChart"
></canvas>
</div>
</div>
</div>
</div>
</div>
<script
type=
"module"
src=
"/src/ts/main.ts"
></script>
<script
type=
"module"
src=
"/src/ts/main.ts"
></script>
</body>
</body>
...
...
src/css/style.css
View file @
90f05a83
...
@@ -6,7 +6,7 @@ body {
...
@@ -6,7 +6,7 @@ body {
padding
:
0
;
padding
:
0
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
overflow-x
:
hidden
;
overflow-x
:
hidden
;
background
:
#f
7f7f7
;
background
:
#f
8f9fa
;
}
}
#stacked-bar-chart-legend
.legend-item
:hover
{
#stacked-bar-chart-legend
.legend-item
:hover
{
...
...
src/ts/charts-helpers/stacked-bar-chart-helper.ts
View file @
90f05a83
...
@@ -51,7 +51,7 @@ export class StackedBarChartHelper {
...
@@ -51,7 +51,7 @@ export class StackedBarChartHelper {
public
appendChart
()
{
public
appendChart
()
{
// Add div container
// Add div container
this
.
container
=
d3
.
select
(
'
body
'
)
this
.
container
=
d3
.
select
(
'
#medalDistributionChart
'
)
.
append
(
'div'
)
.
append
(
'div'
)
.
attr
(
'class'
,
'container'
)
// bootstrap
.
attr
(
'class'
,
'container'
)
// bootstrap
.
attr
(
'style'
,
'width: fit-content;'
)
.
attr
(
'style'
,
'width: fit-content;'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment