Commit 4e530b5d authored by Mael NICOLAS's avatar Mael NICOLAS

starting to refactor

parent ff90786d
module Chart where module Chart where
import Prelude import Prelude (($), (<<<), (<$>))
import CSS (Color, white) import CSS (Color, white)
import Data.Maybe (Maybe(..)) import Data.Maybe (Maybe(..))
import Data.Boolean
import React as R import React as R
import React.DOM (p) import React.DOM (p)
import React.DOM.Props (Props, className, unsafeFromPropsArray)
import React.DOM.Props (Props, unsafeFromPropsArray, unsafeMkProps) import React.DOM.Props (Props, unsafeFromPropsArray, unsafeMkProps)
import ReactDOM as RDOM
import Thermite (Render, Spec, createReactSpec, defaultPerformAction, simpleSpec)
-- eCharts Props -- eCharts Props
...@@ -36,7 +32,7 @@ group = unsafeMkProps "group" ...@@ -36,7 +32,7 @@ group = unsafeMkProps "group"
type EchartsProps eff = type EchartsProps eff =
{ className :: String, { className :: String,
style :: String, -- object, style :: String, -- objealect-black-altdarkmincnaquadahherry-blossomect,
theme :: String, theme :: String,
group :: String, group :: String,
option :: Option, -- PropTypes.object.isRequired, option :: Option, -- PropTypes.object.isRequired,
...@@ -445,7 +441,7 @@ series' = ...@@ -445,7 +441,7 @@ series' =
{ {
name: "All" name: "All"
, "type": "bar" , "type": "bar"
, "data": [201, 222, 223, 777, 244, 255, 555, 879] , "data": [201, 777, 879]
} }
opt :: Option opt :: Option
......
...@@ -5,7 +5,7 @@ import Data.Unit (Unit) ...@@ -5,7 +5,7 @@ import Data.Unit (Unit)
import Prelude (pure, unit) import Prelude (pure, unit)
import React.DOM (text) import React.DOM (text)
import Thermite (PerformAction, Render, Spec, simpleSpec) import Thermite (PerformAction, Render, Spec, simpleSpec)
import Chart import Charts.ECharts
type State = Unit type State = Unit
......
...@@ -2,7 +2,7 @@ module DocView where ...@@ -2,7 +2,7 @@ module DocView where
import Data.Argonaut import Data.Argonaut
import Chart (histogram, p'') import Chart (histogram2, p'')
import Control.Monad.Aff (Aff, attempt) import Control.Monad.Aff (Aff, attempt)
import Control.Monad.Aff.Class (liftAff) import Control.Monad.Aff.Class (liftAff)
import Control.Monad.Cont.Trans (lift) import Control.Monad.Cont.Trans (lift)
...@@ -108,7 +108,7 @@ layoutDocview = simpleSpec performAction render ...@@ -108,7 +108,7 @@ layoutDocview = simpleSpec performAction render
div [className "col-md-12"] div [className "col-md-12"]
[ p'' [ p''
, h3 [] [text "Chart Title"] , h3 [] [text "Chart Title"]
, histogram , histogram2
, p'' , p''
, br' [] , br' []
, div [] [ b [] [text d.title] , div [] [ b [] [text d.title]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment