Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

Commit

Permalink
Merge pull request #50 from jacereda/master
Browse files Browse the repository at this point in the history
Add dataZoom/dataZoomFeature
  • Loading branch information
cryogenian authored Nov 3, 2017
2 parents 4866c2c + 806e5f0 commit b3160c7
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions example/src/Bar.purs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ options inp = do
E.magics do
E.magicStack
E.magicTiled
E.dataZoomFeature E.shown
E.dataView $ pure unit


Expand Down
4 changes: 4 additions & 0 deletions example/src/Scatter.purs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ options sinData cosData = do
E.symbolSize 2
E.items cosData

E.dataZoom do
E.sliderDataZoom E.shown
E.insideDataZoom $ pure unit

chart e. Eff (dom DOM, echarts ET.ECHARTS, exception EXCEPTION, random RANDOM|e) Unit
chart = do
chart' (ElementId "scatter-1") Nothing
Expand Down
12 changes: 12 additions & 0 deletions src/ECharts/Commands.purs
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,15 @@ clear = set' "" $ toForeign "clear"
setClear i m. Monad m String DSL (clear I|i) m
setClear a = set' "clear" $ toForeign a

dataZoom i m. Monad m CommandsT TP.DataZoomI m ~> CommandsT (dataZoom I|i) m
dataZoom = set "dataZoom" <=< buildSeries

insideDataZoom i m. Monad m CommandsT TP.InsideDataZoomI m ~> CommandsT (insideDataZoom I|i) m
insideDataZoom = set "inside" <=< buildObj

sliderDataZoom i m. Monad m CommandsT TP.SliderDataZoomI m ~> CommandsT (sliderDataZoom I|i) m
sliderDataZoom = set "slider" <=< buildObj

toolbox i m. Monad m CommandsT TP.ToolboxI m ~> CommandsT (toolbox I|i) m
toolbox a = set "toolbox" =<< buildObj a

Expand Down Expand Up @@ -537,6 +546,9 @@ magicTiled = set' "" $ toForeign "tiled"
dataView i m. Monad m CommandsT TP.DataViewI m ~> CommandsT (dataView I|i) m
dataView a = set "dataView" =<< buildObj a

dataZoomFeature i m. Monad m CommandsT TP.DataZoomFeatureI m ~> CommandsT (dataZoom I|i) m
dataZoomFeature = set "dataZoom" <=< buildObj

splitArea i m. Monad m CommandsT TP.SplitAreaI m ~> CommandsT (splitArea I|i) m
splitArea a = set "splitArea" =<< buildObj a

Expand Down
2 changes: 1 addition & 1 deletion src/ECharts/Types/Phantom.purs
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ type DataZoomMixinI i =

type InsideDataZoomI = DataZoomMixinI ()

type SliderDataZoom =
type SliderDataZoomI =
PositionMixin
(ZMixin
( showI
Expand Down

0 comments on commit b3160c7

Please sign in to comment.