Commit c5a9a69e authored by Alexandre Delanoë's avatar Alexandre Delanoë

[Graph] Legend.

parent c5f488c7
......@@ -261,11 +261,13 @@ graphAPI' :: Connection -> NodeId -> IO Graph
graphAPI' c nId = do
nodeGraph <- getNode c nId HyperdataGraph
let metadata = GraphMetadata "Title" [maybe 0 identity $ _node_parentId nodeGraph]
[ LegendField 1 "#FFFFFF" "Label 1"
, LegendField 2 "#0048BA" "Label 2"
]
let title = "IMT - Scientific publications - 1982-2017 - English"
let metadata = GraphMetadata title [maybe 0 identity $ _node_parentId nodeGraph] [ LegendField 6 "#FFF" "Data processing"
, LegendField 7 "#FFF" "Networks"
, LegendField 1 "#FFF" "Materialscience"
, LegendField 5 "#FFF" "Energy / Environment"
]
-- (map (\n -> LegendField n "#FFFFFF" (pack $ show n)) [1..10])
graph <- set graph_metadata (Just metadata) <$> maybe defaultGraph identity <$> readGraphFromJson "purescript-gargantext/dist/examples/imtNew.json"
......
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