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
6d4ec0f0
Commit
6d4ec0f0
authored
May 17, 2018
by
Mael NICOLAS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
working on type, need to see why existencial type doesn't compile
parent
de941309
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
46 deletions
+52
-46
Types.purs
src/Charts/Types.purs
+52
-46
No files found.
src/Charts/Types.purs
View file @
6d4ec0f0
module Charts.Types where
module Charts.Types where
import Data.Maybe(Maybe(..))
import Prelude ((<>), show, ($))
import Data.Maybe(Maybe)
import Data.Either(Either)
import Data.String (toLower)
import Data.Generic (class Generic, gShow)
import CSS (Color)
import CSS (Color)
-- eCharts Props
type NumberOrArray = Either Number (Array Number)
-- className :: String -> from React DOM Props
data Top = Top | Middle | Bottom
-- style :: String, -- object,
derive instance genericTop :: Generic Top
-- group :: String,
data Position relative = Flat Number | Percent Number | Relative relative -- 20 | 20% | top
-- option :: Option, -- PropTypes.object.isRequired,
-- initOpts :: String, -- PropTypes.object,
class InitialB r
-- notMerge :: Boolean,
instance nightOfNumber :: InitialB Number
-- lazyUpdate:: Boolean
instance runningInTheString :: InitialB String
-- loading :: Boolean,
-- optsLoading:: OptsLoading, -- PropTypes.object,
displayTopPosition :: forall a. InitialB a => Position Top -> a
-- onReady :: String, -- PropTypes.func,
displayTopPosition (Flat n) = n
-- resizable :: Boolean, -- PropTypes.bool,
displayTopPosition (Percent n) = (show n) <> "%"
-- onEvents :: String -- PropTypes.object
displayTopPosition (Relative r) = toLower $ gShow r
type Echarts =
type Echarts =
{ className :: Maybe String,
{ className :: Maybe String,
...
@@ -35,14 +39,6 @@ type Echarts =
...
@@ -35,14 +39,6 @@ type Echarts =
onEvents :: Maybe String -- PropTypes.object
onEvents :: Maybe String -- PropTypes.object
}
}
type OptsLoading =
{ text :: String,
color :: Color, --- color
textColor :: Color, --color
maskColor :: Color, --color
zlevel :: Int
}
type Option =
type Option =
{ title :: Maybe Title
{ title :: Maybe Title
, legend :: Maybe Legend
, legend :: Maybe Legend
...
@@ -55,33 +51,43 @@ type Option =
...
@@ -55,33 +51,43 @@ type Option =
}
}
type Title =
type Title =
{ text :: String
{
, show :: Boolean
id :: Maybe String
, link :: String
, show :: Boolean -- default True
, target :: String
, text :: Maybe String -- default ''
, link :: Maybe String -- default ''
, target :: String -- default 'blank'
, textStyle :: TextStyle
, textStyle :: TextStyle
, subtext
:: String
, subtext
:: String -- default ''
, sublink
:: String
, sublink
:: String -- default ''
, subtarget
:: String
, subtarget
:: String -- default 'blank'
, subtextStyle :: SubtextStyle
, subtextStyle :: SubtextStyle
, padding
:: Number
, padding
:: Number -- default '5'
, itemGap
:: Number
, itemGap
:: Number -- default '10'
, zlevel
:: Number
, zlevel
:: Number -- default '0'
, z
:: Number
, z
:: Number -- default '2'
, left
:: Number
, left
:: Number -- default 'auto'
, top
:: Number
, top
:: Number -- default 'auto'
, right
:: Number
, right
:: Number -- default 'auto'
, bottom
:: Number
, bottom
:: Number -- default 'auto'
, backgroundColor :: Color
, backgroundColor :: Color
-- default 'transparent''
, borderColor
:: Color
, borderColor
:: Color -- default '#ccc'
, borderWidth
:: Number
, borderWidth
:: Number -- default '1'
, borderRadius
:: Number --
data NumberOrArray = Number | Array Number
, borderRadius
:: Number -- default 0;
data NumberOrArray = Number | Array Number
, shadowBlur :: Number
, shadowBlur :: Number
, shadowColor :: Color
, shadowColor :: Color
, shadowOffsetX :: Number
, shadowOffsetX :: Number
, shadowOffsetY :: Number
, shadowOffsetY :: Number
}
}
type OptsLoading =
{ text :: String,
color :: Color, --- color
textColor :: Color, --color
maskColor :: Color, --color
zlevel :: Int
}
type DataZoom =
type DataZoom =
{"type" :: String
{"type" :: String
, xAxisIndex :: Int
, xAxisIndex :: Int
...
...
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