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
f0ce010f
Commit
f0ce010f
authored
Sep 10, 2018
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Chart] With Smart Constructor only (Sankey).
parent
df46c07f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
10 deletions
+9
-10
Series.purs
src/Gargantext/Components/Charts/Options/Series.purs
+8
-9
Dashboard.purs
src/Gargantext/Pages/Corpus/Doc/Facets/Dashboard.purs
+1
-1
No files found.
src/Gargantext/Components/Charts/Options/Series.purs
View file @
f0ce010f
...
...
@@ -60,7 +60,7 @@ type D2 =
{ "symbolSize" :: Number
, "data" :: Array (Array Number)
, "type" :: SeriesType
}
}
toSeries :: Serie -> Series
toSeries (SeriesD1 a) = unsafeCoerce a
...
...
@@ -79,14 +79,14 @@ type Node = { name :: String}
type Link = { source :: String
, target :: String
, value :: Number
}
}
mkSankey :: Array Node -> Array Link -> S
ankey
mkSankey ns ls =
{"type"
: seriesType Sankey
, layout
: "none"
, "data"
: ns
, "links" : ls
}
mkSankey :: Array Node -> Array Link -> S
erie
mkSankey ns ls =
SeriesSankey {"type"
: seriesType Sankey
, layout
: "none"
, "data"
: ns
, "links" : ls
}
--
...
...
@@ -131,4 +131,3 @@ mkSankey ns ls = {"type" : seriesType Sankey
-- https://ecomfe.github.io/echarts-examples/public/editor.html?c=scatter3D-dataset&gl=1
src/Gargantext/Pages/Corpus/Doc/Facets/Dashboard.purs
View file @
f0ce010f
...
...
@@ -125,7 +125,7 @@ sankeyEx :: Options
sankeyEx = Options { mainTitle : ""
, subTitle : ""
, xAxis : xAxis []
, yAxis : [
SeriesSankey $
mkSankey [{name : "a"}, {name : "b"}, {name:"c"}, {name:"d"}]
, yAxis : [ mkSankey [{name : "a"}, {name : "b"}, {name:"c"}, {name:"d"}]
[{source : "a", target : "b", value :2.0}
, {source : "a", target : "c", value :1.0}
, {source : "b", target : "c", value :1.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