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
74a2e7aa
Commit
74a2e7aa
authored
Jun 06, 2019
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FEAT] Edge Confluence added.
parent
f5c6e917
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
Types.purs
src/Gargantext/Components/GraphExplorer/Types.purs
+3
-1
Graph.purs
src/Gargantext/Pages/Corpus/Graph.purs
+2
-2
No files found.
src/Gargantext/Components/GraphExplorer/Types.purs
View file @
74a2e7aa
...
...
@@ -27,6 +27,7 @@ newtype Edge = Edge
, source :: String
, target :: String
, weight :: Number
, confluence :: Number
}
derive instance newtypeEdge :: Newtype Edge _
...
...
@@ -114,7 +115,8 @@ instance decodeJsonEdge :: DecodeJson Edge where
source <- obj .? "source"
target <- obj .? "target"
weight <- obj .? "weight"
pure $ Edge { id_, source, target, weight }
confluence <- obj .? "confluence"
pure $ Edge { id_, source, target, weight, confluence }
newtype Legend = Legend {id_ ::Int , color :: String, label :: String}
...
...
src/Gargantext/Pages/Corpus/Graph.purs
View file @
74a2e7aa
...
...
@@ -224,7 +224,7 @@ convert (GraphData r) = SigmaGraphData {nodes, edges}
, size : toNumber n.size
, label : n.label
, x : n.x -- cos (toNumber i)
, y : n.
y
-- sin (toNumber i)
, y : n.
confluence
-- sin (toNumber i)
, color : intColor $ cDef n.attributes
}
where
...
...
@@ -278,7 +278,7 @@ forceAtlas2Config = { -- fixedY : false
, iterationsPerRender : 4.0
, barnesHutOptimize : true
, linLogMode : true -- false
, edgeWeightInfluence :
0
.0
, edgeWeightInfluence :
1
.0
, gravity : 1.0
, strongGravityMode : false
, scalingRatio : 4.0
...
...
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