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
7494db58
Commit
7494db58
authored
Feb 13, 2025
by
Almouhannad Hafez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix charts ids
parent
33a14f23
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
7 deletions
+8
-7
index.html
index.html
+6
-5
multi-line-chart-helper.ts
src/ts/charts-helpers/multi-line-chart-helper.ts
+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 @
7494db58
...
...
@@ -30,7 +30,7 @@
<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
id=
"medalDistribution
ByCountry
Chart"
></div>
</div>
</div>
</div>
...
...
@@ -49,7 +49,7 @@
This chart illustrates the trend of total medals won over time, highlighting the changes in performance
across various Olympic Games.
</div>
<div
id=
"medal
sTrend
ByTimeChart"
></div>
<div
id=
"medal
Distribution
ByTimeChart"
></div>
</div>
</div>
</div>
...
...
@@ -58,22 +58,23 @@
<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
Medal Distribution by
Gender
</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 Game
s.
This chart shows the distribution of medals won by
over gender
s.
</div>
<canvas
id=
"
sportsParticipation
Chart"
></canvas>
<canvas
id=
"
medalDistributionByGender
Chart"
></canvas>
</div>
</div>
</div>
</div>
</div>
<script
type=
"module"
src=
"/src/ts/main.ts"
></script>
</body>
...
...
src/ts/charts-helpers/multi-line-chart-helper.ts
View file @
7494db58
...
...
@@ -56,7 +56,7 @@ export class MultiLineChartHelper {
public
appendChart
()
{
// Add div container
this
.
container
=
d3
.
select
(
'#medal
sTrend
ByTimeChart'
)
this
.
container
=
d3
.
select
(
'#medal
Distribution
ByTimeChart'
)
.
append
(
'div'
)
.
attr
(
'class'
,
'container'
)
.
attr
(
'style'
,
'width: fit-content;'
)
...
...
src/ts/charts-helpers/stacked-bar-chart-helper.ts
View file @
7494db58
...
...
@@ -51,7 +51,7 @@ export class StackedBarChartHelper {
public
appendChart
()
{
// Add div container
this
.
container
=
d3
.
select
(
'#medalDistributionChart'
)
this
.
container
=
d3
.
select
(
'#medalDistribution
ByCountry
Chart'
)
.
append
(
'div'
)
.
attr
(
'class'
,
'container'
)
// bootstrap
.
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