[ECharts] hide the usage of Maybe (does not work)

parent d9b6a94a
......@@ -5,7 +5,6 @@ import Prelude
import CSS (italic)
import CSS.Common (normal)
import Data.Array (length)
import Data.Maybe (Maybe(..))
import Gargantext.Components.Charts.Options.Color (transparent, violet, black)
import Gargantext.Components.Charts.Options.Data (DataLegend, DataAxis, dataSerie)
import Gargantext.Components.Charts.Options.Font (IconOptions(..), Shape(..), TextStyle, chartFontStyle, chartFontWeight, icon, mkTooltip, Tooltip)
......@@ -27,18 +26,18 @@ chart = echarts <<< chartWith <<< opts
chartWith :: Option -> Echarts
chartWith option =
{ option
, className : Nothing
, style : Nothing
, theme : Nothing
, group : Nothing
, initOpts : Nothing
, notMerge : Nothing
, lazyUpdate: Nothing
, loading : Nothing
, optsLoading: Nothing
, onReady : Nothing
, resizable : Nothing
, onEvents : Nothing
--, className : Nothing
--, style : Nothing
--, theme : Nothing
--, group : Nothing
--, initOpts : Nothing
--, notMerge : Nothing
--, lazyUpdate: Nothing
--, loading : Nothing
--, optsLoading: Nothing
--, onReady : Nothing
--, resizable : Nothing
--, onEvents : Nothing
}
echarts :: Echarts -> R.ReactElement
......@@ -98,10 +97,10 @@ legend =
, itemGap: 10.0
, itemWidth: 25.0
, itemHeight: 14.0
, formatter: Nothing
--, formatter: Nothing
, selectedMode: selectedMode $ Bool true
, inactiveColor: violet
, selected: Nothing
--- selected: Nothing
, textStyle: textStyle
, "data": [data1]
}
......
......@@ -2,7 +2,6 @@ module Gargantext.Components.Charts.Options.Type where
import Prelude
import Data.Maybe (Maybe)
import Gargantext.Components.Charts.Options.Color (Color)
import Gargantext.Components.Charts.Options.Data (DataLegend, DataAxis)
import Gargantext.Components.Charts.Options.Font (TextStyle, Tooltip)
......@@ -15,21 +14,22 @@ import Unsafe.Coerce (unsafeCoerce)
newtype ChartAlign = ChartAlign String
-- TODO: Not sure that Maybe is working here => use Optional
-- TODO: Maybe is not working here => use Optional
type Echarts =
{ className :: Maybe String
, style :: Maybe String -- objealect-black-altdarkmincnaquadahherry-blossomect,
, theme :: Maybe String
, group :: Maybe String
, option :: Option -- PropTypes.object.isRequired,
, initOpts :: Maybe String -- PropTypes.object,
, notMerge :: Maybe Boolean
, lazyUpdate :: Maybe Boolean
, loading :: Maybe Boolean
, optsLoading :: Maybe OptsLoading -- PropTypes.object,
, onReady :: Maybe String -- PropTypes.func,
, resizable :: Maybe Boolean -- PropTypes.bool,
, onEvents :: Maybe String -- PropTypes.object
{ option :: Option -- PropTypes.object.isRequired,
--, className :: Maybe String
--, style :: Maybe String -- objealect-black-altdarkmincnaquadahherry-blossomect,
--, theme :: Maybe String
--, group :: Maybe String
--, initOpts :: Maybe String -- PropTypes.object,
--, notMerge :: Maybe Boolean
--, lazyUpdate :: Maybe Boolean
--, loading :: Maybe Boolean
--, optsLoading :: Maybe OptsLoading -- PropTypes.object,
--, onReady :: Maybe String -- PropTypes.func,
--, resizable :: Maybe Boolean -- PropTypes.bool,
--, onEvents :: Maybe String -- PropTypes.object
}
type Option =
......@@ -112,10 +112,10 @@ type Legend =
, itemGap :: Number
, itemWidth :: Number
, itemHeight :: Number
, formatter :: Maybe String
--, formatter :: Maybe String
, selectedMode :: SelectedMode
, inactiveColor :: Color
, selected :: Maybe String -- object
--, selected :: Maybe String -- object
, textStyle :: TextStyle
, "data" :: Array DataLegend
}
......
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