@oanda/labs-order-book-widget 1.0.51 → 1.0.53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,402 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 1.0.53 (2023-12-13)
7
+
8
+
9
+
10
+ ## 1.0.52 (2023-12-13)
11
+
12
+
13
+
14
+ ## 1.0.51 (2023-12-07)
15
+
16
+
17
+
18
+ ## 1.0.50 (2023-12-04)
19
+
20
+
21
+
22
+ ## 1.0.49 (2023-12-01)
23
+
24
+
25
+
26
+ ## 1.0.48 (2023-12-01)
27
+
28
+
29
+
30
+ ## 1.0.47 (2023-11-29)
31
+
32
+
33
+
34
+ ## 1.0.46 (2023-11-28)
35
+
36
+
37
+
38
+ ## 1.0.45 (2023-11-23)
39
+
40
+
41
+
42
+ ## 1.0.44 (2023-11-22)
43
+
44
+
45
+
46
+ ## 1.0.43 (2023-11-15)
47
+
48
+
49
+
50
+ ## 1.0.42 (2023-11-10)
51
+
52
+
53
+
54
+ ## 1.0.41 (2023-11-03)
55
+
56
+
57
+
58
+ ## 1.0.40 (2023-11-02)
59
+
60
+
61
+
62
+ ## 1.0.39 (2023-11-02)
63
+
64
+
65
+
66
+ ## 1.0.38 (2023-10-26)
67
+
68
+
69
+
70
+ ## 1.0.37 (2023-10-26)
71
+
72
+
73
+
74
+ ## 1.0.36 (2023-10-25)
75
+
76
+
77
+
78
+ ## 1.0.35 (2023-10-24)
79
+
80
+
81
+
82
+ ## 1.0.34 (2023-10-23)
83
+
84
+
85
+
86
+ ## 1.0.33 (2023-10-23)
87
+
88
+
89
+
90
+ ## 1.0.32 (2023-10-23)
91
+
92
+
93
+
94
+ ## 1.0.31 (2023-10-20)
95
+
96
+
97
+
98
+ ## 1.0.30 (2023-10-19)
99
+
100
+
101
+
102
+ ## 1.0.29 (2023-10-19)
103
+
104
+
105
+
106
+ ## 1.0.28 (2023-10-19)
107
+
108
+
109
+
110
+ ## 1.0.27 (2023-10-18)
111
+
112
+
113
+
114
+ ## 1.0.26 (2023-10-18)
115
+
116
+
117
+
118
+ ## 1.0.25 (2023-10-17)
119
+
120
+
121
+
122
+ ## 1.0.24 (2023-10-13)
123
+
124
+
125
+
126
+ ## 1.0.23 (2023-10-13)
127
+
128
+
129
+
130
+ ## 1.0.22 (2023-10-11)
131
+
132
+
133
+
134
+ ## 1.0.21 (2023-10-10)
135
+
136
+
137
+
138
+ ## 1.0.20 (2023-10-06)
139
+
140
+
141
+
142
+ ## 1.0.19 (2023-10-06)
143
+
144
+
145
+
146
+ ## 1.0.18 (2023-10-05)
147
+
148
+
149
+
150
+ ## 1.0.17 (2023-10-04)
151
+
152
+
153
+
154
+ ## 1.0.16 (2023-10-04)
155
+
156
+
157
+
158
+ ## 1.0.15 (2023-10-04)
159
+
160
+
161
+
162
+ ## 1.0.14 (2023-10-03)
163
+
164
+
165
+
166
+ ## 1.0.13 (2023-10-03)
167
+
168
+
169
+
170
+ ## 1.0.12 (2023-10-03)
171
+
172
+
173
+
174
+ ## 1.0.11 (2023-10-02)
175
+
176
+
177
+
178
+ ## 1.0.10 (2023-09-29)
179
+
180
+
181
+
182
+ ## 1.0.9 (2023-09-28)
183
+
184
+
185
+
186
+ ## 1.0.8 (2023-09-27)
187
+
188
+
189
+
190
+ ## 1.0.7 (2023-09-26)
191
+
192
+
193
+
194
+ ## 1.0.6 (2023-09-21)
195
+
196
+
197
+
198
+ ## 1.0.5 (2023-09-13)
199
+
200
+ **Note:** Version bump only for package @oanda/labs-order-book-widget
201
+
202
+
203
+
204
+
205
+
206
+ ## 1.0.52 (2023-12-13)
207
+
208
+
209
+
210
+ ## 1.0.51 (2023-12-07)
211
+
212
+
213
+
214
+ ## 1.0.50 (2023-12-04)
215
+
216
+
217
+
218
+ ## 1.0.49 (2023-12-01)
219
+
220
+
221
+
222
+ ## 1.0.48 (2023-12-01)
223
+
224
+
225
+
226
+ ## 1.0.47 (2023-11-29)
227
+
228
+
229
+
230
+ ## 1.0.46 (2023-11-28)
231
+
232
+
233
+
234
+ ## 1.0.45 (2023-11-23)
235
+
236
+
237
+
238
+ ## 1.0.44 (2023-11-22)
239
+
240
+
241
+
242
+ ## 1.0.43 (2023-11-15)
243
+
244
+
245
+
246
+ ## 1.0.42 (2023-11-10)
247
+
248
+
249
+
250
+ ## 1.0.41 (2023-11-03)
251
+
252
+
253
+
254
+ ## 1.0.40 (2023-11-02)
255
+
256
+
257
+
258
+ ## 1.0.39 (2023-11-02)
259
+
260
+
261
+
262
+ ## 1.0.38 (2023-10-26)
263
+
264
+
265
+
266
+ ## 1.0.37 (2023-10-26)
267
+
268
+
269
+
270
+ ## 1.0.36 (2023-10-25)
271
+
272
+
273
+
274
+ ## 1.0.35 (2023-10-24)
275
+
276
+
277
+
278
+ ## 1.0.34 (2023-10-23)
279
+
280
+
281
+
282
+ ## 1.0.33 (2023-10-23)
283
+
284
+
285
+
286
+ ## 1.0.32 (2023-10-23)
287
+
288
+
289
+
290
+ ## 1.0.31 (2023-10-20)
291
+
292
+
293
+
294
+ ## 1.0.30 (2023-10-19)
295
+
296
+
297
+
298
+ ## 1.0.29 (2023-10-19)
299
+
300
+
301
+
302
+ ## 1.0.28 (2023-10-19)
303
+
304
+
305
+
306
+ ## 1.0.27 (2023-10-18)
307
+
308
+
309
+
310
+ ## 1.0.26 (2023-10-18)
311
+
312
+
313
+
314
+ ## 1.0.25 (2023-10-17)
315
+
316
+
317
+
318
+ ## 1.0.24 (2023-10-13)
319
+
320
+
321
+
322
+ ## 1.0.23 (2023-10-13)
323
+
324
+
325
+
326
+ ## 1.0.22 (2023-10-11)
327
+
328
+
329
+
330
+ ## 1.0.21 (2023-10-10)
331
+
332
+
333
+
334
+ ## 1.0.20 (2023-10-06)
335
+
336
+
337
+
338
+ ## 1.0.19 (2023-10-06)
339
+
340
+
341
+
342
+ ## 1.0.18 (2023-10-05)
343
+
344
+
345
+
346
+ ## 1.0.17 (2023-10-04)
347
+
348
+
349
+
350
+ ## 1.0.16 (2023-10-04)
351
+
352
+
353
+
354
+ ## 1.0.15 (2023-10-04)
355
+
356
+
357
+
358
+ ## 1.0.14 (2023-10-03)
359
+
360
+
361
+
362
+ ## 1.0.13 (2023-10-03)
363
+
364
+
365
+
366
+ ## 1.0.12 (2023-10-03)
367
+
368
+
369
+
370
+ ## 1.0.11 (2023-10-02)
371
+
372
+
373
+
374
+ ## 1.0.10 (2023-09-29)
375
+
376
+
377
+
378
+ ## 1.0.9 (2023-09-28)
379
+
380
+
381
+
382
+ ## 1.0.8 (2023-09-27)
383
+
384
+
385
+
386
+ ## 1.0.7 (2023-09-26)
387
+
388
+
389
+
390
+ ## 1.0.6 (2023-09-21)
391
+
392
+
393
+
394
+ ## 1.0.5 (2023-09-13)
395
+
396
+ **Note:** Version bump only for package @oanda/labs-order-book-widget
397
+
398
+
399
+
400
+
401
+
6
402
  ## 1.0.51 (2023-12-07)
7
403
 
8
404
 
@@ -96,9 +96,7 @@ const getOptions = _ref => {
96
96
  dataset: {
97
97
  source: data
98
98
  },
99
- textStyle: {
100
- ..._labsWidgetCommon.chartSharedOptions.textStyle
101
- },
99
+ textStyle: {},
102
100
  tooltip: {
103
101
  trigger: 'axis',
104
102
  borderRadius: 0,
@@ -106,9 +104,7 @@ const getOptions = _ref => {
106
104
  shadowOffsetX: 0,
107
105
  shadowOffsetY: 6,
108
106
  shadowColor: 'rgba(0,0,0,0.1)',
109
- textStyle: {
110
- ..._labsWidgetCommon.chartSharedOptions.textStyle
111
- },
107
+ textStyle: {},
112
108
  formatter: params => {
113
109
  const values = params[0].data;
114
110
  return `Price: ${values[0]}<br />Buy: ${values[1]}%<br/>Sell: ${Math.abs(values[2])}%`;
@@ -122,21 +118,18 @@ const getOptions = _ref => {
122
118
  left: '1px',
123
119
  right: '121px',
124
120
  bottom: '41px',
125
- borderColor: _labsWidgetCommon.chartSharedOptions.colors.axis,
126
121
  show: true
127
122
  }, {
128
123
  bottom: '1px',
129
124
  right: '1px',
130
125
  width: '120px',
131
126
  height: '40px',
132
- borderColor: _labsWidgetCommon.chartSharedOptions.colors.axis,
133
127
  show: true
134
128
  }, {
135
129
  top: '1px',
136
130
  left: '1px',
137
131
  right: '1px',
138
132
  bottom: '1px',
139
- borderColor: _labsWidgetCommon.chartSharedOptions.colors.axis,
140
133
  show: true
141
134
  }],
142
135
  graphic: [{
@@ -214,9 +207,7 @@ const getOptions = _ref => {
214
207
  show: false
215
208
  },
216
209
  splitLine: {
217
- lineStyle: {
218
- color: _labsWidgetCommon.chartSharedOptions.colors.axis
219
- }
210
+ lineStyle: {}
220
211
  },
221
212
  axisLabel: {
222
213
  padding: [0, 0, 0, 10],
@@ -239,9 +230,7 @@ const getOptions = _ref => {
239
230
  show: false
240
231
  },
241
232
  splitLine: {
242
- lineStyle: {
243
- color: _labsWidgetCommon.chartSharedOptions.colors.axis
244
- }
233
+ lineStyle: {}
245
234
  },
246
235
  axisLabel: {
247
236
  padding: [7, 0, 0, 0],
@@ -1 +1 @@
1
- {"version":3,"file":"getOptions.js","names":["_labsWidgetCommon","require","_constants","getOptions","_ref","data","price","bucketWidth","toolbox","itemSize","itemGap","bottom","right","showTitle","iconStyle","borderColor","emphasis","tooltip","show","backgroundColor","formatter","val","title","position","confine","textStyle","color","feature","myZoomIn","icon","chartSharedOptions","icons","zoomInIcon","onclick","model","instance","startValue","endValue","option","dataZoom","halfZoomValue","ZOOM_BARS","dispatchAction","type","myZoomOut","zoomOutIcon","myResetZoom","resetZoomIcon","INITIAL_BARS","realtime","yAxisIndex","dataset","source","trigger","borderRadius","shadowBlur","shadowOffsetX","shadowOffsetY","shadowColor","params","values","Math","abs","axisPointer","axis","grid","top","left","colors","width","height","graphic","silent","children","z","shape","style","fill","text","yAxis","axisLine","axisTick","splitLine","lineStyle","axisLabel","padding","rich","a","value","index","xAxis","min","max","showMinLabel","showMaxLabel","series","encode","x","y","itemStyle","renderItem","api","yValue","xStart","coord","xEnd","bucketWidthHeight","size","rectShape","markLine","animation","precision","symbol","symbolRotate","symbolSize","label","exports"],"sources":["../../../../../src/OrderBookWidget/components/Chart/getOptions.ts"],"sourcesContent":["import { EChartsOption, Model, EChartsType } from 'echarts';\nimport { chartSharedOptions } from '@oanda/labs-widget-common';\nimport { ZOOM_BARS, INITIAL_BARS } from './constants';\n\nexport const getOptions = (\n {\n data,\n price,\n bucketWidth,\n } :\n {\n data: number[][],\n price: number,\n bucketWidth: number\n },\n): EChartsOption => (\n {\n toolbox: {\n itemSize: 18,\n itemGap: 14,\n bottom: 6,\n right: 6,\n showTitle: false,\n iconStyle: {\n borderColor: '#00214A',\n },\n emphasis: {\n iconStyle: {\n borderColor: '#008573',\n },\n },\n tooltip: {\n show: true,\n backgroundColor: '#00214A',\n formatter: (val) => val.title,\n position: 'top',\n confine: true,\n textStyle: {\n color: '#fff',\n },\n },\n feature: {\n myZoomIn: {\n show: true,\n title: 'Zoom in',\n icon: chartSharedOptions.icons.zoomInIcon,\n onclick: (model: Model, instance: EChartsType) => {\n const { startValue, endValue } = model.option.dataZoom[0];\n // @todo handle zoom with minimal step\n const halfZoomValue = 0.5 * ZOOM_BARS * bucketWidth;\n\n instance.dispatchAction({\n type: 'dataZoom',\n startValue: startValue + halfZoomValue,\n endValue: endValue - halfZoomValue,\n });\n },\n },\n myZoomOut: {\n show: true,\n title: 'Zoom out',\n icon: chartSharedOptions.icons.zoomOutIcon,\n onclick: (model: Model, instance: EChartsType) => {\n const { startValue, endValue } = model.option.dataZoom[0];\n // @todo handle zoom with full chart range\n const halfZoomValue = 0.5 * ZOOM_BARS * bucketWidth;\n\n instance.dispatchAction({\n type: 'dataZoom',\n startValue: startValue - halfZoomValue,\n endValue: endValue + halfZoomValue,\n });\n },\n },\n myResetZoom: {\n show: true,\n title: 'ResetZoom',\n icon: chartSharedOptions.icons.resetZoomIcon,\n onclick: (model: Model, instance: EChartsType) => {\n instance.dispatchAction({\n type: 'dataZoom',\n startValue: price - (bucketWidth * INITIAL_BARS * 0.5),\n endValue: price + (bucketWidth * INITIAL_BARS * 0.5),\n });\n },\n },\n },\n },\n dataZoom: [\n {\n type: 'inside',\n realtime: true,\n startValue: price - (bucketWidth * INITIAL_BARS * 0.5),\n endValue: price + (bucketWidth * INITIAL_BARS * 0.5),\n yAxisIndex: 0,\n // @todo\n // minSpan: 2,\n },\n ],\n dataset: {\n source: data,\n },\n textStyle: {\n ...chartSharedOptions.textStyle,\n },\n tooltip: {\n trigger: 'axis',\n borderRadius: 0,\n shadowBlur: 24,\n shadowOffsetX: 0,\n shadowOffsetY: 6,\n shadowColor: 'rgba(0,0,0,0.1)',\n textStyle: {\n ...chartSharedOptions.textStyle,\n },\n formatter: (params) => {\n const values = (params as { data: number[] }[])[0].data;\n return `Price: ${values[0]}<br />Buy: ${values[1]}%<br/>Sell: ${Math.abs(values[2])}%`;\n },\n axisPointer: {\n axis: 'y',\n },\n },\n grid: [\n {\n top: '1px',\n left: '1px',\n right: '121px',\n bottom: '41px',\n borderColor: chartSharedOptions.colors.axis,\n show: true,\n },\n {\n bottom: '1px',\n right: '1px',\n width: '120px',\n height: '40px',\n borderColor: chartSharedOptions.colors.axis,\n show: true,\n },\n {\n top: '1px',\n left: '1px',\n right: '1px',\n bottom: '1px',\n borderColor: chartSharedOptions.colors.axis,\n show: true,\n },\n ],\n graphic: [\n {\n type: 'group',\n left: '8px',\n top: '8px',\n silent: true,\n children: [\n {\n type: 'rect',\n z: 100,\n left: 'center',\n top: 'middle',\n shape: {\n width: 60,\n height: 30,\n },\n style: {\n fill: '#fff',\n shadowBlur: 8,\n shadowOffsetX: 0,\n shadowOffsetY: 1,\n shadowColor: 'rgba(0,0,0,0.1)',\n },\n },\n {\n type: 'text',\n z: 100,\n left: 'center',\n top: 'middle',\n style: {\n width: 60,\n height: 30,\n // @todo\n text: 'Sell',\n },\n },\n ],\n },\n {\n type: 'group',\n right: '128px',\n top: '8px',\n silent: true,\n children: [\n {\n type: 'rect',\n z: 100,\n right: 'center',\n top: 'middle',\n shape: {\n width: 60,\n height: 30,\n },\n style: {\n fill: '#fff',\n shadowBlur: 8,\n shadowOffsetX: 0,\n shadowOffsetY: 1,\n shadowColor: 'rgba(0,0,0,0.1)',\n },\n },\n {\n type: 'text',\n z: 100,\n right: 'center',\n top: 'middle',\n style: {\n width: 60,\n height: 30,\n // @todo\n text: 'Buy',\n },\n },\n ],\n },\n ],\n yAxis: {\n type: 'value',\n position: 'right',\n axisLine: { show: false },\n axisTick: { show: false },\n splitLine: {\n lineStyle: {\n color: chartSharedOptions.colors.axis,\n },\n },\n axisLabel: {\n padding: [0, 0, 0, 10],\n rich: {\n a: {\n padding: [0, 0, 16, 0],\n },\n },\n // @todo add decimal places\n formatter: (value, index) => (index ? `${value}` : `{a|${value}}`),\n },\n },\n xAxis: {\n type: 'value',\n // @todo\n min: -1.1,\n max: 1.1,\n axisLine: { show: false },\n axisTick: { show: false },\n splitLine: {\n lineStyle: {\n color: chartSharedOptions.colors.axis,\n },\n },\n axisLabel: {\n padding: [7, 0, 0, 0],\n showMinLabel: false,\n showMaxLabel: false,\n formatter: (value) => (value === 0 ? '%' : `${Math.abs(value)}%`),\n },\n },\n series: [\n {\n type: 'custom',\n encode: {\n x: 1,\n y: 0,\n tooltip: 1,\n },\n itemStyle: {\n color: '#00B89E',\n },\n renderItem: (params, api) => {\n const yValue = api.value(0);\n const xStart = api.coord([api.value(1), yValue]);\n const xEnd = api.coord([0, yValue]);\n const bucketWidthHeight = api.size ? (api.size([0, bucketWidth]) as number[])[1] : 0;\n const height = bucketWidthHeight > 4 ? bucketWidthHeight * 0.8 : bucketWidthHeight;\n\n const rectShape = {\n x: xStart[0] + 0.5,\n y: xStart[1] - height / 2,\n width: xEnd[0] - xStart[0],\n height,\n };\n\n return {\n type: 'rect',\n shape: rectShape,\n style: api.style(),\n };\n },\n },\n {\n type: 'custom',\n encode: {\n x: 1,\n y: 0,\n tooltip: 2,\n },\n markLine: {\n animation: false,\n silent: true,\n // @todo confirm precision\n precision: 4,\n symbol: ['none', 'triangle'],\n symbolRotate: 90,\n symbolSize: [20, 10],\n lineStyle: {\n color: '#008573',\n width: 1,\n },\n label: {\n padding: [5, 15, 5, 15],\n color: '#fff',\n backgroundColor: '#008573',\n },\n data: [\n {\n yAxis: price,\n },\n ],\n },\n itemStyle: {\n color: '#E5226E',\n },\n renderItem: (params, api) => {\n const yValue = api.value(0);\n const xStart = api.coord([api.value(2), yValue]);\n const xEnd = api.coord([0, yValue]);\n const bucketWidthHeight = api.size ? (api.size([0, bucketWidth]) as number[])[1] : 0;\n const height = bucketWidthHeight > 4 ? bucketWidthHeight * 0.8 : bucketWidthHeight;\n\n const rectShape = {\n x: xStart[0] - 0.5,\n y: xStart[1] - height / 2,\n width: xEnd[0] - xStart[0],\n height,\n };\n\n return {\n type: 'rect',\n shape: rectShape,\n style: api.style(),\n };\n },\n },\n ],\n }\n);\n"],"mappings":";;;;;;AACA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAEO,MAAME,UAAU,GAAGC,IAAA;EAAA,IACxB;IACEC,IAAI;IACJC,KAAK;IACLC;EAMF,CAAC,GAAAH,IAAA;EAAA,OAED;IACEI,OAAO,EAAE;MACPC,QAAQ,EAAE,EAAE;MACZC,OAAO,EAAE,EAAE;MACXC,MAAM,EAAE,CAAC;MACTC,KAAK,EAAE,CAAC;MACRC,SAAS,EAAE,KAAK;MAChBC,SAAS,EAAE;QACTC,WAAW,EAAE;MACf,CAAC;MACDC,QAAQ,EAAE;QACRF,SAAS,EAAE;UACTC,WAAW,EAAE;QACf;MACF,CAAC;MACDE,OAAO,EAAE;QACPC,IAAI,EAAE,IAAI;QACVC,eAAe,EAAE,SAAS;QAC1BC,SAAS,EAAGC,GAAG,IAAKA,GAAG,CAACC,KAAK;QAC7BC,QAAQ,EAAE,KAAK;QACfC,OAAO,EAAE,IAAI;QACbC,SAAS,EAAE;UACTC,KAAK,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CAACzC,MAAM,EAAE0C,GAAG,KAAK;QAC3B,MAAMC,MAAM,GAAGD,GAAG,CAACb,KAAK,CAAC,CAAC,CAAC;QAC3B,MAAMe,MAAM,GAAGF,GAAG,CAACG,KAAK,CAAC,CAACH,GAAG,CAACb,KAAK,CAAC,CAAC,CAAC,EAAEc,MAAM,CAAC,CAAC;QAChD,MAAMG,IAAI,GAAGJ,GAAG,CAACG,KAAK,CAAC,CAAC,CAAC,EAAEF,MAAM,CAAC,CAAC;QACnC,MAAMI,iBAAiB,GAAGL,GAAG,CAACM,IAAI,GAAIN,GAAG,CAACM,IAAI,CAAC,CAAC,CAAC,EAAEpG,WAAW,CAAC,CAAC,CAAc,CAAC,CAAC,GAAG,CAAC;QACpF,MAAM+D,MAAM,GAAGoC,iBAAiB,GAAG,CAAC,GAAGA,iBAAiB,GAAG,GAAG,GAAGA,iBAAiB;QAElF,MAAME,SAAS,GAAG;UAChBX,CAAC,EAAEM,MAAM,CAAC,CAAC,CAAC,GAAG,GAAG;UAClBL,CAAC,EAAEK,MAAM,CAAC,CAAC,CAAC,GAAGjC,MAAM,GAAG,CAAC;UACzBD,KAAK,EAAEoC,IAAI,CAAC,CAAC,CAAC,GAAGF,MAAM,CAAC,CAAC,CAAC;UAC1BjC;QACF,CAAC;QAED,OAAO;UACL3B,IAAI,EAAE,MAAM;UACZgC,KAAK,EAAEiC,SAAS;UAChBhC,KAAK,EAAEyB,GAAG,CAACzB,KAAK,CAAC;QACnB,CAAC;MACH;IACF,CAAC;EAEL,CAAC;AAAA,CACF;AAACwC,OAAA,CAAAjH,UAAA,GAAAA,UAAA"}
1
+ {"version":3,"file":"getOptions.js","names":["_labsWidgetCommon","require","_constants","getOptions","_ref","data","price","bucketWidth","toolbox","itemSize","itemGap","bottom","right","showTitle","iconStyle","borderColor","emphasis","tooltip","show","backgroundColor","formatter","val","title","position","confine","textStyle","color","feature","myZoomIn","icon","chartSharedOptions","icons","zoomInIcon","onclick","model","instance","startValue","endValue","option","dataZoom","halfZoomValue","ZOOM_BARS","dispatchAction","type","myZoomOut","zoomOutIcon","myResetZoom","resetZoomIcon","INITIAL_BARS","realtime","yAxisIndex","dataset","source","trigger","borderRadius","shadowBlur","shadowOffsetX","shadowOffsetY","shadowColor","params","values","Math","abs","axisPointer","axis","grid","top","left","width","height","graphic","silent","children","z","shape","style","fill","text","yAxis","axisLine","axisTick","splitLine","lineStyle","axisLabel","padding","rich","a","value","index","xAxis","min","max","showMinLabel","showMaxLabel","series","encode","x","y","itemStyle","renderItem","api","yValue","xStart","coord","xEnd","bucketWidthHeight","size","rectShape","markLine","animation","precision","symbol","symbolRotate","symbolSize","label","exports"],"sources":["../../../../../src/OrderBookWidget/components/Chart/getOptions.ts"],"sourcesContent":["import { EChartsOption, Model, EChartsType } from 'echarts';\nimport { chartSharedOptions } from '@oanda/labs-widget-common';\nimport { ZOOM_BARS, INITIAL_BARS } from './constants';\n\nexport const getOptions = (\n {\n data,\n price,\n bucketWidth,\n } :\n {\n data: number[][],\n price: number,\n bucketWidth: number\n },\n): EChartsOption => (\n {\n toolbox: {\n itemSize: 18,\n itemGap: 14,\n bottom: 6,\n right: 6,\n showTitle: false,\n iconStyle: {\n borderColor: '#00214A',\n },\n emphasis: {\n iconStyle: {\n borderColor: '#008573',\n },\n },\n tooltip: {\n show: true,\n backgroundColor: '#00214A',\n formatter: (val) => val.title,\n position: 'top',\n confine: true,\n textStyle: {\n color: '#fff',\n },\n },\n feature: {\n myZoomIn: {\n show: true,\n title: 'Zoom in',\n icon: chartSharedOptions.icons.zoomInIcon,\n onclick: (model: Model, instance: EChartsType) => {\n const { startValue, endValue } = model.option.dataZoom[0];\n // @todo handle zoom with minimal step\n const halfZoomValue = 0.5 * ZOOM_BARS * bucketWidth;\n\n instance.dispatchAction({\n type: 'dataZoom',\n startValue: startValue + halfZoomValue,\n endValue: endValue - halfZoomValue,\n });\n },\n },\n myZoomOut: {\n show: true,\n title: 'Zoom out',\n icon: chartSharedOptions.icons.zoomOutIcon,\n onclick: (model: Model, instance: EChartsType) => {\n const { startValue, endValue } = model.option.dataZoom[0];\n // @todo handle zoom with full chart range\n const halfZoomValue = 0.5 * ZOOM_BARS * bucketWidth;\n\n instance.dispatchAction({\n type: 'dataZoom',\n startValue: startValue - halfZoomValue,\n endValue: endValue + halfZoomValue,\n });\n },\n },\n myResetZoom: {\n show: true,\n title: 'ResetZoom',\n icon: chartSharedOptions.icons.resetZoomIcon,\n onclick: (model: Model, instance: EChartsType) => {\n instance.dispatchAction({\n type: 'dataZoom',\n startValue: price - (bucketWidth * INITIAL_BARS * 0.5),\n endValue: price + (bucketWidth * INITIAL_BARS * 0.5),\n });\n },\n },\n },\n },\n dataZoom: [\n {\n type: 'inside',\n realtime: true,\n startValue: price - (bucketWidth * INITIAL_BARS * 0.5),\n endValue: price + (bucketWidth * INITIAL_BARS * 0.5),\n yAxisIndex: 0,\n // @todo\n // minSpan: 2,\n },\n ],\n dataset: {\n source: data,\n },\n textStyle: {\n // @todo, broken due dark mode\n // ...chartSharedOptions.textStyle,\n },\n tooltip: {\n trigger: 'axis',\n borderRadius: 0,\n shadowBlur: 24,\n shadowOffsetX: 0,\n shadowOffsetY: 6,\n shadowColor: 'rgba(0,0,0,0.1)',\n textStyle: {\n // @todo, broken due dark mode\n // ...chartSharedOptions.textStyle,\n },\n formatter: (params) => {\n const values = (params as { data: number[] }[])[0].data;\n return `Price: ${values[0]}<br />Buy: ${values[1]}%<br/>Sell: ${Math.abs(values[2])}%`;\n },\n axisPointer: {\n axis: 'y',\n },\n },\n grid: [\n {\n top: '1px',\n left: '1px',\n right: '121px',\n bottom: '41px',\n // @todo, broken due dark mode\n // borderColor: chartSharedOptions.colors.axis,\n show: true,\n },\n {\n bottom: '1px',\n right: '1px',\n width: '120px',\n height: '40px',\n // @todo, broken due dark mode\n // borderColor: chartSharedOptions.colors.axis,\n show: true,\n },\n {\n top: '1px',\n left: '1px',\n right: '1px',\n bottom: '1px',\n // @todo, broken due dark mode\n // borderColor: chartSharedOptions.colors.axis,\n show: true,\n },\n ],\n graphic: [\n {\n type: 'group',\n left: '8px',\n top: '8px',\n silent: true,\n children: [\n {\n type: 'rect',\n z: 100,\n left: 'center',\n top: 'middle',\n shape: {\n width: 60,\n height: 30,\n },\n style: {\n fill: '#fff',\n shadowBlur: 8,\n shadowOffsetX: 0,\n shadowOffsetY: 1,\n shadowColor: 'rgba(0,0,0,0.1)',\n },\n },\n {\n type: 'text',\n z: 100,\n left: 'center',\n top: 'middle',\n style: {\n width: 60,\n height: 30,\n // @todo\n text: 'Sell',\n },\n },\n ],\n },\n {\n type: 'group',\n right: '128px',\n top: '8px',\n silent: true,\n children: [\n {\n type: 'rect',\n z: 100,\n right: 'center',\n top: 'middle',\n shape: {\n width: 60,\n height: 30,\n },\n style: {\n fill: '#fff',\n shadowBlur: 8,\n shadowOffsetX: 0,\n shadowOffsetY: 1,\n shadowColor: 'rgba(0,0,0,0.1)',\n },\n },\n {\n type: 'text',\n z: 100,\n right: 'center',\n top: 'middle',\n style: {\n width: 60,\n height: 30,\n // @todo\n text: 'Buy',\n },\n },\n ],\n },\n ],\n yAxis: {\n type: 'value',\n position: 'right',\n axisLine: { show: false },\n axisTick: { show: false },\n splitLine: {\n lineStyle: {\n // @todo, broken due dark mode\n // color: chartSharedOptions.colors.axis,\n },\n },\n axisLabel: {\n padding: [0, 0, 0, 10],\n rich: {\n a: {\n padding: [0, 0, 16, 0],\n },\n },\n // @todo add decimal places\n formatter: (value, index) => (index ? `${value}` : `{a|${value}}`),\n },\n },\n xAxis: {\n type: 'value',\n // @todo\n min: -1.1,\n max: 1.1,\n axisLine: { show: false },\n axisTick: { show: false },\n splitLine: {\n lineStyle: {\n // @todo, broken due dark mode\n // color: chartSharedOptions.colors.axis,\n },\n },\n axisLabel: {\n padding: [7, 0, 0, 0],\n showMinLabel: false,\n showMaxLabel: false,\n formatter: (value) => (value === 0 ? '%' : `${Math.abs(value)}%`),\n },\n },\n series: [\n {\n type: 'custom',\n encode: {\n x: 1,\n y: 0,\n tooltip: 1,\n },\n itemStyle: {\n color: '#00B89E',\n },\n renderItem: (params, api) => {\n const yValue = api.value(0);\n const xStart = api.coord([api.value(1), yValue]);\n const xEnd = api.coord([0, yValue]);\n const bucketWidthHeight = api.size ? (api.size([0, bucketWidth]) as number[])[1] : 0;\n const height = bucketWidthHeight > 4 ? bucketWidthHeight * 0.8 : bucketWidthHeight;\n\n const rectShape = {\n x: xStart[0] + 0.5,\n y: xStart[1] - height / 2,\n width: xEnd[0] - xStart[0],\n height,\n };\n\n return {\n type: 'rect',\n shape: rectShape,\n style: api.style(),\n };\n },\n },\n {\n type: 'custom',\n encode: {\n x: 1,\n y: 0,\n tooltip: 2,\n },\n markLine: {\n animation: false,\n silent: true,\n // @todo confirm precision\n precision: 4,\n symbol: ['none', 'triangle'],\n symbolRotate: 90,\n symbolSize: [20, 10],\n lineStyle: {\n color: '#008573',\n width: 1,\n },\n label: {\n padding: [5, 15, 5, 15],\n color: '#fff',\n backgroundColor: '#008573',\n },\n data: [\n {\n yAxis: price,\n },\n ],\n },\n itemStyle: {\n color: '#E5226E',\n },\n renderItem: (params, api) => {\n const yValue = api.value(0);\n const xStart = api.coord([api.value(2), yValue]);\n const xEnd = api.coord([0, yValue]);\n const bucketWidthHeight = api.size ? (api.size([0, bucketWidth]) as number[])[1] : 0;\n const height = bucketWidthHeight > 4 ? bucketWidthHeight * 0.8 : bucketWidthHeight;\n\n const rectShape = {\n x: xStart[0] - 0.5,\n y: xStart[1] - height / 2,\n width: xEnd[0] - xStart[0],\n height,\n };\n\n return {\n type: 'rect',\n shape: rectShape,\n style: api.style(),\n };\n },\n },\n ],\n }\n);\n"],"mappings":";;;;;;AACA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAEO,MAAME,UAAU,GAAGC,IAAA;EAAA,IACxB;IACEC,IAAI;IACJC,KAAK;IACLC;EAMF,CAAC,GAAAH,IAAA;EAAA,OAED;IACEI,OAAO,EAAE;MAC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J;UACEyE,KAAK,EAAExE;QACT,CAAC;MAEL,CAAC;MACD4F,SAAS,EAAE;QACTxE,KAAK,EAAE;MACT,CAAC;MACDyE,UAAU,EAAEA,CAACxC,MAAM,EAAEyC,GAAG,KAAK;QAC3B,MAAMC,MAAM,GAAGD,GAAG,CAACb,KAAK,CAAC,CAAC,CAAC;QAC3B,MAAMe,MAAM,GAAGF,GAAG,CAACG,KAAK,CAAC,CAACH,GAAG,CAACb,KAAK,CAAC,CAAC,CAAC,EAAEc,MAAM,CAAC,CAAC;QAChD,MAAMG,IAAI,GAAGJ,GAAG,CAACG,KAAK,CAAC,CAAC,CAAC,EAAEF,MAAM,CAAC,CAAC;QACnC,MAAMI,iBAAiB,GAAGL,GAAG,CAACM,IAAI,GAAIN,GAAG,CAACM,IAAI,CAAC,CAAC,CAAC,EAAEnG,WAAW,CAAC,CAAC,CAAc,CAAC,CAAC,GAAG,CAAC;QACpF,MAAM8D,MAAM,GAAGoC,iBAAiB,GAAG,CAAC,GAAGA,iBAAiB,GAAG,GAAG,GAAGA,iBAAiB;QAElF,MAAME,SAAS,GAAG;UAChBX,CAAC,EAAEM,MAAM,CAAC,CAAC,CAAC,GAAG,GAAG;UAClBL,CAAC,EAAEK,MAAM,CAAC,CAAC,CAAC,GAAGjC,MAAM,GAAG,CAAC;UACzBD,KAAK,EAAEoC,IAAI,CAAC,CAAC,CAAC,GAAGF,MAAM,CAAC,CAAC,CAAC;UAC1BjC;QACF,CAAC;QAED,OAAO;UACL1B,IAAI,EAAE,MAAM;UACZ+B,KAAK,EAAEiC,SAAS;UAChBhC,KAAK,EAAEyB,GAAG,CAACzB,KAAK,CAAC;QACnB,CAAC;MACH;IACF,CAAC;EAEL,CAAC;AAAA,CACF;AAACwC,OAAA,CAAAhH,UAAA,GAAAA,UAAA"}
@@ -90,9 +90,7 @@ export const getOptions = _ref => {
90
90
  dataset: {
91
91
  source: data
92
92
  },
93
- textStyle: {
94
- ...chartSharedOptions.textStyle
95
- },
93
+ textStyle: {},
96
94
  tooltip: {
97
95
  trigger: 'axis',
98
96
  borderRadius: 0,
@@ -100,9 +98,7 @@ export const getOptions = _ref => {
100
98
  shadowOffsetX: 0,
101
99
  shadowOffsetY: 6,
102
100
  shadowColor: 'rgba(0,0,0,0.1)',
103
- textStyle: {
104
- ...chartSharedOptions.textStyle
105
- },
101
+ textStyle: {},
106
102
  formatter: params => {
107
103
  const values = params[0].data;
108
104
  return `Price: ${values[0]}<br />Buy: ${values[1]}%<br/>Sell: ${Math.abs(values[2])}%`;
@@ -116,21 +112,18 @@ export const getOptions = _ref => {
116
112
  left: '1px',
117
113
  right: '121px',
118
114
  bottom: '41px',
119
- borderColor: chartSharedOptions.colors.axis,
120
115
  show: true
121
116
  }, {
122
117
  bottom: '1px',
123
118
  right: '1px',
124
119
  width: '120px',
125
120
  height: '40px',
126
- borderColor: chartSharedOptions.colors.axis,
127
121
  show: true
128
122
  }, {
129
123
  top: '1px',
130
124
  left: '1px',
131
125
  right: '1px',
132
126
  bottom: '1px',
133
- borderColor: chartSharedOptions.colors.axis,
134
127
  show: true
135
128
  }],
136
129
  graphic: [{
@@ -208,9 +201,7 @@ export const getOptions = _ref => {
208
201
  show: false
209
202
  },
210
203
  splitLine: {
211
- lineStyle: {
212
- color: chartSharedOptions.colors.axis
213
- }
204
+ lineStyle: {}
214
205
  },
215
206
  axisLabel: {
216
207
  padding: [0, 0, 0, 10],
@@ -233,9 +224,7 @@ export const getOptions = _ref => {
233
224
  show: false
234
225
  },
235
226
  splitLine: {
236
- lineStyle: {
237
- color: chartSharedOptions.colors.axis
238
- }
227
+ lineStyle: {}
239
228
  },
240
229
  axisLabel: {
241
230
  padding: [7, 0, 0, 0],
@@ -1 +1 @@
1
- {"version":3,"file":"getOptions.js","names":["chartSharedOptions","ZOOM_BARS","INITIAL_BARS","getOptions","_ref","data","price","bucketWidth","toolbox","itemSize","itemGap","bottom","right","showTitle","iconStyle","borderColor","emphasis","tooltip","show","backgroundColor","formatter","val","title","position","confine","textStyle","color","feature","myZoomIn","icon","icons","zoomInIcon","onclick","model","instance","startValue","endValue","option","dataZoom","halfZoomValue","dispatchAction","type","myZoomOut","zoomOutIcon","myResetZoom","resetZoomIcon","realtime","yAxisIndex","dataset","source","trigger","borderRadius","shadowBlur","shadowOffsetX","shadowOffsetY","shadowColor","params","values","Math","abs","axisPointer","axis","grid","top","left","colors","width","height","graphic","silent","children","z","shape","style","fill","text","yAxis","axisLine","axisTick","splitLine","lineStyle","axisLabel","padding","rich","a","value","index","xAxis","min","max","showMinLabel","showMaxLabel","series","encode","x","y","itemStyle","renderItem","api","yValue","xStart","coord","xEnd","bucketWidthHeight","size","rectShape","markLine","animation","precision","symbol","symbolRotate","symbolSize","label"],"sources":["../../../../../src/OrderBookWidget/components/Chart/getOptions.ts"],"sourcesContent":["import { EChartsOption, Model, EChartsType } from 'echarts';\nimport { chartSharedOptions } from '@oanda/labs-widget-common';\nimport { ZOOM_BARS, INITIAL_BARS } from './constants';\n\nexport const getOptions = (\n {\n data,\n price,\n bucketWidth,\n } :\n {\n data: number[][],\n price: number,\n bucketWidth: number\n },\n): EChartsOption => (\n {\n toolbox: {\n itemSize: 18,\n itemGap: 14,\n bottom: 6,\n right: 6,\n showTitle: false,\n iconStyle: {\n borderColor: '#00214A',\n },\n emphasis: {\n iconStyle: {\n borderColor: '#008573',\n },\n },\n tooltip: {\n show: true,\n backgroundColor: '#00214A',\n formatter: (val) => val.title,\n position: 'top',\n confine: true,\n textStyle: {\n color: '#fff',\n },\n },\n feature: {\n myZoomIn: {\n show: true,\n title: 'Zoom in',\n icon: chartSharedOptions.icons.zoomInIcon,\n onclick: (model: Model, instance: EChartsType) => {\n const { startValue, endValue } = model.option.dataZoom[0];\n // @todo handle zoom with minimal step\n const halfZoomValue = 0.5 * ZOOM_BARS * bucketWidth;\n\n instance.dispatchAction({\n type: 'dataZoom',\n startValue: startValue + halfZoomValue,\n endValue: endValue - halfZoomValue,\n });\n },\n },\n myZoomOut: {\n show: true,\n title: 'Zoom out',\n icon: chartSharedOptions.icons.zoomOutIcon,\n onclick: (model: Model, instance: EChartsType) => {\n const { startValue, endValue } = model.option.dataZoom[0];\n // @todo handle zoom with full chart range\n const halfZoomValue = 0.5 * ZOOM_BARS * bucketWidth;\n\n instance.dispatchAction({\n type: 'dataZoom',\n startValue: startValue - halfZoomValue,\n endValue: endValue + halfZoomValue,\n });\n },\n },\n myResetZoom: {\n show: true,\n title: 'ResetZoom',\n icon: chartSharedOptions.icons.resetZoomIcon,\n onclick: (model: Model, instance: EChartsType) => {\n instance.dispatchAction({\n type: 'dataZoom',\n startValue: price - (bucketWidth * INITIAL_BARS * 0.5),\n endValue: price + (bucketWidth * INITIAL_BARS * 0.5),\n });\n },\n },\n },\n },\n dataZoom: [\n {\n type: 'inside',\n realtime: true,\n startValue: price - (bucketWidth * INITIAL_BARS * 0.5),\n endValue: price + (bucketWidth * INITIAL_BARS * 0.5),\n yAxisIndex: 0,\n // @todo\n // minSpan: 2,\n },\n ],\n dataset: {\n source: data,\n },\n textStyle: {\n ...chartSharedOptions.textStyle,\n },\n tooltip: {\n trigger: 'axis',\n borderRadius: 0,\n shadowBlur: 24,\n shadowOffsetX: 0,\n shadowOffsetY: 6,\n shadowColor: 'rgba(0,0,0,0.1)',\n textStyle: {\n ...chartSharedOptions.textStyle,\n },\n formatter: (params) => {\n const values = (params as { data: number[] }[])[0].data;\n return `Price: ${values[0]}<br />Buy: ${values[1]}%<br/>Sell: ${Math.abs(values[2])}%`;\n },\n axisPointer: {\n axis: 'y',\n },\n },\n grid: [\n {\n top: '1px',\n left: '1px',\n right: '121px',\n bottom: '41px',\n borderColor: chartSharedOptions.colors.axis,\n show: true,\n },\n {\n bottom: '1px',\n right: '1px',\n width: '120px',\n height: '40px',\n borderColor: chartSharedOptions.colors.axis,\n show: true,\n },\n {\n top: '1px',\n left: '1px',\n right: '1px',\n bottom: '1px',\n borderColor: chartSharedOptions.colors.axis,\n show: true,\n },\n ],\n graphic: [\n {\n type: 'group',\n left: '8px',\n top: '8px',\n silent: true,\n children: [\n {\n type: 'rect',\n z: 100,\n left: 'center',\n top: 'middle',\n shape: {\n width: 60,\n height: 30,\n },\n style: {\n fill: '#fff',\n shadowBlur: 8,\n shadowOffsetX: 0,\n shadowOffsetY: 1,\n shadowColor: 'rgba(0,0,0,0.1)',\n },\n },\n {\n type: 'text',\n z: 100,\n left: 'center',\n top: 'middle',\n style: {\n width: 60,\n height: 30,\n // @todo\n text: 'Sell',\n },\n },\n ],\n },\n {\n type: 'group',\n right: '128px',\n top: '8px',\n silent: true,\n children: [\n {\n type: 'rect',\n z: 100,\n right: 'center',\n top: 'middle',\n shape: {\n width: 60,\n height: 30,\n },\n style: {\n fill: '#fff',\n shadowBlur: 8,\n shadowOffsetX: 0,\n shadowOffsetY: 1,\n shadowColor: 'rgba(0,0,0,0.1)',\n },\n },\n {\n type: 'text',\n z: 100,\n right: 'center',\n top: 'middle',\n style: {\n width: 60,\n height: 30,\n // @todo\n text: 'Buy',\n },\n },\n ],\n },\n ],\n yAxis: {\n type: 'value',\n position: 'right',\n axisLine: { show: false },\n axisTick: { show: false },\n splitLine: {\n lineStyle: {\n color: chartSharedOptions.colors.axis,\n },\n },\n axisLabel: {\n padding: [0, 0, 0, 10],\n rich: {\n a: {\n padding: [0, 0, 16, 0],\n },\n },\n // @todo add decimal places\n formatter: (value, index) => (index ? `${value}` : `{a|${value}}`),\n },\n },\n xAxis: {\n type: 'value',\n // @todo\n min: -1.1,\n max: 1.1,\n axisLine: { show: false },\n axisTick: { show: false },\n splitLine: {\n lineStyle: {\n color: chartSharedOptions.colors.axis,\n },\n },\n axisLabel: {\n padding: [7, 0, 0, 0],\n showMinLabel: false,\n showMaxLabel: false,\n formatter: (value) => (value === 0 ? '%' : `${Math.abs(value)}%`),\n },\n },\n series: [\n {\n type: 'custom',\n encode: {\n x: 1,\n y: 0,\n tooltip: 1,\n },\n itemStyle: {\n color: '#00B89E',\n },\n renderItem: (params, api) => {\n const yValue = api.value(0);\n const xStart = api.coord([api.value(1), yValue]);\n const xEnd = api.coord([0, yValue]);\n const bucketWidthHeight = api.size ? (api.size([0, bucketWidth]) as number[])[1] : 0;\n const height = bucketWidthHeight > 4 ? bucketWidthHeight * 0.8 : bucketWidthHeight;\n\n const rectShape = {\n x: xStart[0] + 0.5,\n y: xStart[1] - height / 2,\n width: xEnd[0] - xStart[0],\n height,\n };\n\n return {\n type: 'rect',\n shape: rectShape,\n style: api.style(),\n };\n },\n },\n {\n type: 'custom',\n encode: {\n x: 1,\n y: 0,\n tooltip: 2,\n },\n markLine: {\n animation: false,\n silent: true,\n // @todo confirm precision\n precision: 4,\n symbol: ['none', 'triangle'],\n symbolRotate: 90,\n symbolSize: [20, 10],\n lineStyle: {\n color: '#008573',\n width: 1,\n },\n label: {\n padding: [5, 15, 5, 15],\n color: '#fff',\n backgroundColor: '#008573',\n },\n data: [\n {\n yAxis: price,\n },\n ],\n },\n itemStyle: {\n color: '#E5226E',\n },\n renderItem: (params, api) => {\n const yValue = api.value(0);\n const xStart = api.coord([api.value(2), yValue]);\n const xEnd = api.coord([0, yValue]);\n const bucketWidthHeight = api.size ? (api.size([0, bucketWidth]) as number[])[1] : 0;\n const height = bucketWidthHeight > 4 ? bucketWidthHeight * 0.8 : bucketWidthHeight;\n\n const rectShape = {\n x: xStart[0] - 0.5,\n y: xStart[1] - height / 2,\n width: xEnd[0] - xStart[0],\n height,\n };\n\n return {\n type: 'rect',\n shape: rectShape,\n style: api.style(),\n };\n },\n },\n ],\n }\n);\n"],"mappings":"AACA,SAASA,kBAAkB,QAAQ,2BAA2B;AAC9D,SAASC,SAAS,EAAEC,YAAY,QAAQ,aAAa;AAErD,OAAO,MAAMC,UAAU,GAAGC,IAAA;EAAA,IACxB;IACEC,IAAI;IACJC,KAAK;IACLC;EAMF,CAAC,GAAAH,IAAA;EAAA,OAED;IACEI,OAAO,EAAE;MACPC,QAAQ,EAAE,EAAE;MACZC,OAAO,EAAE,EAAE;MACXC,MAAM,EAAE,C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iC,SAAS;UAChBhC,KAAK,EAAEyB,GAAG,CAACzB,KAAK,CAAC;QACnB,CAAC;MACH;IACF,CAAC;EAEL,CAAC;AAAA,CACF"}
1
+ {"version":3,"file":"getOptions.js","names":["chartSharedOptions","ZOOM_BARS","INITIAL_BARS","getOptions","_ref","data","price","bucketWidth","toolbox","itemSize","itemGap","bottom","right","showTitle","iconStyle","borderColor","emphasis","tooltip","show","backgroundColor","formatter","val","title","position","confine","textStyle","color","feature","myZoomIn","icon","icons","zoomInIcon","onclick","model","instance","startValue","endValue","option","dataZoom","halfZoomValue","dispatchAction","type","myZoomOut","zoomOutIcon","myResetZoom","resetZoomIcon","realtime","yAxisIndex","dataset","source","trigger","borderRadius","shadowBlur","shadowOffsetX","shadowOffsetY","shadowColor","params","values","Math","abs","axisPointer","axis","grid","top","left","width","height","graphic","silent","children","z","shape","style","fill","text","yAxis","axisLine","axisTick","splitLine","lineStyle","axisLabel","padding","rich","a","value","index","xAxis","min","max","showMinLabel","showMaxLabel","series","encode","x","y","itemStyle","renderItem","api","yValue","xStart","coord","xEnd","bucketWidthHeight","size","rectShape","markLine","animation","precision","symbol","symbolRotate","symbolSize","label"],"sources":["../../../../../src/OrderBookWidget/components/Chart/getOptions.ts"],"sourcesContent":["import { EChartsOption, Model, EChartsType } from 'echarts';\nimport { chartSharedOptions } from '@oanda/labs-widget-common';\nimport { ZOOM_BARS, INITIAL_BARS } from './constants';\n\nexport const getOptions = (\n {\n data,\n price,\n bucketWidth,\n } :\n {\n data: number[][],\n price: number,\n bucketWidth: number\n },\n): EChartsOption => (\n {\n toolbox: {\n itemSize: 18,\n itemGap: 14,\n bottom: 6,\n right: 6,\n showTitle: false,\n iconStyle: {\n borderColor: '#00214A',\n },\n emphasis: {\n iconStyle: {\n borderColor: '#008573',\n },\n },\n tooltip: {\n show: true,\n backgroundColor: '#00214A',\n formatter: (val) => val.title,\n position: 'top',\n confine: true,\n textStyle: {\n color: '#fff',\n },\n },\n feature: {\n myZoomIn: {\n show: true,\n title: 'Zoom in',\n icon: chartSharedOptions.icons.zoomInIcon,\n onclick: (model: Model, instance: EChartsType) => {\n const { startValue, endValue } = model.option.dataZoom[0];\n // @todo handle zoom with minimal step\n const halfZoomValue = 0.5 * ZOOM_BARS * bucketWidth;\n\n instance.dispatchAction({\n type: 'dataZoom',\n startValue: startValue + halfZoomValue,\n endValue: endValue - halfZoomValue,\n });\n },\n },\n myZoomOut: {\n show: true,\n title: 'Zoom out',\n icon: chartSharedOptions.icons.zoomOutIcon,\n onclick: (model: Model, instance: EChartsType) => {\n const { startValue, endValue } = model.option.dataZoom[0];\n // @todo handle zoom with full chart range\n const halfZoomValue = 0.5 * ZOOM_BARS * bucketWidth;\n\n instance.dispatchAction({\n type: 'dataZoom',\n startValue: startValue - halfZoomValue,\n endValue: endValue + halfZoomValue,\n });\n },\n },\n myResetZoom: {\n show: true,\n title: 'ResetZoom',\n icon: chartSharedOptions.icons.resetZoomIcon,\n onclick: (model: Model, instance: EChartsType) => {\n instance.dispatchAction({\n type: 'dataZoom',\n startValue: price - (bucketWidth * INITIAL_BARS * 0.5),\n endValue: price + (bucketWidth * INITIAL_BARS * 0.5),\n });\n },\n },\n },\n },\n dataZoom: [\n {\n type: 'inside',\n realtime: true,\n startValue: price - (bucketWidth * INITIAL_BARS * 0.5),\n endValue: price + (bucketWidth * INITIAL_BARS * 0.5),\n yAxisIndex: 0,\n // @todo\n // minSpan: 2,\n },\n ],\n dataset: {\n source: data,\n },\n textStyle: {\n // @todo, broken due dark mode\n // ...chartSharedOptions.textStyle,\n },\n tooltip: {\n trigger: 'axis',\n borderRadius: 0,\n shadowBlur: 24,\n shadowOffsetX: 0,\n shadowOffsetY: 6,\n shadowColor: 'rgba(0,0,0,0.1)',\n textStyle: {\n // @todo, broken due dark mode\n // ...chartSharedOptions.textStyle,\n },\n formatter: (params) => {\n const values = (params as { data: number[] }[])[0].data;\n return `Price: ${values[0]}<br />Buy: ${values[1]}%<br/>Sell: ${Math.abs(values[2])}%`;\n },\n axisPointer: {\n axis: 'y',\n },\n },\n grid: [\n {\n top: '1px',\n left: '1px',\n right: '121px',\n bottom: '41px',\n // @todo, broken due dark mode\n // borderColor: chartSharedOptions.colors.axis,\n show: true,\n },\n {\n bottom: '1px',\n right: '1px',\n width: '120px',\n height: '40px',\n // @todo, broken due dark mode\n // borderColor: chartSharedOptions.colors.axis,\n show: true,\n },\n {\n top: '1px',\n left: '1px',\n right: '1px',\n bottom: '1px',\n // @todo, broken due dark mode\n // borderColor: chartSharedOptions.colors.axis,\n show: true,\n },\n ],\n graphic: [\n {\n type: 'group',\n left: '8px',\n top: '8px',\n silent: true,\n children: [\n {\n type: 'rect',\n z: 100,\n left: 'center',\n top: 'middle',\n shape: {\n width: 60,\n height: 30,\n },\n style: {\n fill: '#fff',\n shadowBlur: 8,\n shadowOffsetX: 0,\n shadowOffsetY: 1,\n shadowColor: 'rgba(0,0,0,0.1)',\n },\n },\n {\n type: 'text',\n z: 100,\n left: 'center',\n top: 'middle',\n style: {\n width: 60,\n height: 30,\n // @todo\n text: 'Sell',\n },\n },\n ],\n },\n {\n type: 'group',\n right: '128px',\n top: '8px',\n silent: true,\n children: [\n {\n type: 'rect',\n z: 100,\n right: 'center',\n top: 'middle',\n shape: {\n width: 60,\n height: 30,\n },\n style: {\n fill: '#fff',\n shadowBlur: 8,\n shadowOffsetX: 0,\n shadowOffsetY: 1,\n shadowColor: 'rgba(0,0,0,0.1)',\n },\n },\n {\n type: 'text',\n z: 100,\n right: 'center',\n top: 'middle',\n style: {\n width: 60,\n height: 30,\n // @todo\n text: 'Buy',\n },\n },\n ],\n },\n ],\n yAxis: {\n type: 'value',\n position: 'right',\n axisLine: { show: false },\n axisTick: { show: false },\n splitLine: {\n lineStyle: {\n // @todo, broken due dark mode\n // color: chartSharedOptions.colors.axis,\n },\n },\n axisLabel: {\n padding: [0, 0, 0, 10],\n rich: {\n a: {\n padding: [0, 0, 16, 0],\n },\n },\n // @todo add decimal places\n formatter: (value, index) => (index ? `${value}` : `{a|${value}}`),\n },\n },\n xAxis: {\n type: 'value',\n // @todo\n min: -1.1,\n max: 1.1,\n axisLine: { show: false },\n axisTick: { show: false },\n splitLine: {\n lineStyle: {\n // @todo, broken due dark mode\n // color: chartSharedOptions.colors.axis,\n },\n },\n axisLabel: {\n padding: [7, 0, 0, 0],\n showMinLabel: false,\n showMaxLabel: false,\n formatter: (value) => (value === 0 ? '%' : `${Math.abs(value)}%`),\n },\n },\n series: [\n {\n type: 'custom',\n encode: {\n x: 1,\n y: 0,\n tooltip: 1,\n },\n itemStyle: {\n color: '#00B89E',\n },\n renderItem: (params, api) => {\n const yValue = api.value(0);\n const xStart = api.coord([api.value(1), yValue]);\n const xEnd = api.coord([0, yValue]);\n const bucketWidthHeight = api.size ? (api.size([0, bucketWidth]) as number[])[1] : 0;\n const height = bucketWidthHeight > 4 ? bucketWidthHeight * 0.8 : bucketWidthHeight;\n\n const rectShape = {\n x: xStart[0] + 0.5,\n y: xStart[1] - height / 2,\n width: xEnd[0] - xStart[0],\n height,\n };\n\n return {\n type: 'rect',\n shape: rectShape,\n style: api.style(),\n };\n },\n },\n {\n type: 'custom',\n encode: {\n x: 1,\n y: 0,\n tooltip: 2,\n },\n markLine: {\n animation: false,\n silent: true,\n // @todo confirm precision\n precision: 4,\n symbol: ['none', 'triangle'],\n symbolRotate: 90,\n symbolSize: [20, 10],\n lineStyle: {\n color: '#008573',\n width: 1,\n },\n label: {\n padding: [5, 15, 5, 15],\n color: '#fff',\n backgroundColor: '#008573',\n },\n data: [\n {\n yAxis: price,\n },\n ],\n },\n itemStyle: {\n color: '#E5226E',\n },\n renderItem: (params, api) => {\n const yValue = api.value(0);\n const xStart = api.coord([api.value(2), yValue]);\n const xEnd = api.coord([0, yValue]);\n const bucketWidthHeight = api.size ? (api.size([0, bucketWidth]) as number[])[1] : 0;\n const height = bucketWidthHeight > 4 ? bucketWidthHeight * 0.8 : bucketWidthHeight;\n\n const rectShape = {\n x: xStart[0] - 0.5,\n y: xStart[1] - height / 2,\n width: xEnd[0] - xStart[0],\n height,\n };\n\n return {\n type: 'rect',\n shape: rectShape,\n style: api.style(),\n };\n },\n },\n ],\n }\n);\n"],"mappings":"AACA,SAASA,kBAAkB,QAAQ,2BAA2B;AAC9D,SAASC,SAAS,EAAEC,YAAY,QAAQ,aAAa;AAErD,OAAO,MAAMC,UAAU,GAAGC,IAAA;EAAA,IACxB;IACEC,IAAI;IACJC,KAAK;IACLC;EAMF,CAAC,GAAAH,IAAA;EAAA,OAED;IACEI,OAAO,EAAE;MACPC,QAAQ,EAAE,EAAE;MACZC,OAAO,EAAE,EAAE;MACXC,MAAM,EAAE,CAAC;MACTC,KAAK,EAAE,CAAC;MACRC,SAAS,EAAE,KAAK;MAChBC,SAAS,EAAE;QACTC,WAAW,EAAE;MACf,CAAC;MACDC,QAAQ,EAAE;QACRF,SAAS,EAAE;UACTC,WAAW,EAAE;QACf;MACF,CAAC;MACDE,OAAO,EAAE;QACPC,IAAI,EAAE,IAAI;QACVC,eAAe,EAAE,SAAS;QAC1BC,SAAS,EAAGC,GAAG,IAAKA,GAAG,CAACC,KAAK;QAC7BC,QAAQ,EAAE,KAAK;QACfC,OAAO,EAAE,IAAI;QACbC,SAAS,EAAE;UACTC,KAAK,EAAE;QACT;MACF,CAAC;MACDC,OAAO,EAAE;QACPC,QAAQ,EAAE;UACRV,IAAI,EAAE,IAAI;UACVI,KAAK,EAAE,SAAS;UAChBO,IAAI,EAAE7B,kBAAkB,CAAC8B,KAAK,CAACC,UAAU;UACzCC,OAAO,EAAEA,CAACC,KAAY,EAAEC,QAAqB,KAAK;YAChD,MAAM;cAAEC,UAAU;cAAEC;YAAS,CAAC,GAAGH,KAAK,CAACI,MAAM,CAACC,QAAQ,CAAC,CAAC,CAAC;YAEzD,MAAMC,aAAa,GAAG,GAAG,GAAGtC,SAAS,GAAGM,WAAW;YAEnD2B,QAAQ,CAACM,cAAc,CAAC;cACtBC,IAAI,EAAE,UAAU;cAChBN,UAAU,EAAE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1BjC;QACF,CAAC;QAED,OAAO;UACLzB,IAAI,EAAE,MAAM;UACZ8B,KAAK,EAAEiC,SAAS;UAChBhC,KAAK,EAAEyB,GAAG,CAACzB,KAAK,CAAC;QACnB,CAAC;MACH;IACF,CAAC;EAEL,CAAC;AAAA,CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oanda/labs-order-book-widget",
3
- "version": "1.0.51",
3
+ "version": "1.0.53",
4
4
  "description": "Labs Order Book Widget",
5
5
  "main": "dist/main/index.js",
6
6
  "module": "dist/module/index.js",
@@ -13,7 +13,7 @@
13
13
  "license": "UNLICENSED",
14
14
  "dependencies": {
15
15
  "@apollo/client": "3.7.17",
16
- "@oanda/labs-widget-common": "^1.0.51",
16
+ "@oanda/labs-widget-common": "^1.0.53",
17
17
  "@oanda/mono-i18n": "9.0.0",
18
18
  "classnames": "2.3.2",
19
19
  "echarts": "5.4.3",
@@ -25,5 +25,5 @@
25
25
  "@graphql-codegen/client-preset": "4.1.0",
26
26
  "@graphql-codegen/typescript": "4.0.1"
27
27
  },
28
- "gitHead": "0db4272b7bd922ec5fe39e2de54db8e41f80144a"
28
+ "gitHead": "0d64a270c9214d67fddbfa3ebc81763e98a04924"
29
29
  }
@@ -101,7 +101,8 @@ export const getOptions = (
101
101
  source: data,
102
102
  },
103
103
  textStyle: {
104
- ...chartSharedOptions.textStyle,
104
+ // @todo, broken due dark mode
105
+ // ...chartSharedOptions.textStyle,
105
106
  },
106
107
  tooltip: {
107
108
  trigger: 'axis',
@@ -111,7 +112,8 @@ export const getOptions = (
111
112
  shadowOffsetY: 6,
112
113
  shadowColor: 'rgba(0,0,0,0.1)',
113
114
  textStyle: {
114
- ...chartSharedOptions.textStyle,
115
+ // @todo, broken due dark mode
116
+ // ...chartSharedOptions.textStyle,
115
117
  },
116
118
  formatter: (params) => {
117
119
  const values = (params as { data: number[] }[])[0].data;
@@ -127,7 +129,8 @@ export const getOptions = (
127
129
  left: '1px',
128
130
  right: '121px',
129
131
  bottom: '41px',
130
- borderColor: chartSharedOptions.colors.axis,
132
+ // @todo, broken due dark mode
133
+ // borderColor: chartSharedOptions.colors.axis,
131
134
  show: true,
132
135
  },
133
136
  {
@@ -135,7 +138,8 @@ export const getOptions = (
135
138
  right: '1px',
136
139
  width: '120px',
137
140
  height: '40px',
138
- borderColor: chartSharedOptions.colors.axis,
141
+ // @todo, broken due dark mode
142
+ // borderColor: chartSharedOptions.colors.axis,
139
143
  show: true,
140
144
  },
141
145
  {
@@ -143,7 +147,8 @@ export const getOptions = (
143
147
  left: '1px',
144
148
  right: '1px',
145
149
  bottom: '1px',
146
- borderColor: chartSharedOptions.colors.axis,
150
+ // @todo, broken due dark mode
151
+ // borderColor: chartSharedOptions.colors.axis,
147
152
  show: true,
148
153
  },
149
154
  ],
@@ -230,7 +235,8 @@ export const getOptions = (
230
235
  axisTick: { show: false },
231
236
  splitLine: {
232
237
  lineStyle: {
233
- color: chartSharedOptions.colors.axis,
238
+ // @todo, broken due dark mode
239
+ // color: chartSharedOptions.colors.axis,
234
240
  },
235
241
  },
236
242
  axisLabel: {
@@ -253,7 +259,8 @@ export const getOptions = (
253
259
  axisTick: { show: false },
254
260
  splitLine: {
255
261
  lineStyle: {
256
- color: chartSharedOptions.colors.axis,
262
+ // @todo, broken due dark mode
263
+ // color: chartSharedOptions.colors.axis,
257
264
  },
258
265
  },
259
266
  axisLabel: {