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
e4c4620e
Commit
e4c4620e
authored
Apr 23, 2019
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Chart] Fix xAxis.
parent
f92b652c
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
19 additions
and
17 deletions
+19
-17
ECharts.purs
src/Gargantext/Components/Charts/Options/ECharts.purs
+4
-3
Config.purs
src/Gargantext/Config.purs
+1
-1
Histo.purs
src/Gargantext/Pages/Corpus/Chart/Histo.purs
+1
-1
Metrics.purs
src/Gargantext/Pages/Corpus/Chart/Metrics.purs
+2
-2
Pie.purs
src/Gargantext/Pages/Corpus/Chart/Pie.purs
+2
-2
Tree.purs
src/Gargantext/Pages/Corpus/Chart/Tree.purs
+1
-1
Dashboard.purs
src/Gargantext/Pages/Corpus/Dashboard.purs
+8
-7
No files found.
src/Gargantext/Components/Charts/Options/ECharts.purs
View file @
e4c4620e
...
...
@@ -126,7 +126,7 @@ yAxisVoid = yAxis
}
xAxis' :: Array String -> XAxis
xAxis' [] = unsafeCoerce {}
xAxis' [] = unsafeCoerce {
show:false
}
xAxis' xs = xAxis
{ "data": xData xs
, "type": "category"
...
...
@@ -140,11 +140,12 @@ xAxis' xs = xAxis
-- TODO try to use Optional
yAxis' :: { position :: String
, show :: Boolean
, min :: Int
} -> YAxis
yAxis' {position, show} = yAxis
yAxis' {position, show
, min
} = yAxis
{ "type": "value"
, name: "data"
, min:
0
, min:
min
, axisLabel: {formatter: "{value}"}
, position
, show
...
...
src/Gargantext/Config.purs
View file @
e4c4620e
...
...
@@ -26,7 +26,7 @@ endConfig = endConfig' V10
endConfig' :: ApiVersion -> EndConfig
endConfig' v = { front : frontRelative
, back : back
Demo
v }
, back : back
Local
v }
-- , back : backDemo v }
------------------------------------------------------------------------
...
...
src/Gargantext/Pages/Corpus/Chart/Histo.purs
View file @
e4c4620e
...
...
@@ -62,7 +62,7 @@ chartOptions (HistoMetrics { dates: dates', count: count'}) = Options
{ mainTitle : "Histogram"
, subTitle : "Distribution of publications over time"
, xAxis : xAxis' dates'
, yAxis : yAxis' { position: "left", show: true
}
, yAxis : yAxis' { position: "left", show: true
, min:0
}
, series : [seriesBarD1 {name: "Number of publication / year"} $ map (\n -> dataSerie {name: "", value: n, itemStyle : itemStyle {color:grey}}) count']
, addZoom : true
, tooltip : mkTooltip { formatter: templateFormatter "{b0}" }
...
...
src/Gargantext/Pages/Corpus/Chart/Metrics.purs
View file @
e4c4620e
...
...
@@ -66,8 +66,8 @@ scatterOptions :: Array Metric -> Options
scatterOptions metrics = Options
{ mainTitle : "Ngrams Selection Metrics"
, subTitle : "Local metrics (Inc/Exc, Spe/Gen), Global metrics (TFICF maillage)"
, xAxis : xAxis { min:
0
}
, yAxis : yAxis' { position : "", show: true
}
, xAxis : xAxis { min:
-1
}
, yAxis : yAxis' { position : "", show: true
, min : -2
}
, series : map2series $ metric2map metrics
, addZoom : false
, tooltip : mkTooltip { formatter: templateFormatter "{b0}" }
...
...
src/Gargantext/Pages/Corpus/Chart/Pie.purs
View file @
e4c4620e
...
...
@@ -62,7 +62,7 @@ chartOptions (HistoMetrics { dates: dates', count: count'}) = Options
{ mainTitle : "Bar"
, subTitle : "Count of GraphTerm"
, xAxis : xAxis' dates'
, yAxis : yAxis' { position: "left", show: true
}
, yAxis : yAxis' { position: "left", show: true
, min:0
}
, series : [seriesBarD1 {name: "Number of publication / year"} $ map (\n -> dataSerie {name: "", itemStyle: itemStyle {color:blue}, value: n }) count']
, addZoom : false
, tooltip : mkTooltip { formatter: templateFormatter "{b0}" }
...
...
@@ -79,7 +79,7 @@ chartOptionsPie (HistoMetrics { dates: dates', count: count'}) = Options
{ mainTitle : "Pie"
, subTitle : "Distribution by GraphTerm"
, xAxis : xAxis' []
, yAxis : yAxis' { position: "", show: false
}
, yAxis : yAxis' { position: "", show: false
, min:0
}
, series : [seriesPieD1 {name: "Data"} $ map (\(Tuple n v) -> dataSerie {name: n, value:v}) $ zip dates' count']
-- , series : [seriesBarD1 {name: "Number of publication / year"} $ map (\n -> dataSerie {name: "", value: n }) count']
, addZoom : false
...
...
src/Gargantext/Pages/Corpus/Chart/Tree.purs
View file @
e4c4620e
...
...
@@ -55,7 +55,7 @@ scatterOptions nodes = Options
{ mainTitle : "Tree"
, subTitle : "Tree Sub Title"
, xAxis : xAxis' []
, yAxis : yAxis' { position : "", show: false
}
, yAxis : yAxis' { position : "", show: false
, min:0
}
, series : [ mkTree TreeMap nodes]
, addZoom : false
, tooltip : mkTooltip { formatter: templateFormatter "{b0}" }
...
...
src/Gargantext/Pages/Corpus/Dashboard.purs
View file @
e4c4620e
...
...
@@ -42,6 +42,7 @@ render dispatch _ state _ = [
, xAxis : xAxis' ["2015", "2016", "2017"]
, yAxis : yAxis' { position: "left"
, show: false
, min : 0
}
, series : myData
, addZoom : false
...
...
@@ -63,7 +64,7 @@ naturePublis = Options
{ mainTitle : "Nature of publications"
, subTitle : "Distribution by type"
, xAxis : xAxis' []
, yAxis : yAxis' { position: "left", show: false
}
, yAxis : yAxis' { position: "left", show: false
, min:0
}
, series : [seriesFunnelD1 { name: "Funnel Data" } naturePublis_y]
, addZoom : false
, tooltip : tooltipTriggerAxis -- Necessary?
...
...
@@ -82,7 +83,7 @@ globalPublis = Options
{ mainTitle : "Histogram"
, subTitle : "Distribution of publications over time"
, xAxis : xAxis' (map show globalPublis_x)
, yAxis : yAxis' { position: "left", show: true
}
, 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?
...
...
@@ -99,7 +100,7 @@ distriBySchool = Options
{ mainTitle : "School production in 2017"
, subTitle : "Distribution by school"
, xAxis : xAxis' []
, yAxis : yAxis' { position : "", show: false
}
, 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?
...
...
@@ -110,7 +111,7 @@ scatterEx = Options
{ mainTitle : "Scatter test"
, subTitle : "Scatter subtitle"
, xAxis : xAxis' []
, yAxis : yAxis' { position: "", show: true
}
, yAxis : yAxis' { position: "", show: true
, min:0
}
, series : [ seriesScatterD2 {name: "name1", symbolSize: 10.0} (dataSerieV <$> [[2.0,3.0],[3.0,4.0]])
, seriesScatterD2 {name: "name2", symbolSize: 5.0 } (dataSerieV <$> [[1.0,3.0],[5.0,4.0]])
, seriesScatterD2 {name: "name3", symbolSize: 10.0} (dataSerieV <$> [[10.0,3.0],[8.0,4.0]])
...
...
@@ -124,7 +125,7 @@ sankeyEx = Options
{ mainTitle : ""
, subTitle : ""
, xAxis : xAxis' []
, yAxis : yAxis' { position: "", show: false
}
, yAxis : yAxis' { position: "", show: false
, min:0
}
, series :
[ seriesSankey
{ "data":
...
...
@@ -193,7 +194,7 @@ treeMapEx = Options
{ mainTitle : ""
, subTitle : ""
, xAxis : xAxis' []
, yAxis : yAxis' { position: "", show: false
}
, yAxis : yAxis' { position: "", show: false
, min:0
}
, series : [mkTree TreeMap treeData]
, addZoom : false
, tooltip : tooltipTriggerAxis -- Necessary?
...
...
@@ -204,7 +205,7 @@ treeEx = Options
{ mainTitle : "Tree"
, subTitle : "Radial"
, xAxis : xAxis' []
, yAxis : yAxis' { position: "", show: false
}
, yAxis : yAxis' { position: "", show: false
, min:0
}
, series : [mkTree TreeRadial treeData']
, addZoom : false
, tooltip : tooltipTriggerAxis -- Necessary?
...
...
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