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
965fbb30
Unverified
Commit
965fbb30
authored
Apr 08, 2019
by
Nicolas Pouillard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ECharts] hide the usage of Maybe (does not work)
parent
d9b6a94a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
32 deletions
+31
-32
ECharts.purs
src/Gargantext/Components/Charts/Options/ECharts.purs
+14
-15
Type.purs
src/Gargantext/Components/Charts/Options/Type.purs
+17
-17
No files found.
src/Gargantext/Components/Charts/Options/ECharts.purs
View file @
965fbb30
...
@@ -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]
}
}
...
...
src/Gargantext/Components/Charts/Options/Type.purs
View file @
965fbb30
...
@@ -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
}
}
...
...
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