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
153
Issues
153
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
75aa3eec
Commit
75aa3eec
authored
Oct 14, 2024
by
Karen Konou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Graph] Display node and edge counts in toolbar
parent
f9c5b3fa
Pipeline
#6829
passed with stages
in 13 minutes and 55 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletion
+18
-1
Controls.purs
...Gargantext/Components/GraphExplorer/Toolbar/Controls.purs
+18
-1
No files found.
src/Gargantext/Components/GraphExplorer/Toolbar/Controls.purs
View file @
75aa3eec
...
@@ -4,6 +4,7 @@ module Gargantext.Components.GraphExplorer.Toolbar.Controls
...
@@ -4,6 +4,7 @@ module Gargantext.Components.GraphExplorer.Toolbar.Controls
import Prelude
import Prelude
import Data.Array as A
import Data.Foldable (intercalate)
import Data.Foldable (intercalate)
import Data.Maybe (Maybe(..))
import Data.Maybe (Maybe(..))
import Data.Set as Set
import Data.Set as Set
...
@@ -14,9 +15,9 @@ import Gargantext.Components.GraphExplorer.Toolbar.Buttons (cameraButton, center
...
@@ -14,9 +15,9 @@ import Gargantext.Components.GraphExplorer.Toolbar.Buttons (cameraButton, center
import Gargantext.Components.GraphExplorer.Toolbar.RangeControl (edgeConfluenceControl, edgeWeightControl, nodeSizeControl)
import Gargantext.Components.GraphExplorer.Toolbar.RangeControl (edgeConfluenceControl, edgeWeightControl, nodeSizeControl)
import Gargantext.Components.GraphExplorer.Toolbar.SlideButton (labelSizeButton, labelRenderedSizeThresholdButton, mouseSelectorSizeSlider)
import Gargantext.Components.GraphExplorer.Toolbar.SlideButton (labelSizeButton, labelRenderedSizeThresholdButton, mouseSelectorSizeSlider)
import Gargantext.Components.GraphExplorer.Types as GET
import Gargantext.Components.GraphExplorer.Types as GET
import Gargantext.Hooks.Sigmax as Sigmax
import Gargantext.Hooks.Sigmax.ForceAtlas2 as ForceAtlas
import Gargantext.Hooks.Sigmax.ForceAtlas2 as ForceAtlas
import Gargantext.Hooks.Sigmax.Noverlap as Noverlap
import Gargantext.Hooks.Sigmax.Noverlap as Noverlap
import Gargantext.Hooks.Sigmax as Sigmax
import Gargantext.Hooks.Sigmax.Sigma as Sigma
import Gargantext.Hooks.Sigmax.Sigma as Sigma
import Gargantext.Hooks.Sigmax.Types as SigmaxT
import Gargantext.Hooks.Sigmax.Types as SigmaxT
import Gargantext.Sessions (Session)
import Gargantext.Sessions (Session)
...
@@ -90,6 +91,11 @@ controlsCpt = R.memo' $ here.component "controls" cpt where
...
@@ -90,6 +91,11 @@ controlsCpt = R.memo' $ here.component "controls" cpt where
-- If user pauses FA before auto is triggered, clear the timeoutId
-- If user pauses FA before auto is triggered, clear the timeoutId
mFAPauseRef <- R.useRef Nothing
mFAPauseRef <- R.useRef Nothing
-- | Helpers
-- |
let nodeCount (GET.HyperdataGraph { graph: GET.GraphData { nodes } }) = A.length nodes
let edgeCount (GET.HyperdataGraph { graph: GET.GraphData { edges } }) = A.length edges
-- | Effects
-- | Effects
-- |
-- |
...
@@ -231,6 +237,17 @@ controlsCpt = R.memo' $ here.component "controls" cpt where
...
@@ -231,6 +237,17 @@ controlsCpt = R.memo' $ here.component "controls" cpt where
, title: "Save this graph"
, title: "Save this graph"
}
}
]
]
,
B.fieldset
{ className: "graph-toolbar__section"
, titleSlot: H.text "Parameters" }
[
H.div { }
[
H.p { } [ H.text $ "Nodes: " <> (show $ nodeCount hyperdataGraph') ]
, H.p { } [ H.text $ "Edges: " <> (show $ edgeCount hyperdataGraph') ]
]
]
]
]
,
,
...
...
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