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
142
Issues
142
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
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
purescript-gargantext
Commits
59f17f4b
Commit
59f17f4b
authored
Sep 08, 2018
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[TYPES Series] Serie -> Series : cleans the uses of Serie.
parent
0747ebfd
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
ECharts.purs
src/Gargantext/Components/Charts/Options/ECharts.purs
+3
-3
Series.purs
src/Gargantext/Components/Charts/Options/Series.purs
+2
-2
Dashboard.purs
src/Gargantext/Pages/Corpus/Doc/Facets/Dashboard.purs
+5
-5
No files found.
src/Gargantext/Components/Charts/Options/ECharts.purs
View file @
59f17f4b
...
...
@@ -11,7 +11,7 @@ import Gargantext.Components.Charts.Options.Data (DataN, DataS, DataV)
import Gargantext.Components.Charts.Options.Font (IconOptions(..), Shape(..), TextStyle, chartFontStyle, chartFontWeight, icon)
import Gargantext.Components.Charts.Options.Legend (legendType, LegendMode(..), PlainOrScroll(..), selectedMode, Orientation(..), orient)
import Gargantext.Components.Charts.Options.Position (Align(..), LeftRelativePosition(..), TopRelativePosition(..), numberPosition, percentPosition, relativePosition)
import Gargantext.Components.Charts.Options.Series (Serie
s(..)
, SeriesName, SeriesShape(..), seriesType, D1, D2)
import Gargantext.Components.Charts.Options.Series (Serie
(..), Series(..), toSeries
, SeriesName, SeriesShape(..), seriesType, D1, D2)
import Gargantext.Components.Charts.Options.Type (DataZoom, Echarts, Legend, Option, Title, Tooltip, XAxis, YAxis)
import React (unsafeCreateElementDynamic)
import React as R
...
...
@@ -175,7 +175,7 @@ data YAxisFormat = YAxisFormat { position :: String
data Options = Options { mainTitle :: MainTitle
, subTitle :: SubTitle
, xAxis :: XAxis
, yAxis :: Array Serie
s
, yAxis :: Array Serie
, yAxisFormat :: YAxisFormat
, addZoom :: Boolean
}
...
...
@@ -196,7 +196,7 @@ opts (Options { mainTitle : mainTitle
}
, grid : {containLabel: true}
, xAxis : xs
, series : ss
, series :
map toSeries $
ss
, yAxis : { "type": "value"
, name: "data"
, min: 0
...
...
src/Gargantext/Components/Charts/Options/Series.purs
View file @
59f17f4b
...
...
@@ -45,7 +45,7 @@ seriesType = SeriesType <<< show
type Series = {}
data Serie
s'
= SeriesD1 D1 | SeriesD2 D2
data Serie = SeriesD1 D1 | SeriesD2 D2
type D1 =
{ name :: String
...
...
@@ -61,7 +61,7 @@ type D2 =
}
toSeries :: Serie
s'
-> Series
toSeries :: Serie -> Series
toSeries (SeriesD1 a) = unsafeCoerce a
toSeries (SeriesD2 a) = unsafeCoerce a
...
...
src/Gargantext/Pages/Corpus/Doc/Facets/Dashboard.purs
View file @
59f17f4b
...
...
@@ -36,7 +36,7 @@ render dispatch _ state _ = [
, chart scatterEx
]
where
myData = [
toSeries $
SeriesD1 $ series Bar "Bar Data" [ {name: "val1", value: 50.0}
myData = [SeriesD1 $ series Bar "Bar Data" [ {name: "val1", value: 50.0}
, {name: "val2", value: 70.0}
, {name: "val3", value: 80.0}
]
...
...
@@ -65,7 +65,7 @@ naturePublis :: Options
naturePublis = Options { mainTitle : "Nature of publications"
, subTitle : "Distribution by type"
, xAxis : xAxis []
, yAxis : [
toSeries $
SeriesD1 $ series Funnel "Funnel Data" naturePublis_y]
, yAxis : [SeriesD1 $ series Funnel "Funnel Data" naturePublis_y]
, yAxisFormat : (YAxisFormat { position : "left"
, visible : false
})
...
...
@@ -82,7 +82,7 @@ globalPublis :: Options
globalPublis = (Options { mainTitle : "Global Scientific Publications"
, subTitle : "Distribution of scientific publications by IMT's Schools over time"
, xAxis : xAxis (map show globalPublis_x)
, yAxis : [
toSeries $
SeriesD1 $ series Bar "Number of publication of IMT / year" $ map (\n -> {name: "", value: toNumber n }) globalPublis_y]
, yAxis : [SeriesD1 $ series Bar "Number of publication of IMT / year" $ map (\n -> {name: "", value: toNumber n }) globalPublis_y]
, yAxisFormat : (YAxisFormat { position : "left"
, visible : true
})
...
...
@@ -98,7 +98,7 @@ distriBySchool :: Options
distriBySchool = Options { mainTitle : "School production in 2017"
, subTitle : "Distribution by school"
, xAxis : xAxis []
, yAxis : [
toSeries $
SeriesD1 $ series Pie "Pie data" (map (\(Tuple n v) -> {name: n, value: toNumber v}) distriBySchool_y)]
, yAxis : [ SeriesD1 $ series Pie "Pie data" (map (\(Tuple n v) -> {name: n, value: toNumber v}) distriBySchool_y)]
, yAxisFormat : (YAxisFormat { position : ""
, visible : false
})
...
...
@@ -109,7 +109,7 @@ scatterEx :: Options
scatterEx = Options { mainTitle : "Scatter test"
, subTitle : "Scatter subtitle"
, xAxis : xAxis []
, yAxis : [
toSeries $
SeriesD2 $ seriesD2 Scatter 20.0 [[2.0,3.0],[3.0,4.0]]]
, yAxis : [ SeriesD2 $ seriesD2 Scatter 20.0 [[2.0,3.0],[3.0,4.0]]]
, yAxisFormat : (YAxisFormat { position : ""
, visible : true
})
...
...
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