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
Show 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 =
type Option =
{ title :: Maybe Title
, legend ::
Maybe
Legend
, tooltip ::
Maybe
Tooltip
, grid ::
Maybe
Grid
, xAxis ::
Maybe
XAxis
, yAxis ::
Maybe
YAxis
, series ::
Maybe (Array Series)
, dataZoom ::
Maybe (Array DataZoom)
, legend :: Legend
, tooltip :: Tooltip
, grid :: Grid
, xAxis :: XAxis
, yAxis :: YAxis
, series ::
Array Series
, dataZoom ::
Array DataZoom
}
...
...
@@ -135,7 +135,7 @@ type SubtextStyle =
type Tooltip =
{ trigger :: String
, formatter :: String -- TODO function
, formatter ::
Maybe
String -- TODO function
}
type XAxis =
...
...
@@ -429,23 +429,36 @@ yData1 =
, 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 =
{
title: title'
,legend:
Just
legend'
,legend: legend'
,tooltip: tooltip'
,grid: grid'
,xAxis:
Just
xAxis'
,yAxis:
Just
yData1
,series:
series'
,dataZoom:
Just
[dz1', dz1', dz2', dz2']
,xAxis: xAxis'
,yAxis: yData1
,series:
[series']
,dataZoom: [dz1', dz1', dz2', dz2']
}
where title' = Nothing
tooltip' = Nothing
grid' = Nothing
series' = Nothing
dataZoom' = Nothing
grid' = {containLabel: true}
histogram2 :: R.ReactElement
histogram2 = echarts' opt
...
...
@@ -455,7 +468,7 @@ histogram = echarts
[ option
[ tooltip [trigger "axis"]
, grid [containLabel true]
, legend [data' ["
Map terms coverage
", "Favorites", "All"]]
, legend [data' ["
TEST MUDADA
", "Favorites", "All"]]
-- , legend [data' ["Map Terms coverage", "Favorites", "All"]]
, xAxis
[ type' "category"
...
...
@@ -467,7 +480,7 @@ histogram = echarts
]
, dataZoom' [dz1', dz1', dz2', dz2']
, 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
performAction _ _ _ = pure unit
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 = 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