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
7879266f
Commit
7879266f
authored
Feb 14, 2025
by
Almouhannad Hafez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix hover effect in bars
parent
6a8379cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
stacked-bar-chart.ts
src/ts/charts/stacked-bar-chart.ts
+4
-3
No files found.
src/ts/charts/stacked-bar-chart.ts
View file @
7879266f
...
...
@@ -118,9 +118,8 @@ export class StackedBarChart extends Chart {
const
index
=
this
.
activeKeys
.
indexOf
(
medalType
);
if
(
index
!=
-
1
)
this
.
activeKeys
.
splice
(
index
,
1
);
else
{
else
this
.
activeKeys
.
push
(
medalType
);
}
if
(
this
.
activeKeys
.
length
===
0
)
this
.
activeKeys
=
keys
;
// Reset if none selected
this
.
updateVis
();
...
...
@@ -173,7 +172,9 @@ export class StackedBarChart extends Chart {
.
style
(
'top'
,
(
event
.
pageY
-
60
)
+
'px'
);
// Highlight the hovered stack and less opacity for the others
allLayers
.
selectAll
(
'rect'
).
filter
((
di
:
any
)
=>
di
!==
d
).
style
(
'opacity'
,
0.3
);
vis
.
chart
.
selectAll
(
'rect'
).
filter
((
di
:
any
)
=>
di
!==
d
).
style
(
'opacity'
,
0.3
);
vis
.
legend
.
selectAll
(
'rect'
)
.
style
(
'opacity'
,
(
_
,
index
)
=>
vis
.
getLegendItemOpacity
(
index
));
})
.
on
(
'mousemove'
,
function
(
event
:
any
)
{
vis
.
tooltip
.
style
(
'left'
,
(
event
.
pageX
-
20
)
+
'px'
)
...
...
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