@oanda/labs-currency-strength-widget 1.0.115 → 1.0.116
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 +468 -0
- package/dist/main/CurrencyStrengthWidget/components/Chart/Chart.js +4 -8
- package/dist/main/CurrencyStrengthWidget/components/Chart/Chart.js.map +1 -1
- package/dist/module/CurrencyStrengthWidget/components/Chart/Chart.js +5 -9
- package/dist/module/CurrencyStrengthWidget/components/Chart/Chart.js.map +1 -1
- package/package.json +3 -3
- package/src/CurrencyStrengthWidget/components/Chart/Chart.tsx +4 -7
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,474 @@
|
|
|
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.116 (2025-05-26)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## 1.0.197 (2025-05-23)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## 1.0.196 (2025-05-22)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## 1.0.195 (2025-05-21)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## 1.0.194 (2025-05-21)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## 1.0.193 (2025-05-15)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## 1.0.192 (2025-05-14)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## 1.0.191 (2025-04-30)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
## 1.0.190 (2025-04-28)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## 1.0.189 (2025-04-23)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
## 1.0.188 (2025-04-22)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
## 1.0.187 (2025-04-18)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
## 1.0.186 (2025-04-10)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
## 1.0.185 (2025-04-09)
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
## 1.0.184 (2025-04-08)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
## 1.0.183 (2025-04-04)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
## 1.0.182 (2025-03-21)
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
## 1.0.181 (2025-03-13)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
## 1.0.180 (2025-01-30)
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
## 1.0.179 (2025-01-29)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
## 1.0.178 (2025-01-12)
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
## 1.0.177 (2025-01-10)
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
## 1.0.176 (2025-01-10)
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
## 1.0.175 (2025-01-08)
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
## 1.0.174 (2024-12-16)
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
## 1.0.173 (2024-12-11)
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
## 1.0.172 (2024-11-29)
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
## 1.0.171 (2024-11-28)
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
## 1.0.170 (2024-11-28)
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
## 1.0.169 (2024-11-20)
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
## 1.0.168 (2024-11-19)
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
## 1.0.167 (2024-10-14)
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
## 1.0.166 (2024-10-07)
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
## 1.0.165 (2024-10-03)
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
## 1.0.164 (2024-09-26)
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
## 1.0.163 (2024-09-18)
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
## 1.0.162 (2024-09-12)
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
## 1.0.161 (2024-09-11)
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
## 1.0.160 (2024-09-10)
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
## 1.0.159 (2024-09-09)
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
## 1.0.158 (2024-09-04)
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
## 1.0.157 (2024-09-04)
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
## 1.0.156 (2024-09-02)
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
## 1.0.155 (2024-08-29)
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
## 1.0.154 (2024-08-29)
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
## 1.0.153 (2024-08-23)
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
## 1.0.152 (2024-08-23)
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
## 1.0.151 (2024-08-20)
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
## 1.0.150 (2024-08-19)
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
## 1.0.149 (2024-08-07)
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
## 1.0.148 (2024-08-01)
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
## 1.0.147 (2024-08-01)
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
## 1.0.146 (2024-07-26)
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
## 1.0.145 (2024-07-25)
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
## 1.0.144 (2024-07-22)
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
## 1.0.143 (2024-07-19)
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
## 1.0.142 (2024-07-16)
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
## 1.0.141 (2024-07-16)
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
## 1.0.140 (2024-07-12)
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
## 1.0.139 (2024-07-12)
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
## 1.0.138 (2024-07-10)
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
## 1.0.137 (2024-07-05)
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
## 1.0.136 (2024-07-03)
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
## 1.0.135 (2024-07-03)
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
## 1.0.134 (2024-07-03)
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
## 1.0.133 (2024-06-28)
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
## 1.0.132 (2024-06-27)
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
## 1.0.131 (2024-06-27)
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
## 1.0.130 (2024-06-26)
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
## 1.0.129 (2024-06-17)
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
## 1.0.128 (2024-06-17)
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
## 1.0.127 (2024-06-10)
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
## 1.0.126 (2024-05-29)
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
## 1.0.125 (2024-05-29)
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
## 1.0.124 (2024-05-29)
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
## 1.0.123 (2024-05-28)
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
## 1.0.122 (2024-05-27)
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
## 1.0.121 (2024-05-27)
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
## 1.0.120 (2024-05-24)
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
## 1.0.119 (2024-05-17)
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
## 1.0.118 (2024-05-09)
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
## 1.0.117 (2024-05-07)
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
## 1.0.116 (2024-04-23)
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
## 1.0.115 (2024-04-22)
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
## 1.0.114 (2024-04-19)
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
## 1.0.113 (2024-04-19)
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
## 1.0.112 (2024-04-15)
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
## 1.0.111 (2024-04-11)
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
## 1.0.110 (2024-04-05)
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
## 1.0.109 (2024-04-05)
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
## 1.0.108 (2024-04-04)
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
## 1.0.107 (2024-04-03)
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
## 1.0.106 (2024-03-29)
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
## 1.0.105 (2024-03-28)
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
## 1.0.104 (2024-03-21)
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
## 1.0.103 (2024-03-20)
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
## 1.0.102 (2024-03-20)
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
## 1.0.101 (2024-03-13)
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
## 1.0.100 (2024-03-12)
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
## 1.0.99 (2024-03-11)
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
## 1.0.98 (2024-03-07)
|
|
407
|
+
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
## 1.0.97 (2024-03-06)
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
## 1.0.96 (2024-03-06)
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
## 1.0.95 (2024-03-04)
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
## 1.0.94 (2024-02-29)
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
## 1.0.93 (2024-02-28)
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
## 1.0.92 (2024-02-28)
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
## 1.0.91 (2024-02-23)
|
|
435
|
+
|
|
436
|
+
|
|
437
|
+
|
|
438
|
+
## 1.0.90 (2024-02-23)
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
## 1.0.89 (2024-02-21)
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
|
|
446
|
+
## 1.0.88 (2024-02-21)
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
## 1.0.87 (2024-02-20)
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
## 1.0.86 (2024-02-20)
|
|
455
|
+
|
|
456
|
+
|
|
457
|
+
|
|
458
|
+
## 1.0.85 (2024-02-13)
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
## 1.0.84 (2024-02-13)
|
|
463
|
+
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
## 1.0.83 (2024-02-09)
|
|
467
|
+
|
|
468
|
+
**Note:** Version bump only for package @oanda/labs-currency-strength-widget
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
|
|
472
|
+
|
|
473
|
+
|
|
6
474
|
## 1.0.115 (2025-05-23)
|
|
7
475
|
|
|
8
476
|
|
|
@@ -10,7 +10,6 @@ var _charts = require("echarts/charts");
|
|
|
10
10
|
var _components = require("echarts/components");
|
|
11
11
|
var echarts = _interopRequireWildcard(require("echarts/core"));
|
|
12
12
|
var _renderers = require("echarts/renderers");
|
|
13
|
-
var _core2 = _interopRequireDefault(require("echarts-for-react/lib/core"));
|
|
14
13
|
var _react = _interopRequireDefault(require("react"));
|
|
15
14
|
var _constants = require("./constants");
|
|
16
15
|
var _getOption = require("./getOption");
|
|
@@ -31,19 +30,16 @@ const Chart = _ref => {
|
|
|
31
30
|
const {
|
|
32
31
|
isDark
|
|
33
32
|
} = (0, _labsWidgetCommon.useLayoutProvider)();
|
|
34
|
-
return _react.default.createElement(
|
|
33
|
+
return _react.default.createElement(_labsWidgetCommon.BaseChart, {
|
|
34
|
+
chartHeight: _constants.CHART_HEIGHT,
|
|
35
35
|
echarts: echarts,
|
|
36
|
+
isDark: isDark,
|
|
36
37
|
option: (0, _getOption.getOption)({
|
|
37
38
|
values,
|
|
38
39
|
currency,
|
|
39
40
|
lang,
|
|
40
41
|
isDark
|
|
41
|
-
})
|
|
42
|
-
style: {
|
|
43
|
-
height: `${_constants.CHART_HEIGHT}px`,
|
|
44
|
-
width: '100%'
|
|
45
|
-
},
|
|
46
|
-
theme: isDark ? 'dark_theme' : 'light_theme'
|
|
42
|
+
})
|
|
47
43
|
});
|
|
48
44
|
};
|
|
49
45
|
exports.Chart = Chart;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chart.js","names":["_labsWidgetCommon","require","_monoI18n","_charts","_components","echarts","_interopRequireWildcard","_renderers","
|
|
1
|
+
{"version":3,"file":"Chart.js","names":["_labsWidgetCommon","require","_monoI18n","_charts","_components","echarts","_interopRequireWildcard","_renderers","_react","_interopRequireDefault","_constants","_getOption","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","use","GridSimpleComponent","GraphicComponent","TooltipComponent","TitleComponent","BarChart","CanvasRenderer","registerTheme","getChartTheme","Theme","Dark","Light","Chart","_ref","values","currency","lang","useLocale","isDark","useLayoutProvider","createElement","BaseChart","chartHeight","CHART_HEIGHT","option","getOption","exports"],"sources":["../../../../../src/CurrencyStrengthWidget/components/Chart/Chart.tsx"],"sourcesContent":["import {\n BaseChart,\n getChartTheme,\n Theme,\n useLayoutProvider,\n} from '@oanda/labs-widget-common';\nimport { useLocale } from '@oanda/mono-i18n';\nimport { BarChart } from 'echarts/charts';\nimport {\n GraphicComponent,\n GridSimpleComponent,\n TitleComponent,\n TooltipComponent,\n} from 'echarts/components';\nimport * as echarts from 'echarts/core';\nimport { CanvasRenderer } from 'echarts/renderers';\nimport React from 'react';\n\nimport { CHART_HEIGHT } from './constants';\nimport { getOption } from './getOption';\nimport type { ChartProps } from './types';\n\necharts.use([\n GridSimpleComponent,\n GraphicComponent,\n TooltipComponent,\n TitleComponent,\n BarChart,\n CanvasRenderer,\n]);\n\necharts.registerTheme('dark_theme', getChartTheme(Theme.Dark));\necharts.registerTheme('light_theme', getChartTheme(Theme.Light));\n\nconst Chart = ({ values, currency }: ChartProps) => {\n const { lang } = useLocale();\n const { isDark } = useLayoutProvider();\n\n return (\n <BaseChart\n chartHeight={CHART_HEIGHT}\n echarts={echarts}\n isDark={isDark}\n option={getOption({\n values,\n currency,\n lang,\n isDark,\n })}\n />\n );\n};\n\nexport { Chart };\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { getChartTheme, Theme, useLayoutProvider } from '@oanda/labs-widget-common';
|
|
1
|
+
import { BaseChart, getChartTheme, Theme, useLayoutProvider } from '@oanda/labs-widget-common';
|
|
2
2
|
import { useLocale } from '@oanda/mono-i18n';
|
|
3
3
|
import { BarChart } from 'echarts/charts';
|
|
4
4
|
import { GraphicComponent, GridSimpleComponent, TitleComponent, TooltipComponent } from 'echarts/components';
|
|
5
5
|
import * as echarts from 'echarts/core';
|
|
6
6
|
import { CanvasRenderer } from 'echarts/renderers';
|
|
7
|
-
import ReactEChartsCore from 'echarts-for-react/lib/core';
|
|
8
7
|
import React from 'react';
|
|
9
8
|
import { CHART_HEIGHT } from './constants';
|
|
10
9
|
import { getOption } from './getOption';
|
|
@@ -22,19 +21,16 @@ const Chart = _ref => {
|
|
|
22
21
|
const {
|
|
23
22
|
isDark
|
|
24
23
|
} = useLayoutProvider();
|
|
25
|
-
return React.createElement(
|
|
24
|
+
return React.createElement(BaseChart, {
|
|
25
|
+
chartHeight: CHART_HEIGHT,
|
|
26
26
|
echarts: echarts,
|
|
27
|
+
isDark: isDark,
|
|
27
28
|
option: getOption({
|
|
28
29
|
values,
|
|
29
30
|
currency,
|
|
30
31
|
lang,
|
|
31
32
|
isDark
|
|
32
|
-
})
|
|
33
|
-
style: {
|
|
34
|
-
height: `${CHART_HEIGHT}px`,
|
|
35
|
-
width: '100%'
|
|
36
|
-
},
|
|
37
|
-
theme: isDark ? 'dark_theme' : 'light_theme'
|
|
33
|
+
})
|
|
38
34
|
});
|
|
39
35
|
};
|
|
40
36
|
export { Chart };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chart.js","names":["getChartTheme","Theme","useLayoutProvider","useLocale","BarChart","GraphicComponent","GridSimpleComponent","TitleComponent","TooltipComponent","echarts","CanvasRenderer","
|
|
1
|
+
{"version":3,"file":"Chart.js","names":["BaseChart","getChartTheme","Theme","useLayoutProvider","useLocale","BarChart","GraphicComponent","GridSimpleComponent","TitleComponent","TooltipComponent","echarts","CanvasRenderer","React","CHART_HEIGHT","getOption","use","registerTheme","Dark","Light","Chart","_ref","values","currency","lang","isDark","createElement","chartHeight","option"],"sources":["../../../../../src/CurrencyStrengthWidget/components/Chart/Chart.tsx"],"sourcesContent":["import {\n BaseChart,\n getChartTheme,\n Theme,\n useLayoutProvider,\n} from '@oanda/labs-widget-common';\nimport { useLocale } from '@oanda/mono-i18n';\nimport { BarChart } from 'echarts/charts';\nimport {\n GraphicComponent,\n GridSimpleComponent,\n TitleComponent,\n TooltipComponent,\n} from 'echarts/components';\nimport * as echarts from 'echarts/core';\nimport { CanvasRenderer } from 'echarts/renderers';\nimport React from 'react';\n\nimport { CHART_HEIGHT } from './constants';\nimport { getOption } from './getOption';\nimport type { ChartProps } from './types';\n\necharts.use([\n GridSimpleComponent,\n GraphicComponent,\n TooltipComponent,\n TitleComponent,\n BarChart,\n CanvasRenderer,\n]);\n\necharts.registerTheme('dark_theme', getChartTheme(Theme.Dark));\necharts.registerTheme('light_theme', getChartTheme(Theme.Light));\n\nconst Chart = ({ values, currency }: ChartProps) => {\n const { lang } = useLocale();\n const { isDark } = useLayoutProvider();\n\n return (\n <BaseChart\n chartHeight={CHART_HEIGHT}\n echarts={echarts}\n isDark={isDark}\n option={getOption({\n values,\n currency,\n lang,\n isDark,\n })}\n />\n );\n};\n\nexport { Chart };\n"],"mappings":"AAAA,SACEA,SAAS,EACTC,aAAa,EACbC,KAAK,EACLC,iBAAiB,QACZ,2BAA2B;AAClC,SAASC,SAAS,QAAQ,kBAAkB;AAC5C,SAASC,QAAQ,QAAQ,gBAAgB;AACzC,SACEC,gBAAgB,EAChBC,mBAAmB,EACnBC,cAAc,EACdC,gBAAgB,QACX,oBAAoB;AAC3B,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,SAASC,cAAc,QAAQ,mBAAmB;AAClD,OAAOC,KAAK,MAAM,OAAO;AAEzB,SAASC,YAAY,QAAQ,aAAa;AAC1C,SAASC,SAAS,QAAQ,aAAa;AAGvCJ,OAAO,CAACK,GAAG,CAAC,CACVR,mBAAmB,EACnBD,gBAAgB,EAChBG,gBAAgB,EAChBD,cAAc,EACdH,QAAQ,EACRM,cAAc,CACf,CAAC;AAEFD,OAAO,CAACM,aAAa,CAAC,YAAY,EAAEf,aAAa,CAACC,KAAK,CAACe,IAAI,CAAC,CAAC;AAC9DP,OAAO,CAACM,aAAa,CAAC,aAAa,EAAEf,aAAa,CAACC,KAAK,CAACgB,KAAK,CAAC,CAAC;AAEhE,MAAMC,KAAK,GAAGC,IAAA,IAAsC;EAAA,IAArC;IAAEC,MAAM;IAAEC;EAAqB,CAAC,GAAAF,IAAA;EAC7C,MAAM;IAAEG;EAAK,CAAC,GAAGnB,SAAS,CAAC,CAAC;EAC5B,MAAM;IAAEoB;EAAO,CAAC,GAAGrB,iBAAiB,CAAC,CAAC;EAEtC,OACES,KAAA,CAAAa,aAAA,CAACzB,SAAS;IACR0B,WAAW,EAAEb,YAAa;IAC1BH,OAAO,EAAEA,OAAQ;IACjBc,MAAM,EAAEA,MAAO;IACfG,MAAM,EAAEb,SAAS,CAAC;MAChBO,MAAM;MACNC,QAAQ;MACRC,IAAI;MACJC;IACF,CAAC;EAAE,CACJ,CAAC;AAEN,CAAC;AAED,SAASL,KAAK","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oanda/labs-currency-strength-widget",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.116",
|
|
4
4
|
"description": "Labs Currency Strength Widget",
|
|
5
5
|
"main": "dist/main/index.js",
|
|
6
6
|
"module": "dist/module/index.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"author": "OANDA",
|
|
13
13
|
"license": "UNLICENSED",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@oanda/labs-widget-common": "^1.0.
|
|
15
|
+
"@oanda/labs-widget-common": "^1.0.198",
|
|
16
16
|
"@oanda/mono-i18n": "10.0.1",
|
|
17
17
|
"echarts": "5.5.0",
|
|
18
18
|
"echarts-for-react": "3.0.2",
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
"@graphql-codegen/client-preset": "4.1.0",
|
|
24
24
|
"@graphql-codegen/typescript": "4.0.1"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "083781981c17b38576e6e46122dca29abd250b34"
|
|
27
27
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
BaseChart,
|
|
2
3
|
getChartTheme,
|
|
3
4
|
Theme,
|
|
4
5
|
useLayoutProvider,
|
|
@@ -13,7 +14,6 @@ import {
|
|
|
13
14
|
} from 'echarts/components';
|
|
14
15
|
import * as echarts from 'echarts/core';
|
|
15
16
|
import { CanvasRenderer } from 'echarts/renderers';
|
|
16
|
-
import ReactEChartsCore from 'echarts-for-react/lib/core';
|
|
17
17
|
import React from 'react';
|
|
18
18
|
|
|
19
19
|
import { CHART_HEIGHT } from './constants';
|
|
@@ -37,19 +37,16 @@ const Chart = ({ values, currency }: ChartProps) => {
|
|
|
37
37
|
const { isDark } = useLayoutProvider();
|
|
38
38
|
|
|
39
39
|
return (
|
|
40
|
-
<
|
|
40
|
+
<BaseChart
|
|
41
|
+
chartHeight={CHART_HEIGHT}
|
|
41
42
|
echarts={echarts}
|
|
43
|
+
isDark={isDark}
|
|
42
44
|
option={getOption({
|
|
43
45
|
values,
|
|
44
46
|
currency,
|
|
45
47
|
lang,
|
|
46
48
|
isDark,
|
|
47
49
|
})}
|
|
48
|
-
style={{
|
|
49
|
-
height: `${CHART_HEIGHT}px`,
|
|
50
|
-
width: '100%',
|
|
51
|
-
}}
|
|
52
|
-
theme={isDark ? 'dark_theme' : 'light_theme'}
|
|
53
50
|
/>
|
|
54
51
|
);
|
|
55
52
|
};
|