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

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