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
7b20a22b
Commit
7b20a22b
authored
Jan 31, 2020
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Dashboard] authors pie chart
parent
5984e0b1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
30 deletions
+35
-30
Dashboard.purs
src/Gargantext/Components/Nodes/Corpus/Dashboard.purs
+35
-30
No files found.
src/Gargantext/Components/Nodes/Corpus/Dashboard.purs
View file @
7b20a22b
...
...
@@ -16,10 +16,11 @@ import Gargantext.Components.Charts.Options.Series
import Gargantext.Components.Node (NodePoly(..))
import Gargantext.Components.Nodes.Corpus (loadCorpusWithChild)
import Gargantext.Components.Nodes.Corpus.Chart.Histo (histo)
import Gargantext.Components.Nodes.Corpus.Chart.Pie (pie)
import Gargantext.Components.Nodes.Corpus.Types (getCorpusInfo, CorpusInfo(..), Hyperdata(..))
import Gargantext.Hooks.Loader (useLoader)
import Gargantext.Sessions (Session)
import Gargantext.Types (
TabSubType(..), TabType(..)
)
import Gargantext.Types (
Mode(..), TabSubType(..), TabType(..), modeTabType
)
type Props =
(
...
...
@@ -61,7 +62,8 @@ dashboardLayoutLoadedCpt = R.hooksComponent "G.P.C.D.dashboardLayoutLoaded" cpt
H.div {className: "col-md-9 content"} [ histo (globalPublisParams props) ]
, H.div {className: "col-md-3 content"} [ chart naturePublis ]
]
, chart distriBySchool
--, chart distriBySchool
, pie (authorsParams props)
, H.div {className: "row"} (aSchool <$> schools)
, chart scatterEx
, chart sankeyEx
...
...
@@ -72,6 +74,9 @@ dashboardLayoutLoadedCpt = R.hooksComponent "G.P.C.D.dashboardLayoutLoaded" cpt
globalPublisParams {corpusId, session} = {path, session}
where
path = {corpusId, tabType: TabCorpus TabDocs}
authorsParams {corpusId, session} = {path, session}
where
path = {corpusId, tabType: TabCorpus (TabNgramType $ modeTabType Authors)}
aSchool school = H.div {className: "col-md-4 content"} [ chart $ focus school ]
schools = [ "Télécom Bretagne", "Mines Nantes", "Eurecom" ]
...
...
@@ -115,39 +120,39 @@ naturePublis = Options
-----------------------------------------------------------------------------------------------------------
globalPublis_x :: Array Int
globalPublis_x = [1982,1986,1987,1988,1990,1993,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017]
globalPublis_y :: Array Int
globalPublis_y = [1,4,2,1,1,2,1,1,8,38,234,76,40,82,75,202,1475,1092,1827,2630,4978,3668,4764,5915,4602,5269,6814,4018]
--
globalPublis_x :: Array Int
--
globalPublis_x = [1982,1986,1987,1988,1990,1993,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017]
--
globalPublis_y :: Array Int
--
globalPublis_y = [1,4,2,1,1,2,1,1,8,38,234,76,40,82,75,202,1475,1092,1827,2630,4978,3668,4764,5915,4602,5269,6814,4018]
globalPublis :: Options
globalPublis = Options
{ mainTitle : "Histogram"
, subTitle : "Distribution of publications over time"
, xAxis : xAxis' (map show globalPublis_x)
, yAxis : yAxis' { position: "left", show: true, min:0}
, series : [seriesBarD1 {name: "Number of publication / year"} $ map (\n -> dataSerie {name: "", value: toNumber n }) globalPublis_y]
, addZoom : true
, tooltip : tooltipTriggerAxis -- Necessary?
}
--
globalPublis :: Options
--
globalPublis = Options
--
{ mainTitle : "Histogram"
--
, subTitle : "Distribution of publications over time"
--
, xAxis : xAxis' (map show globalPublis_x)
--
, yAxis : yAxis' { position: "left", show: true, min:0}
--
, series : [seriesBarD1 {name: "Number of publication / year"} $ map (\n -> dataSerie {name: "", value: toNumber n }) globalPublis_y]
--
, addZoom : true
--
, tooltip : tooltipTriggerAxis -- Necessary?
--
}
distriBySchool_y :: Array (Tuple String Int)
distriBySchool_y = [Tuple "Télécom Bretagne" 1150,Tuple "Télécom SudParis" 946,Tuple "Mines Nantes" 547,Tuple "Télécom ParisTech" 429,Tuple "IMT Atlantique" 205,Tuple "Mines Alès" 56
,Tuple "Télécom Ecole de Management" 52,Tuple "Mines Albi-Carmaux" 6]
--
distriBySchool_y :: Array (Tuple String Int)
--
distriBySchool_y = [Tuple "Télécom Bretagne" 1150,Tuple "Télécom SudParis" 946,Tuple "Mines Nantes" 547,Tuple "Télécom ParisTech" 429,Tuple "IMT Atlantique" 205,Tuple "Mines Alès" 56
--
,Tuple "Télécom Ecole de Management" 52,Tuple "Mines Albi-Carmaux" 6]
distriBySchool :: Options
distriBySchool = Options
{ mainTitle : "School production in 2017"
, subTitle : "Distribution by school"
, xAxis : xAxis' []
, yAxis : yAxis' { position : "", show: false, min:0}
, series : [ seriesPieD1 {name: "Pie data"} (map (\(Tuple n v) -> dataSerie {name: n, value: toNumber v}) distriBySchool_y)]
, addZoom : false
, tooltip : tooltipTriggerAxis -- Necessary?
}
--
distriBySchool :: Options
--
distriBySchool = Options
--
{ mainTitle : "School production in 2017"
--
, subTitle : "Distribution by school"
--
, xAxis : xAxis' []
--
, yAxis : yAxis' { position : "", show: false, min:0}
--
, series : [ seriesPieD1 {name: "Pie data"} (map (\(Tuple n v) -> dataSerie {name: n, value: toNumber v}) distriBySchool_y)]
--
, addZoom : false
--
, tooltip : tooltipTriggerAxis -- Necessary?
--
}
scatterEx :: Options
scatterEx = Options
...
...
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