Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
138
Issues
138
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
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
gargantext
purescript-gargantext
Commits
e6b0b8e2
Commit
e6b0b8e2
authored
Oct 10, 2024
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/689-dev-graph-legend-improvements' into dev
parents
cb9a6dd5
1b8c9eca
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
19 deletions
+8
-19
Sidebar.purs
src/Gargantext/Components/GraphExplorer/Sidebar.purs
+0
-5
Legend.purs
src/Gargantext/Components/GraphExplorer/Sidebar/Legend.purs
+6
-11
Utils.purs
src/Gargantext/Components/GraphExplorer/Utils.purs
+2
-3
No files found.
src/Gargantext/Components/GraphExplorer/Sidebar.purs
View file @
e6b0b8e2
...
...
@@ -130,10 +130,6 @@ sideTabLegendCpt = here.component "sideTabLegend" cpt where
legend' /\ legendBox <- R2.useBox' legend
-- | Computed
-- |
let
maxItemPerCluster = 4
-- | Hooks
-- |
...
...
@@ -144,7 +140,6 @@ sideTabLegendCpt = here.component "sideTabLegend" cpt where
( getter _.id_
>>> GEU.takeGreatestNodeByCluster
hyperdataGraph
maxItemPerCluster
)
-- For each provided Cluster (see Legend), count the number of nodes
...
...
src/Gargantext/Components/GraphExplorer/Sidebar/Legend.purs
View file @
e6b0b8e2
...
...
@@ -175,11 +175,6 @@ selectedNodesCpt = here.component "selectedNodes" cpt where
)
# isJust
countValue
= extractedNodeList
# A.length
# (nodeCount - _)
-- | Behaviors
-- |
let
...
...
@@ -212,7 +207,7 @@ selectedNodesCpt = here.component "selectedNodes" cpt where
]
,
R2.when (eq
countValue
0) $
R2.when (eq
nodeCount
0) $
H.li
{ className: intercalate " "
...
...
@@ -221,10 +216,10 @@ selectedNodesCpt = here.component "selectedNodes" cpt where
]
}
[
H.text "0 node"
H.text "0 node
s
"
]
,
R2.when (not $ eq
countValue
0) $
R2.when (not $ eq
nodeCount
0) $
H.li
{ className: intercalate " "
...
...
@@ -233,14 +228,14 @@ selectedNodesCpt = here.component "selectedNodes" cpt where
]
}
[
H.text "
+
"
H.text "
|
"
,
H.text $ nbsp 1
,
H.text $ show
countValue
H.text $ show
nodeCount
,
H.text $ nbsp 1
,
H.text $ eq
countValue
1 ? "node" $ "nodes"
H.text $ eq
nodeCount
1 ? "node" $ "nodes"
]
]
src/Gargantext/Components/GraphExplorer/Utils.purs
View file @
e6b0b8e2
...
...
@@ -78,8 +78,8 @@ normalizeNodeSize minSize maxSize ns = over traversed (over sizeLens (\s -> minS
------------------------------------------------------------------------
takeGreatestNodeByCluster :: GET.HyperdataGraph -> Int ->
Int ->
Array GEGT.Node
takeGreatestNodeByCluster graphData
take
clusterId
takeGreatestNodeByCluster :: GET.HyperdataGraph -> Int -> Array GEGT.Node
takeGreatestNodeByCluster graphData clusterId
= graphData
# getter _.graph
>>> getter _.nodes
...
...
@@ -91,7 +91,6 @@ takeGreatestNodeByCluster graphData take clusterId
>>> A.sortWith
( getter _.size
)
>>> A.takeEnd take
>>> A.reverse
countNodeByCluster :: GET.HyperdataGraph -> Int -> GEGT.ClusterCount
...
...
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