@@ -70,6 +70,9 @@ shown = visible true
7070hidden ∷ ∀ i . DSL (show ∷ I |i )
7171hidden = visible false
7272
73+ showTitle ∷ ∀ i . Boolean → DSL (showTitle ∷ I |i )
74+ showTitle a = set " showTitle" $ toForeign a
75+
7376textStyle ∷ ∀ i . DSL TP.TextStyleI → DSL (textStyle ∷ I |i )
7477textStyle a = set " textStyle" $ buildObj a
7578
@@ -373,6 +376,9 @@ label = set "label" <<< buildObj
373376normalLabel ∷ ∀ i . DSL TP.LabelInnerI → DSL (normal ∷ R TP.LabelInnerI |i )
374377normalLabel = normal
375378
379+ precision ∷ ∀ i . Number → DSL (precision ∷ I |i )
380+ precision = set " precision" <<< toForeign
381+
376382emphasisLabel ∷ ∀ i . DSL TP.LabelInnerI → DSL (emphasis ∷ R TP.LabelInnerI |i )
377383emphasisLabel = emphasis
378384
@@ -898,6 +904,15 @@ markType = set "type" <<< toForeign
898904margin ∷ ∀ i . Int → DSL (margin ∷ I |i )
899905margin = set " margin" <<< toForeign
900906
907+ markLine ∷ ∀ i . DSL TP.MarkLineI → DSL (markLine ∷ I |i )
908+ markLine = set " markLine" <<< buildObj
909+
910+ markPoint ∷ ∀ i . DSL TP.MarkPointI → DSL (markPoint ∷ I |i )
911+ markPoint = set " markPoint" <<< buildObj
912+
913+ markArea ∷ ∀ i . DSL TP.MarkAreaI → DSL (markArea ∷ I |i )
914+ markArea = set " markArea" <<< buildObj
915+
901916repulsion ∷ ∀ i . Number → DSL (repulsion ∷ I |i )
902917repulsion = set " repulsion" <<< toForeign
903918
@@ -934,6 +949,14 @@ colorSource = set "color" $ toForeign "source"
934949colorTarget ∷ ∀ i . DSL (color ∷ I |i )
935950colorTarget = set " target" $ toForeign " target"
936951
952+ buildCoord ∷ ∀ i . DSL TP.PointI → DSL (coord ∷ I |i )
953+ buildCoord dsl =
954+ let
955+ xx = get " x" dsl
956+ yy = get " y" dsl
957+ in
958+ set " coord" $ toForeign $ Arr .catMaybes [ xx, yy ]
959+
937960buildCenter ∷ ∀ i . DSL TP.PointI → DSL (center ∷ I |i )
938961buildCenter dsl =
939962 let
@@ -974,6 +997,15 @@ setZ ∷ ∀ i. DSL TP.DimensionI → DSL (z ∷ I|i)
974997setZ dsl =
975998 F .traverse_ (set " z" ) $ lastWithKeys [" pixels" , " percents" ] dsl
976999
1000+ coordXIx ∷ ∀ i . Int → DSL (x ∷ I |i )
1001+ coordXIx = set " x" <<< toForeign
1002+
1003+ coordXValue ∷ ∀ i . String → DSL (x ∷ I |i )
1004+ coordXValue = set " x" <<< toForeign
1005+
1006+ coordY ∷ ∀ i . String → DSL (y ∷ I |i )
1007+ coordY = set " y" <<< toForeign
1008+
9771009pixels ∷ ∀ i . Int → DSL (pixels ∷ I |i )
9781010pixels = set " pixels" <<< toForeign
9791011
@@ -1037,4 +1069,4 @@ addDateValue dt =
10371069 where
10381070 year' = show <<< fromEnum <<< year
10391071 month' = show <<< fromEnum <<< month
1040- day' = show <<< fromEnum <<< day
1072+ day' = show <<< fromEnum <<< day
0 commit comments