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

starting to refactor

parent ff90786d
module Chart where
import Prelude
import Prelude (($), (<<<), (<$>))
import CSS (Color, white)
import Data.Maybe (Maybe(..))
import Data.Boolean
import React as R
import React.DOM (p)
import React.DOM.Props (Props, className, unsafeFromPropsArray)
import React.DOM.Props (Props, unsafeFromPropsArray, unsafeMkProps)
import ReactDOM as RDOM
import Thermite (Render, Spec, createReactSpec, defaultPerformAction, simpleSpec)
-- eCharts Props
......@@ -36,7 +32,7 @@ group = unsafeMkProps "group"
type EchartsProps eff =
{ className :: String,
style :: String, -- object,
style :: String, -- objealect-black-altdarkmincnaquadahherry-blossomect,
theme :: String,
group :: String,
option :: Option, -- PropTypes.object.isRequired,
......@@ -445,7 +441,7 @@ series' =
{
name: "All"
, "type": "bar"
, "data": [201, 222, 223, 777, 244, 255, 555, 879]
, "data": [201, 777, 879]
}
opt :: Option
......
......@@ -5,7 +5,7 @@ import Data.Unit (Unit)
import Prelude (pure, unit)
import React.DOM (text)
import Thermite (PerformAction, Render, Spec, simpleSpec)
import Chart
import Charts.ECharts
type State = Unit
......
......@@ -2,7 +2,7 @@ module DocView where
import Data.Argonaut
import Chart (histogram, p'')
import Chart (histogram2, p'')
import Control.Monad.Aff (Aff, attempt)
import Control.Monad.Aff.Class (liftAff)
import Control.Monad.Cont.Trans (lift)
......@@ -108,7 +108,7 @@ layoutDocview = simpleSpec performAction render
div [className "col-md-12"]
[ p''
, h3 [] [text "Chart Title"]
, histogram
, histogram2
, p''
, br' []
, 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