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
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
Grégoire Locqueville
purescript-gargantext
Commits
757a3597
Commit
757a3597
authored
Oct 11, 2022
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FEAT] Graph MultiPartite connected
parent
ebf0c5ad
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
2 deletions
+31
-2
Update.purs
...Gargantext/Components/Forest/Tree/Node/Action/Update.purs
+20
-0
Types.purs
...text/Components/Forest/Tree/Node/Action/Update/Types.purs
+4
-2
Types.purs
src/Gargantext/Types.purs
+7
-0
No files found.
src/Gargantext/Components/Forest/Tree/Node/Action/Update.purs
View file @
757a3597
...
...
@@ -81,6 +81,12 @@ updateGraphCpt = here.component "updateGraph" cpt where
methodGraphEdgesStrength <- T.useBox Strong
methodGraphEdgesStrength' <- T.useLive T.unequal methodGraphEdgesStrength
methodGraphNodeType1 <- T.useBox GT.CTabTerms
methodGraphNodeType1' <- T.useLive T.unequal methodGraphNodeType1
methodGraphNodeType2 <- T.useBox GT.CTabTerms
methodGraphNodeType2' <- T.useLive T.unequal methodGraphNodeType2
methodGraphClustering <- T.useBox Spinglass
methodGraphClustering' <- T.useLive T.unequal methodGraphClustering
...
...
@@ -94,6 +100,18 @@ updateGraphCpt = here.component "updateGraph" cpt where
, callback: \val -> T.write_ val methodGraphMetric
, print: show } []
, H.text "NodeType 1 ?"
, formChoiceSafe { items: [GT.CTabTerms, GT.CTabSources, GT.CTabAuthors, GT.CTabInstitutes]
, default: methodGraphNodeType1'
, callback: \val -> T.write_ val methodGraphNodeType1
, print: show } []
, H.text "NodeType 2 ?"
, formChoiceSafe { items: [GT.CTabTerms, GT.CTabSources, GT.CTabAuthors, GT.CTabInstitutes]
, default: methodGraphNodeType2'
, callback: \val -> T.write_ val methodGraphNodeType2
, print: show } []
, H.text "Show Strong (expected) links or weak (maybe unexpected) links?"
, formChoiceSafe { items: [Strong, Weak]
, default: methodGraphEdgesStrength'
...
...
@@ -110,6 +128,8 @@ updateGraphCpt = here.component "updateGraph" cpt where
(submitButton (UpdateNode $ UpdateNodeParamsGraph { methodGraphMetric: methodGraphMetric'
, methodGraphClustering: methodGraphClustering'
, methodGraphEdgesStrength : methodGraphEdgesStrength'
, methodGraphNodeType1 : methodGraphNodeType1'
, methodGraphNodeType2 : methodGraphNodeType2'
}
) callback
)
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Update/Types.purs
View file @
757a3597
...
...
@@ -16,6 +16,8 @@ data UpdateNodeParams
| UpdateNodeParamsGraph { methodGraphMetric :: GraphMetric
, methodGraphEdgesStrength :: Strength
, methodGraphClustering :: PartitionMethod
, methodGraphNodeType1 :: GT.CTabNgramType
, methodGraphNodeType2 :: GT.CTabNgramType
}
| UpdateNodeParamsTexts { methodTexts :: Granularity }
| UpdateNodeParamsBoard { methodBoard :: Charts }
...
...
@@ -29,9 +31,9 @@ instance JSON.WriteForeign UpdateNodeParams where
writeImpl (UpdateNodeParamsList { methodList }) =
JSON.writeImpl { type: "UpdateNodeParamsList"
, methodList }
writeImpl (UpdateNodeParamsGraph { methodGraphMetric, methodGraphClustering, methodGraphEdgesStrength}) =
writeImpl (UpdateNodeParamsGraph { methodGraphMetric, methodGraphClustering, methodGraphEdgesStrength
, methodGraphNodeType1, methodGraphNodeType2
}) =
JSON.writeImpl { type: "UpdateNodeParamsGraph"
, methodGraphMetric, methodGraphClustering, methodGraphEdgesStrength}
, methodGraphMetric, methodGraphClustering, methodGraphEdgesStrength
, methodGraphNodeType1, methodGraphNodeType2
}
writeImpl (UpdateNodeParamsTexts { methodTexts }) =
JSON.writeImpl { type: "UpdateNodeParamsTexts"
, methodTexts }
...
...
src/Gargantext/Types.purs
View file @
757a3597
...
...
@@ -544,6 +544,13 @@ instance Show CTabNgramType where
show CTabSources = "Sources"
show CTabAuthors = "Authors"
show CTabInstitutes = "Institutes"
instance Read CTabNgramType where
read "Terms" = Just CTabTerms
read "Sources" = Just CTabSources
read "Authors" = Just CTabAuthors
read "Institutes" = Just CTabInstitutes
read _ = Nothing
instance JSON.ReadForeign CTabNgramType where readImpl = JSONG.enumSumRep
instance JSON.WriteForeign CTabNgramType where writeImpl = JSON.writeImpl <<< show
data PTabNgramType = PTabPatents | PTabBooks | PTabCommunication
...
...
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