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

Commit 806e5f0

Browse files
committed
Add dataZoom/dataZoomFeature
1 parent 4866c2c commit 806e5f0

File tree

4 files changed

+18
-1
lines changed

4 files changed

+18
-1
lines changed

example/src/Bar.purs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ options inp = do
6666
E.magics do
6767
E.magicStack
6868
E.magicTiled
69+
E.dataZoomFeature E.shown
6970
E.dataView $ pure unit
7071

7172

example/src/Scatter.purs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ options sinData cosData = do
9595
E.symbolSize 2
9696
E.items cosData
9797

98+
E.dataZoom do
99+
E.sliderDataZoom E.shown
100+
E.insideDataZoom $ pure unit
101+
98102
chart e. Eff (dom DOM, echarts ET.ECHARTS, exception EXCEPTION, random RANDOM|e) Unit
99103
chart = do
100104
chart' (ElementId "scatter-1") Nothing

src/ECharts/Commands.purs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,15 @@ clear = set' "" $ toForeign "clear"
507507
setClear i m. Monad m String DSL (clear I|i) m
508508
setClear a = set' "clear" $ toForeign a
509509

510+
dataZoom i m. Monad m CommandsT TP.DataZoomI m ~> CommandsT (dataZoom I|i) m
511+
dataZoom = set "dataZoom" <=< buildSeries
512+
513+
insideDataZoom i m. Monad m CommandsT TP.InsideDataZoomI m ~> CommandsT (insideDataZoom I|i) m
514+
insideDataZoom = set "inside" <=< buildObj
515+
516+
sliderDataZoom i m. Monad m CommandsT TP.SliderDataZoomI m ~> CommandsT (sliderDataZoom I|i) m
517+
sliderDataZoom = set "slider" <=< buildObj
518+
510519
toolbox i m. Monad m CommandsT TP.ToolboxI m ~> CommandsT (toolbox I|i) m
511520
toolbox a = set "toolbox" =<< buildObj a
512521

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

549+
dataZoomFeature i m. Monad m CommandsT TP.DataZoomFeatureI m ~> CommandsT (dataZoom I|i) m
550+
dataZoomFeature = set "dataZoom" <=< buildObj
551+
540552
splitArea i m. Monad m CommandsT TP.SplitAreaI m ~> CommandsT (splitArea I|i) m
541553
splitArea a = set "splitArea" =<< buildObj a
542554

src/ECharts/Types/Phantom.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ type DataZoomMixinI i =
314314

315315
type InsideDataZoomI = DataZoomMixinI ()
316316

317-
type SliderDataZoom =
317+
type SliderDataZoomI =
318318
PositionMixin
319319
(ZMixin
320320
( show I

0 commit comments

Comments
 (0)