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
c69d4e81
Commit
c69d4e81
authored
Apr 26, 2018
by
Mael NICOLAS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Error, can't display the charts probably because of the types, i dont really
understand the js error (appear in the console)
parent
481a3225
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
20 deletions
+33
-20
Chart.purs
src/Chart.purs
+32
-19
Dashboard.purs
src/Dashboard.purs
+1
-1
No files found.
src/Chart.purs
View file @
c69d4e81
...
@@ -60,13 +60,13 @@ type OptsLoading =
...
@@ -60,13 +60,13 @@ type OptsLoading =
type Option =
type Option =
{ title :: Maybe Title
{ title :: Maybe Title
, legend ::
Maybe
Legend
, legend :: Legend
, tooltip ::
Maybe
Tooltip
, tooltip :: Tooltip
, grid ::
Maybe
Grid
, grid :: Grid
, xAxis ::
Maybe
XAxis
, xAxis :: XAxis
, yAxis ::
Maybe
YAxis
, yAxis :: YAxis
, series ::
Maybe (Array Series)
, series ::
Array Series
, dataZoom ::
Maybe (Array DataZoom)
, dataZoom ::
Array DataZoom
}
}
...
@@ -135,7 +135,7 @@ type SubtextStyle =
...
@@ -135,7 +135,7 @@ type SubtextStyle =
type Tooltip =
type Tooltip =
{ trigger :: String
{ trigger :: String
, formatter :: String -- TODO function
, formatter ::
Maybe
String -- TODO function
}
}
type XAxis =
type XAxis =
...
@@ -429,23 +429,36 @@ yData1 =
...
@@ -429,23 +429,36 @@ yData1 =
, axisLabel: {formatter: "{value}"}
, axisLabel: {formatter: "{value}"}
}
}
tooltip' :: Tooltip
tooltip' =
{
trigger: "axis"
, formatter: Nothing
}
series' :: Series
series' =
{
name: "All"
, "type": "bar"
, "data": [201, 222, 223, 777, 244, 255, 555, 879]
}
opt :: Option
opt :: Option
opt =
opt =
{
{
title: title'
title: title'
,legend:
Just
legend'
,legend: legend'
,tooltip: tooltip'
,tooltip: tooltip'
,grid: grid'
,grid: grid'
,xAxis:
Just
xAxis'
,xAxis: xAxis'
,yAxis:
Just
yData1
,yAxis: yData1
,series:
series'
,series:
[series']
,dataZoom:
Just
[dz1', dz1', dz2', dz2']
,dataZoom: [dz1', dz1', dz2', dz2']
}
}
where title' = Nothing
where title' = Nothing
tooltip' = Nothing
grid' = {containLabel: true}
grid' = Nothing
series' = Nothing
dataZoom' = Nothing
histogram2 :: R.ReactElement
histogram2 :: R.ReactElement
histogram2 = echarts' opt
histogram2 = echarts' opt
...
@@ -455,7 +468,7 @@ histogram = echarts
...
@@ -455,7 +468,7 @@ histogram = echarts
[ option
[ option
[ tooltip [trigger "axis"]
[ tooltip [trigger "axis"]
, grid [containLabel true]
, grid [containLabel true]
, legend [data' ["
Map terms coverage
", "Favorites", "All"]]
, legend [data' ["
TEST MUDADA
", "Favorites", "All"]]
-- , legend [data' ["Map Terms coverage", "Favorites", "All"]]
-- , legend [data' ["Map Terms coverage", "Favorites", "All"]]
, xAxis
, xAxis
[ type' "category"
[ type' "category"
...
@@ -467,7 +480,7 @@ histogram = echarts
...
@@ -467,7 +480,7 @@ histogram = echarts
]
]
, dataZoom' [dz1', dz1', dz2', dz2']
, dataZoom' [dz1', dz1', dz2', dz2']
, yAxis [ya1, ya2]
, yAxis [ya1, ya2]
, series [
sd1, sd2,
sd3]
, series [ sd3]
]
]
]
]
...
...
src/Dashboard.purs
View file @
c69d4e81
...
@@ -18,7 +18,7 @@ performAction :: forall eff props. PerformAction (dom :: DOM | eff) State props
...
@@ -18,7 +18,7 @@ performAction :: forall eff props. PerformAction (dom :: DOM | eff) State props
performAction _ _ _ = pure unit
performAction _ _ _ = pure unit
render :: forall props. Render State props Action
render :: forall props. Render State props Action
render dispatch _ state _ = [text "Dashboard", histogram]
render dispatch _ state _ = [text "Dashboard", histogram
2
]
layoutDashboard :: forall props eff. Spec (dom :: DOM | eff) State props Action
layoutDashboard :: forall props eff. Spec (dom :: DOM | eff) State props Action
layoutDashboard = simpleSpec performAction render
layoutDashboard = simpleSpec performAction render
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