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
142
Issues
142
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
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
gargantext
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
Hide 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
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]
}
...
...
src/Gargantext/Components/Charts/Options/Type.purs
View file @
965fbb30
...
...
@@ -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
}
...
...
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