Commit 74a2e7aa authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FEAT] Edge Confluence added.

parent f5c6e917
......@@ -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}
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment