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 #44 from cryogenian/mark-items
Browse files Browse the repository at this point in the history
Mark items
  • Loading branch information
cryogenian authored Aug 21, 2017
2 parents 1d3d414 + 8ccb3a7 commit 3a63c19
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
15 changes: 15 additions & 0 deletions example/src/K.purs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,21 @@ options = do
E.min 2200.0
E.scale true
E.series $ E.candlestick do
E.markLine do
E.lineStyle $ E.normal do
E.solidLine
E.buildMarkItems do
E.addItem do
E.symbol ET.Diamond
E.buildCoord do
E.coordXValue "2013/1/24"
E.coordY "2200.00"
E.addItem do
E.symbol ET.Diamond
E.buildCoord do
E.coordXValue "2013/1/29"
E.coordY "2300.00"

E.buildItems
$ F.traverse_ (E.addItem <<< E.values)
[ [ 2320.26, 2302.6, 2287.3, 2362.94 ]
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "purescript-echarts",
"private": true,
"devDependencies": {
"echarts": "^3.3.1",
"echarts": "3.5.4",
"express": "^4.14.0"
},
"scripts": {
Expand Down
3 changes: 3 additions & 0 deletions src/ECharts/Commands.purs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ addItem = set "" <<< buildObj
buildItems i. DSL TP.ItemsI DSL (items I|i)
buildItems is = set "data" $ buildArr is

buildMarkItems i. DSL TP.ItemsI DSL (markItems I|i)
buildMarkItems is = set "data" $ toForeign [ buildArr is ]

calendarIndex i. Int DSL (calendarIndex I|i)
calendarIndex i = set "calendarIndex" $ toForeign i

Expand Down
4 changes: 2 additions & 2 deletions src/ECharts/Types/Phantom.purs
Original file line number Diff line number Diff line change
Expand Up @@ -1180,13 +1180,13 @@ type MarkLineI =
, labelI
, silentI
, lineStyleR (NormalAndEmphasis LineStyleI)
, itemsI))
, markItemsI))

type MarkAreaI =
AnimationMixin
( labelI
, itemStyleI
, itemsI)
, markItemsI)

type RippleEffectI =
( periodI
Expand Down

0 comments on commit 3a63c19

Please sign in to comment.