Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
159
Issues
159
List
Board
Labels
Milestones
Merge Requests
8
Merge Requests
8
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
haskell-gargantext
Commits
a2a7b447
Commit
a2a7b447
authored
Jun 02, 2025
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '706-dev-graph-parameters-display' into 'dev'
706 dev graph parameters display See merge request
!407
parents
4ceffa69
48cd6f84
Pipeline
#7633
passed with stages
in 48 minutes
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
API.hs
src/Gargantext/Core/Viz/Graph/API.hs
+6
-4
Tools.hs
src/Gargantext/Core/Viz/Graph/Tools.hs
+0
-1
Types.hs
src/Gargantext/Core/Viz/Graph/Types.hs
+1
-0
No files found.
src/Gargantext/Core/Viz/Graph/API.hs
View file @
a2a7b447
...
...
@@ -77,7 +77,7 @@ getGraph nId = do
let
defaultEdgesStrength
=
Strong
let
defaultBridgenessMethod
=
BridgenessBasic
graph'
<-
computeGraph
cId
defaultBridgenessMethod
(
withMetric
defaultMetric
)
defaultEdgesStrength
(
NgramsTerms
,
NgramsTerms
)
repo
mt
<-
defaultGraphMetadata
cId
listId
"Title"
repo
defaultMetric
defaultEdgesStrength
mt
<-
defaultGraphMetadata
cId
listId
"Title"
repo
defaultMetric
defaultEdgesStrength
defaultBridgenessMethod
let
mt'
=
set
gm_legend
(
generateLegend
graph'
)
mt
let
graph''
=
set
graph_metadata
(
Just
mt'
)
graph'
...
...
@@ -138,7 +138,7 @@ recomputeGraph nId bridgeMethod maybeSimilarity maybeStrength nt1 nt2 force' = d
case
graph
of
Nothing
->
do
mt
<-
defaultGraphMetadata
cId
listId
"Title"
repo
(
fromMaybe
Order1
maybeSimilarity
)
strength
mt
<-
defaultGraphMetadata
cId
listId
"Title"
repo
(
fromMaybe
Order1
maybeSimilarity
)
strength
bridgeMethod
g
<-
computeG
mt
pure
$
trace
(
"[G.V.G.API.recomputeGraph] Graph empty, computed"
::
Text
)
g
Just
graph'
->
if
(
listVersion
==
Just
v
)
&&
(
not
force'
)
...
...
@@ -146,7 +146,7 @@ recomputeGraph nId bridgeMethod maybeSimilarity maybeStrength nt1 nt2 force' = d
else
do
case
graphMetadata
of
Nothing
->
do
mt
<-
defaultGraphMetadata
cId
listId
"Title"
repo
(
fromMaybe
Order1
maybeSimilarity
)
strength
mt
<-
defaultGraphMetadata
cId
listId
"Title"
repo
(
fromMaybe
Order1
maybeSimilarity
)
strength
bridgeMethod
g
<-
computeG
mt
pure
$
trace
(
"[G.V.G.API] Graph exists, no metadata, recomputing"
::
Text
)
g
Just
mt
->
do
...
...
@@ -206,12 +206,14 @@ defaultGraphMetadata :: HasNodeError err
->
NodeListStory
->
GraphMetric
->
Strength
->
BridgenessMethod
->
DBCmd
err
GraphMetadata
defaultGraphMetadata
cId
lId
t
repo
gm
str
=
do
defaultGraphMetadata
cId
lId
t
repo
gm
str
bm
=
do
pure
$
GraphMetadata
{
_gm_title
=
t
,
_gm_metric
=
gm
,
_gm_edgesStrength
=
Just
str
,
_gm_corpusId
=
[
cId
]
,
_gm_bridgenessMethod
=
Just
bm
,
_gm_legend
=
[
LegendField
1
"#FFF"
"Cluster1"
,
LegendField
2
"#FFF"
"Cluster2"
...
...
src/Gargantext/Core/Viz/Graph/Tools.hs
View file @
a2a7b447
...
...
@@ -41,7 +41,6 @@ import IGraph qualified as Igraph
import
IGraph.Algorithms.Layout
qualified
as
Layout
import
IGraph.Random
(
Gen
)
-- (Gen(..))
-------------------------------------------------------------
type
Threshold
=
Double
...
...
src/Gargantext/Core/Viz/Graph/Types.hs
View file @
a2a7b447
...
...
@@ -144,6 +144,7 @@ data GraphMetadata =
GraphMetadata
{
_gm_title
::
Text
-- title of the graph
,
_gm_metric
::
GraphMetric
,
_gm_edgesStrength
::
Maybe
Strength
,
_gm_bridgenessMethod
::
Maybe
BridgenessMethod
,
_gm_corpusId
::
[
NodeId
]
-- we can map with different corpus
,
_gm_legend
::
[
LegendField
]
-- legend of the Graph
,
_gm_list
::
ListForGraph
...
...
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