Commit 281327fe authored by Alexandre Delanoë's avatar Alexandre Delanoë

[COSMETICS] reading code.

parent 29eb4675
......@@ -44,47 +44,47 @@ group = unsafeMkProps "group"
-- onEvents :: String -- PropTypes.object
type EchartsProps eff =
{ className :: String,
style :: String, -- object,
theme :: String,
group :: String,
option :: Option, -- PropTypes.object.isRequired,
initOpts :: String, -- PropTypes.object,
notMerge :: Boolean,
lazyUpdate:: Boolean,
loading :: Boolean,
optsLoading:: OptsLoading, -- PropTypes.object,
onReady :: String, -- PropTypes.func,
resizable :: Boolean, -- PropTypes.bool,
onEvents :: String -- PropTypes.object
{ className :: String,
style :: String, -- object,
theme :: String,
group :: String,
option :: Option, -- PropTypes.object.isRequired,
initOpts :: String, -- PropTypes.object,
notMerge :: Boolean,
lazyUpdate :: Boolean,
loading :: Boolean,
optsLoading :: OptsLoading, -- PropTypes.object,
onReady :: String, -- PropTypes.func,
resizable :: Boolean, -- PropTypes.bool,
onEvents :: String -- PropTypes.object
}
type OptsLoading =
{ text :: String,
color :: Color, --- color
{ text :: String,
color :: Color, --- color
textColor :: Color, --color
maskColor:: Color, --color
zlevel :: Int
maskColor :: Color, --color
zlevel :: Int
}
type Option =
{ title :: Title
, legend :: Legend
, tooltip :: Tooltip
, grid :: Grid
, xAxis :: Array XAxis
, yAxis :: Array YAxis
, series :: Array Series
{ title :: Title
, legend :: Legend
, tooltip :: Tooltip
, grid :: Grid
, xAxis :: Array XAxis
, yAxis :: Array YAxis
, series :: Array Series
, dataZoom :: Array DataZoom
}
type DataZoom =
{"type":: String
, xAxisIndex:: Int
, filterMode:: String
, start:: Int
, end:: Int
{"type" :: String
, xAxisIndex :: Int
, filterMode :: String
, start :: Int
, end :: Int
}
type Grid =
......@@ -92,66 +92,66 @@ type Grid =
}
type Legend =
{"type" :: String
, show :: Boolean
{"type" :: String
, show :: Boolean
, zlevel :: Number
, z :: Number
, left :: Number
, top :: Number
, right :: Number
, z :: Number
, left :: Number
, top :: Number
, right :: Number
, bottom :: Number
, width :: Number
, width :: Number
, height :: Number
, orient :: String
, align :: String
, padding :: Number
, itemGap :: Number
, itemWidth :: Number
, itemHeight :: Number
, formatter :: String
, selectedMode :: Boolean
, align :: String
, padding :: Number
, itemGap :: Number
, itemWidth :: Number
, itemHeight :: Number
, formatter :: String
, selectedMode :: Boolean
, inactiveColor :: Color
, selected :: String -- object
, "data" :: Array Data
, selected :: String -- object
, "data" :: Array Data
}
type Data =
{name :: String
, icon :: String
{ name :: String
, icon :: String
, textStyle :: {}
}
type SubtextStyle =
{ color :: Color
, fontStyle :: String
{ color :: Color
, fontStyle :: String
, fontWeight :: String
, fontFamily :: String
, fontSize :: Int
, align :: String
, fontSize :: Int
, align :: String
, verticalAlign :: String
, lineHeight :: Number
, width :: Number
, height :: Number
, lineHeight :: Number
, width :: Number
, height :: Number
, textBorderColor :: String
, textBorderWidth :: Number
, textShadowColor :: String
, textShadowBlur :: Number
, textShadowBlur :: Number
, textShadowOffsetX :: Number
, textShadowOffsetY :: Number
, rich :: Rich
, rich :: Rich
}
type Tooltip =
{ trigger :: String
{ trigger :: String
, formatter :: String -- TODO function
}
type XAxis =
{ "data" :: Array String
, "type" :: String
{ "data" :: Array String
, "type" :: String
, axisTick :: AxisTick
}
type AxisTick =
......@@ -160,10 +160,10 @@ type AxisTick =
}
type YAxis =
{ "type" :: String
, name :: String
, min :: Int
, position :: String
{ "type" :: String
, name :: String
, min :: Int
, position :: String
, axisLabel :: AxisLabel
}
......@@ -173,37 +173,37 @@ type AxisLabel =
type Series =
{name :: String
{ name :: String
, "type" :: String
, "data" :: Array Int
}
type Title =
{ text :: String
, show :: Boolean
, link :: String
, target :: String
, textStyle :: TextStyle
, subtext :: String
, sublink :: String
, subtarget :: String
{ text :: String
, show :: Boolean
, link :: String
, target :: String
, textStyle :: TextStyle
, subtext :: String
, sublink :: String
, subtarget :: String
, subtextStyle :: SubtextStyle
, padding :: Number
, itemGap :: Number
, zlevel :: Number
, z :: Number
, left :: Number
, top :: Number
, right :: Number
, bottom :: Number
, padding :: Number
, itemGap :: Number
, zlevel :: Number
, z :: Number
, left :: Number
, top :: Number
, right :: Number
, bottom :: Number
, backgroundColor :: Color
, borderColor :: Color
, borderWidth :: Number
, borderRadius :: Number -- NumberOrArray
, shadowBlur :: Number
, shadowColor :: Color
, shadowOffsetX :: Number
, shadowOffsetY :: Number
, borderColor :: Color
, borderWidth :: Number
, borderRadius :: Number -- NumberOrArray
, shadowBlur :: Number
, shadowColor :: Color
, shadowOffsetX :: Number
, shadowOffsetY :: Number
}
-- data NumberOrArray = Number | Array Number
......@@ -224,23 +224,23 @@ loading :: Boolean -> Props
loading = unsafeMkProps "loading"
type TextStyle =
{ color :: Color
, fontStyle :: String
{ color :: Color
, fontStyle :: String
, fontWeight :: String
, fontFamily :: String
, fontSize :: Int
, align :: String
, verticalAlign :: String
, lineHeight :: Int
, width :: Int
, height :: Int
, fontSize :: Int
, align :: String
, verticalAlign :: String
, lineHeight :: Int
, width :: Int
, height :: Int
, textBorderColor :: String
, textBorderWidth :: Int
, textShadowColor :: String
, textShadowBlur :: Int
, textShadowBlur :: Int
, textShadowOffsetX :: Int
, textShadowOffsetY :: Int
, rich :: Rich
, rich :: Rich
}
foreign import data TextStyleProps :: Type
......@@ -439,7 +439,6 @@ sd1 = unsafeFromPropsArray
, data' [95, 80, 75, 35, 30, 50, 70, 80, 95, 95, 95, 99]
]
sd3 = unsafeFromPropsArray
[ name "All"
, type' "bar"
......
......@@ -80,7 +80,7 @@ jumboTitle b = div jumbo
]
where
jumbo = case b of
true -> [className "jumbotron" ]
true -> [className "jumbotron"]
false -> []
......
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