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

Commit 3a63c19

Browse files
authored
Merge pull request #44 from cryogenian/mark-items
Mark items
2 parents 1d3d414 + 8ccb3a7 commit 3a63c19

File tree

4 files changed

+21
-3
lines changed

4 files changed

+21
-3
lines changed

example/src/K.purs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,21 @@ options = do
3131
E.min 2200.0
3232
E.scale true
3333
E.series $ E.candlestick do
34+
E.markLine do
35+
E.lineStyle $ E.normal do
36+
E.solidLine
37+
E.buildMarkItems do
38+
E.addItem do
39+
E.symbol ET.Diamond
40+
E.buildCoord do
41+
E.coordXValue "2013/1/24"
42+
E.coordY "2200.00"
43+
E.addItem do
44+
E.symbol ET.Diamond
45+
E.buildCoord do
46+
E.coordXValue "2013/1/29"
47+
E.coordY "2300.00"
48+
3449
E.buildItems
3550
$ F.traverse_ (E.addItem <<< E.values)
3651
[ [ 2320.26, 2302.6, 2287.3, 2362.94 ]

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "purescript-echarts",
33
"private": true,
44
"devDependencies": {
5-
"echarts": "^3.3.1",
5+
"echarts": "3.5.4",
66
"express": "^4.14.0"
77
},
88
"scripts": {

src/ECharts/Commands.purs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ addItem = set "" <<< buildObj
118118
buildItems i. DSL TP.ItemsI DSL (items I|i)
119119
buildItems is = set "data" $ buildArr is
120120

121+
buildMarkItems i. DSL TP.ItemsI DSL (markItems I|i)
122+
buildMarkItems is = set "data" $ toForeign [ buildArr is ]
123+
121124
calendarIndex i. Int DSL (calendarIndex I|i)
122125
calendarIndex i = set "calendarIndex" $ toForeign i
123126

src/ECharts/Types/Phantom.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,13 +1180,13 @@ type MarkLineI =
11801180
, label I
11811181
, silent I
11821182
, lineStyle R (NormalAndEmphasis LineStyleI)
1183-
, items I))
1183+
, markItems I))
11841184

11851185
type MarkAreaI =
11861186
AnimationMixin
11871187
( label I
11881188
, itemStyle I
1189-
, items I)
1189+
, markItems I)
11901190

11911191
type RippleEffectI =
11921192
( period I

0 commit comments

Comments
 (0)