|
| 1 | +const top1stData = [ |
| 2 | + 1108.53, 1108.12, 1109.35, 1109.71, 1109.73, 1109.81, 1109.69, 1108.75, 1109.03, 1108.87, 1108.62, 1108.57, 1108.95, |
| 3 | + 1109.85, 1109.83, 1109.78, 1109.57, 1108.47, 1108.53, 1108.9, 1109.8, 1109.91, 1111.42, 1109.74, 1109.61, 1109.6, |
| 4 | + 1109.73, 1112.55, 1109.65, 1109.78, 231.21, |
| 5 | +]; |
| 6 | +const top2ndData = [ |
| 7 | + 1343.03, 903.56, 953.58, 609.13, 1185.89, 1501.3, 887.25, 598.46, 913.52, 1957.66, 1645.23, 544.67, 1203.28, 1251.59, |
| 8 | + 552.12, 673.74, 753.94, 1392.65, 435.82, 1269.72, 1288.04, 936.65, 823.59, 824.14, 823.54, 824.06, 480.64, 417.32, |
| 9 | + 1003.14, 1001.25, 583.4, |
| 10 | +]; |
| 11 | +const top3rdData = [ |
| 12 | + 374.82, 383.76, 319.87, 104.59, 118.03, 337.04, 823.11, 579.26, 295.51, 531.44, 105.67, 104.6, 971.38, 286.35, 568.39, |
| 13 | + 238.03, 192.37, 60.09, 78.2, 237.03, 209.01, 224.73, 326.58, 200.96, 68.54, 99.04, 300.24, 232.8, 107.08, 267.67, |
| 14 | + 55.62, |
| 15 | +]; |
| 16 | +const top4thData = [ |
| 17 | + 120.66, 60.11, 8.44, 8.45, 20.26, 75.93, 32.08, 11.92, 22.96, 67.38, 25.19, 17.91, 67.42, 47.74, 67.47, 67.31, 71.37, |
| 18 | + 52.86, 11.64, 26.41, 31.85, 67.31, 19.95, 59.17, 7.32, 7.32, 7.33, 328.35, 8.08, 8.69, 1.19, |
| 19 | +]; |
| 20 | +const top5thData = [ |
| 21 | + 123.35, 123.04, 123.13, 123.06, 124.51, 123.46, 123.21, 123.22, 123.28, 123.14, 123.19, 129.31, 123.18, 123.42, |
| 22 | + 123.56, 123.46, 123.16, 123.19, 126.51, 123.28, 123.44, 123.38, 123.43, 123.38, 123.25, 129.4, 123.7, 123.12, 123.15, |
| 23 | + 119.73, 21.57, |
| 24 | +]; |
| 25 | +const top6thData = [ |
| 26 | + 1535.93, 1403.04, 1356.65, 1282.12, 1264.35, 1286.7, 1511.64, 1388.88, 1370.51, 1319.67, 1155.13, 975.7, 1030.38, |
| 27 | + 1129.76, 1218.14, 1117.55, 1196.87, 997.1, 830.46, 1031.18, 1215.34, 1373, 1405.28, 1431.94, 1164.6, 1031.98, 1360.85, |
| 28 | + 1548.71, 1206.01, 1179.92, |
| 29 | +]; |
| 30 | + |
| 31 | +const getData = (name: string, values: number[], count: number) => { |
| 32 | + const datum = []; |
| 33 | + |
| 34 | + let index = 0; |
| 35 | + while (count > index) { |
| 36 | + datum.push({ |
| 37 | + date: `${index}`, |
| 38 | + key: name, |
| 39 | + name, |
| 40 | + units: 'USD', |
| 41 | + x: `${index}`, |
| 42 | + y: values[index % values.length], |
| 43 | + }); |
| 44 | + index++; |
| 45 | + } |
| 46 | + return datum; |
| 47 | +}; |
| 48 | + |
| 49 | +export const getExplorerSkeletonData = (count = 0) => { |
| 50 | + // There will always be at least one day |
| 51 | + const days = count ? count : 1; |
| 52 | + |
| 53 | + return [ |
| 54 | + getData('top1stData', top1stData, days), |
| 55 | + getData('top2ndData', top2ndData, days), |
| 56 | + getData('top3rdData', top3rdData, days), |
| 57 | + getData('top4thData', top4thData, days), |
| 58 | + getData('top5thData', top5thData, days), |
| 59 | + getData('top6thData', top6thData, days), // Others |
| 60 | + ]; |
| 61 | +}; |
0 commit comments