Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Project Scouting Tool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Leander Robert Bernhard Gerwing
Project Scouting Tool
Commits
01cfebdf
Commit
01cfebdf
authored
11 months ago
by
Leander
Browse files
Options
Downloads
Patches
Plain Diff
fix: nodes are assigned to the wrong group
parent
a6a65a6e
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/charts/bubbleChart.ts
+5
-5
5 additions, 5 deletions
src/charts/bubbleChart.ts
src/main.ts
+1
-1
1 addition, 1 deletion
src/main.ts
src/styles/index.scss
+1
-0
1 addition, 0 deletions
src/styles/index.scss
with
7 additions
and
6 deletions
src/charts/bubbleChart.ts
+
5
−
5
View file @
01cfebdf
...
@@ -102,7 +102,7 @@ export default class BubbleChart extends SearchableChart {
...
@@ -102,7 +102,7 @@ export default class BubbleChart extends SearchableChart {
const
node
=
vis
.
chart
const
node
=
vis
.
chart
.
selectAll
(
"
g
"
)
.
selectAll
(
"
g
"
)
.
data
(
vis
.
packRoot
?.
descendant
s
())
.
data
(
vis
.
packRoot
?.
leave
s
())
.
join
(
.
join
(
(
enter
:
any
)
=>
enter
.
append
(
"
g
"
),
(
enter
:
any
)
=>
enter
.
append
(
"
g
"
),
(
update
:
any
)
=>
update
(
update
:
any
)
=>
update
...
@@ -113,6 +113,7 @@ export default class BubbleChart extends SearchableChart {
...
@@ -113,6 +113,7 @@ export default class BubbleChart extends SearchableChart {
)
)
node
.
selectAll
(
'
circle
'
)
node
.
selectAll
(
'
circle
'
)
.
data
((
d
:
any
)
=>
[
d
])
.
transition
()
.
transition
()
.
duration
(
1000
)
.
duration
(
1000
)
.
attr
(
'
fill
'
,
(
d
:
any
)
=>
vis
.
getFillForNode
(
d
))
.
attr
(
'
fill
'
,
(
d
:
any
)
=>
vis
.
getFillForNode
(
d
))
...
@@ -126,16 +127,13 @@ export default class BubbleChart extends SearchableChart {
...
@@ -126,16 +127,13 @@ export default class BubbleChart extends SearchableChart {
const
node
=
vis
.
chart
const
node
=
vis
.
chart
.
selectAll
(
"
g
"
)
.
selectAll
(
"
g
"
)
.
data
(
vis
.
packRoot
?.
descendant
s
())
.
data
(
vis
.
packRoot
?.
leave
s
())
.
join
(
"
g
"
)
.
join
(
"
g
"
)
.
attr
(
"
transform
"
,
(
d
:
any
)
=>
`translate(
${
d
.
x
}
,
${
d
.
y
}
)`
)
.
attr
(
"
transform
"
,
(
d
:
any
)
=>
`translate(
${
d
.
x
}
,
${
d
.
y
}
)`
)
node
node
.
filter
((
d
:
any
)
=>
!
d
.
children
)
.
append
(
'
circle
'
)
.
append
(
'
circle
'
)
.
attr
(
'
fill
'
,
(
d
:
any
)
=>
vis
.
getFillForNode
(
d
))
.
attr
(
'
fill
'
,
(
d
:
any
)
=>
vis
.
getFillForNode
(
d
))
.
attr
(
'
stroke
'
,
'
none
'
)
.
attr
(
'
stroke-width
'
,
2
)
.
attr
(
'
r
'
,
(
d
:
any
)
=>
d
.
r
)
.
attr
(
'
r
'
,
(
d
:
any
)
=>
d
.
r
)
.
attr
(
'
data-player
'
,
(
d
:
any
)
=>
d
.
data
.
player
)
.
attr
(
'
data-player
'
,
(
d
:
any
)
=>
d
.
data
.
player
)
.
on
(
'
mouseover
'
,
(
_
:
Event
,
d
:
any
)
=>
{
.
on
(
'
mouseover
'
,
(
_
:
Event
,
d
:
any
)
=>
{
...
@@ -181,7 +179,9 @@ export default class BubbleChart extends SearchableChart {
...
@@ -181,7 +179,9 @@ export default class BubbleChart extends SearchableChart {
(
(
(
d3
.
hierarchy
(
groupedData
)
as
HierarchyNode
<
any
>
)
(
d3
.
hierarchy
(
groupedData
)
as
HierarchyNode
<
any
>
)
.
sum
((
d
:
any
)
=>
this
.
config
.
sizeAccessor
(
d
))
.
sum
((
d
:
any
)
=>
this
.
config
.
sizeAccessor
(
d
))
.
sort
((
d
:
any
)
=>
this
.
config
.
sizeAccessor
(
d
))
)
)
}
}
private
getFillForNode
(
node
:
HierarchyNode
<
any
>
)
{
private
getFillForNode
(
node
:
HierarchyNode
<
any
>
)
{
...
...
This diff is collapsed.
Click to expand it.
src/main.ts
+
1
−
1
View file @
01cfebdf
...
@@ -38,7 +38,7 @@ dsv(';', 'data/output.csv').then(data => {
...
@@ -38,7 +38,7 @@ dsv(';', 'data/output.csv').then(data => {
if
(
sliderBlocked
)
return
if
(
sliderBlocked
)
return
zoomSlider
.
value
=
event
.
transform
.
k
.
toString
()
zoomSlider
.
value
=
event
.
transform
.
k
.
toString
()
},
},
groupAccessor
:
(
d
:
any
)
=>
d
[
'
team
'
],
groupAccessor
:
(
d
:
any
)
=>
d
[
'
nation
'
],
})
})
bubbleChart
.
renderVis
()
bubbleChart
.
renderVis
()
...
...
This diff is collapsed.
Click to expand it.
src/styles/index.scss
+
1
−
0
View file @
01cfebdf
...
@@ -71,6 +71,7 @@ h1 {
...
@@ -71,6 +71,7 @@ h1 {
border-radius
:
8px
;
border-radius
:
8px
;
border
:
1px
solid
#ccc
;
border
:
1px
solid
#ccc
;
box-shadow
:
0
0
10px
0
rgba
(
0
,
0
,
0
,
0
.1
);
box-shadow
:
0
0
10px
0
rgba
(
0
,
0
,
0
,
0
.1
);
user-select
:
none
;
}
}
#app
{
#app
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment