diff --git a/src/app/MockData/data_1.json b/src/app/MockData/data_1.json deleted file mode 100644 index bd5ff17..0000000 --- a/src/app/MockData/data_1.json +++ /dev/null @@ -1,404 +0,0 @@ -{ - "data": [ - { - "x": 0.0098, - "y": 1.0 - }, - { - "x": 0.0185, - "y": 2.0 - }, - { - "x": -0.0047, - "y": 3.0 - }, - { - "x": 0.0098, - "y": 4.0 - }, - { - "x": 0.0034, - "y": 5.0 - }, - { - "x": 0.0062, - "y": 6.0 - }, - { - "x": 0.0136, - "y": 7.0 - }, - { - "x": -0.0022, - "y": 8.0 - }, - { - "x": -0.0292, - "y": 9.0 - }, - { - "x": -0.0427, - "y": 10.0 - }, - { - "x": -0.0029, - "y": 11.0 - }, - { - "x": -0.0141, - "y": 12.0 - }, - { - "x": 0.0043, - "y": 13.0 - }, - { - "x": 0.0035, - "y": 14.0 - }, - { - "x": -0.0117, - "y": 15.0 - }, - { - "x": 0.0178, - "y": 16.0 - }, - { - "x": 0.0227, - "y": 17.0 - }, - { - "x": 0.0423, - "y": 18.0 - }, - { - "x": 0.0018, - "y": 19.0 - }, - { - "x": 0.0378, - "y": 20.0 - }, - { - "x": 0.0072, - "y": 21.0 - }, - { - "x": 0.0048, - "y": 22.0 - }, - { - "x": 0.007, - "y": 23.0 - }, - { - "x": 0.0141, - "y": 24.0 - }, - { - "x": -0.0077, - "y": 25.0 - }, - { - "x": -0.0023, - "y": 26.0 - }, - { - "x": -0.0092, - "y": 27.0 - }, - { - "x": 0.0092, - "y": 28.0 - }, - { - "x": -0.0064, - "y": 29.0 - }, - { - "x": -0.0036, - "y": 30.0 - }, - { - "x": 0.007, - "y": 31.0 - }, - { - "x": -0.0025, - "y": 32.0 - }, - { - "x": 0.0064, - "y": 33.0 - }, - { - "x": -0.0011, - "y": 34.0 - }, - { - "x": 0.0023, - "y": 35.0 - }, - { - "x": -0.0036, - "y": 36.0 - }, - { - "x": -0.0021, - "y": 37.0 - }, - { - "x": -0.0034, - "y": 38.0 - }, - { - "x": 0.0177, - "y": 39.0 - }, - { - "x": 0.0083, - "y": 40.0 - }, - { - "x": 0.0077, - "y": 41.0 - }, - { - "x": 0.0035, - "y": 42.0 - }, - { - "x": -0.0027, - "y": 43.0 - }, - { - "x": -0.0092, - "y": 44.0 - }, - { - "x": -0.0025, - "y": 45.0 - }, - { - "x": 0.0055, - "y": 46.0 - }, - { - "x": -0.0083, - "y": 47.0 - }, - { - "x": 0.0005, - "y": 48.0 - }, - { - "x": -0.0104, - "y": 49.0 - }, - { - "x": -0.0005, - "y": 50.0 - }, - { - "x": -0.0164, - "y": 51.0 - }, - { - "x": 0.0043, - "y": 52.0 - }, - { - "x": -0.0056, - "y": 53.0 - }, - { - "x": -0.0029, - "y": 54.0 - }, - { - "x": -0.0151, - "y": 55.0 - }, - { - "x": 0.0123, - "y": 56.0 - }, - { - "x": -0.0015, - "y": 57.0 - }, - { - "x": 0.0072, - "y": 58.0 - }, - { - "x": -0.0021, - "y": 59.0 - }, - { - "x": 0.0111, - "y": 60.0 - }, - { - "x": -0.0177, - "y": 61.0 - }, - { - "x": 0.008, - "y": 62.0 - }, - { - "x": 0.0137, - "y": 63.0 - }, - { - "x": 0.0137, - "y": 64.0 - }, - { - "x": -0.0012, - "y": 65.0 - }, - { - "x": -0.0131, - "y": 66.0 - }, - { - "x": 0.0165, - "y": 67.0 - }, - { - "x": 0.0016, - "y": 68.0 - }, - { - "x": -0.0022, - "y": 69.0 - }, - { - "x": 0.0028, - "y": 70.0 - }, - { - "x": -0.0055, - "y": 71.0 - }, - { - "x": 0.0077, - "y": 72.0 - }, - { - "x": -0.0023, - "y": 73.0 - }, - { - "x": 0.0009, - "y": 74.0 - }, - { - "x": 0.0072, - "y": 75.0 - }, - { - "x": 0.0093, - "y": 76.0 - }, - { - "x": -0.0031, - "y": 77.0 - }, - { - "x": -0.0169, - "y": 78.0 - }, - { - "x": -0.0056, - "y": 79.0 - }, - { - "x": 0.002, - "y": 80.0 - }, - { - "x": 0.0556, - "y": 81.0 - }, - { - "x": 0.0284, - "y": 82.0 - }, - { - "x": 0.0029, - "y": 83.0 - }, - { - "x": 0.0052, - "y": 84.0 - }, - { - "x": -0.0095, - "y": 85.0 - }, - { - "x": 0.0007, - "y": 86.0 - }, - { - "x": 0.0078, - "y": 87.0 - }, - { - "x": -0.0065, - "y": 88.0 - }, - { - "x": 0.0064, - "y": 89.0 - }, - { - "x": 0.0042, - "y": 90.0 - }, - { - "x": 0.0023, - "y": 91.0 - }, - { - "x": 0.0144, - "y": 92.0 - }, - { - "x": 0.0196, - "y": 93.0 - }, - { - "x": -0.0098, - "y": 94.0 - }, - { - "x": -0.002, - "y": 95.0 - }, - { - "x": 0.0, - "y": 96.0 - }, - { - "x": 0.002, - "y": 97.0 - }, - { - "x": 0.0031, - "y": 98.0 - }, - { - "x": 0.0082, - "y": 99.0 - }, - { - "x": 0.008, - "y": 100.0 - } - ] -} \ No newline at end of file diff --git a/src/app/MockData/data_2.json b/src/app/MockData/data_2.json deleted file mode 100644 index c0bb2a0..0000000 --- a/src/app/MockData/data_2.json +++ /dev/null @@ -1,404 +0,0 @@ -{ - "data": [ - { - "x": 0.0147, - "y": 1.0 - }, - { - "x": 0.0091, - "y": 2.0 - }, - { - "x": 0.0114, - "y": 3.0 - }, - { - "x": 0.0032, - "y": 4.0 - }, - { - "x": -0.0066, - "y": 5.0 - }, - { - "x": -0.0169, - "y": 6.0 - }, - { - "x": -0.0081, - "y": 7.0 - }, - { - "x": -0.0136, - "y": 8.0 - }, - { - "x": 0.0247, - "y": 9.0 - }, - { - "x": -0.0126, - "y": 10.0 - }, - { - "x": 0.0236, - "y": 11.0 - }, - { - "x": -0.0115, - "y": 12.0 - }, - { - "x": -0.0274, - "y": 13.0 - }, - { - "x": 0.0016, - "y": 14.0 - }, - { - "x": 0.0006, - "y": 15.0 - }, - { - "x": 0.0075, - "y": 16.0 - }, - { - "x": -0.0109, - "y": 17.0 - }, - { - "x": 0.0142, - "y": 18.0 - }, - { - "x": 0.0063, - "y": 19.0 - }, - { - "x": -0.008, - "y": 20.0 - }, - { - "x": 0.0201, - "y": 21.0 - }, - { - "x": 0.0035, - "y": 22.0 - }, - { - "x": 0.0067, - "y": 23.0 - }, - { - "x": 0.0088, - "y": 24.0 - }, - { - "x": 0.012, - "y": 25.0 - }, - { - "x": -0.0179, - "y": 26.0 - }, - { - "x": -0.0165, - "y": 27.0 - }, - { - "x": -0.0023, - "y": 28.0 - }, - { - "x": 0.0137, - "y": 29.0 - }, - { - "x": -0.0486, - "y": 30.0 - }, - { - "x": -0.0089, - "y": 31.0 - }, - { - "x": 0.0345, - "y": 32.0 - }, - { - "x": -0.0219, - "y": 33.0 - }, - { - "x": 0.0216, - "y": 34.0 - }, - { - "x": -0.0043, - "y": 35.0 - }, - { - "x": -0.0239, - "y": 36.0 - }, - { - "x": 0.015, - "y": 37.0 - }, - { - "x": 0.0061, - "y": 38.0 - }, - { - "x": 0.0093, - "y": 39.0 - }, - { - "x": -0.0355, - "y": 40.0 - }, - { - "x": 0.0214, - "y": 41.0 - }, - { - "x": -0.0162, - "y": 42.0 - }, - { - "x": -0.0191, - "y": 43.0 - }, - { - "x": 0.005, - "y": 44.0 - }, - { - "x": 0.0254, - "y": 45.0 - }, - { - "x": 0.0151, - "y": 46.0 - }, - { - "x": -0.071, - "y": 47.0 - }, - { - "x": -0.0292, - "y": 48.0 - }, - { - "x": 0.0107, - "y": 49.0 - }, - { - "x": 0.0294, - "y": 50.0 - }, - { - "x": -0.007, - "y": 51.0 - }, - { - "x": -0.0197, - "y": 52.0 - }, - { - "x": -0.053, - "y": 53.0 - }, - { - "x": -0.0101, - "y": 54.0 - }, - { - "x": -0.0291, - "y": 55.0 - }, - { - "x": 0.0241, - "y": 56.0 - }, - { - "x": 0.011, - "y": 57.0 - }, - { - "x": -0.0413, - "y": 58.0 - }, - { - "x": -0.0502, - "y": 59.0 - }, - { - "x": -0.0011, - "y": 60.0 - }, - { - "x": -0.0261, - "y": 61.0 - }, - { - "x": 0.0133, - "y": 62.0 - }, - { - "x": -0.0022, - "y": 63.0 - }, - { - "x": 0.037, - "y": 64.0 - }, - { - "x": -0.0077, - "y": 65.0 - }, - { - "x": -0.0054, - "y": 66.0 - }, - { - "x": 0.0338, - "y": 67.0 - }, - { - "x": -0.046, - "y": 68.0 - }, - { - "x": -0.0113, - "y": 69.0 - }, - { - "x": -0.037, - "y": 70.0 - }, - { - "x": 0.0065, - "y": 71.0 - }, - { - "x": -0.0058, - "y": 72.0 - }, - { - "x": 0.0028, - "y": 73.0 - }, - { - "x": 0.0108, - "y": 74.0 - }, - { - "x": -0.0331, - "y": 75.0 - }, - { - "x": -0.0094, - "y": 76.0 - }, - { - "x": 0.0128, - "y": 77.0 - }, - { - "x": -0.0322, - "y": 78.0 - }, - { - "x": -0.0259, - "y": 79.0 - }, - { - "x": -0.0405, - "y": 80.0 - }, - { - "x": -0.0266, - "y": 81.0 - }, - { - "x": 0.0658, - "y": 82.0 - }, - { - "x": -0.0065, - "y": 83.0 - }, - { - "x": 0.0005, - "y": 84.0 - }, - { - "x": 0.0096, - "y": 85.0 - }, - { - "x": 0.0011, - "y": 86.0 - }, - { - "x": -0.1106, - "y": 87.0 - }, - { - "x": 0.0409, - "y": 88.0 - }, - { - "x": -0.0022, - "y": 89.0 - }, - { - "x": 0.0187, - "y": 90.0 - }, - { - "x": 0.0167, - "y": 91.0 - }, - { - "x": 0.0032, - "y": 92.0 - }, - { - "x": -0.0099, - "y": 93.0 - }, - { - "x": -0.0153, - "y": 94.0 - }, - { - "x": 0.0201, - "y": 95.0 - }, - { - "x": 0.0121, - "y": 96.0 - }, - { - "x": 0.0059, - "y": 97.0 - }, - { - "x": 0.0061, - "y": 98.0 - }, - { - "x": -0.023, - "y": 99.0 - }, - { - "x": 0.004, - "y": 100.0 - } - ] -} \ No newline at end of file diff --git a/src/app/MockData/data_3.json b/src/app/MockData/data_3.json deleted file mode 100644 index 8378927..0000000 --- a/src/app/MockData/data_3.json +++ /dev/null @@ -1,404 +0,0 @@ -{ - "data": [ - { - "x": -0.008, - "y": 1.0 - }, - { - "x": 0.0321, - "y": 2.0 - }, - { - "x": -0.0093, - "y": 3.0 - }, - { - "x": -0.0105, - "y": 4.0 - }, - { - "x": 0.064, - "y": 5.0 - }, - { - "x": 0.0071, - "y": 6.0 - }, - { - "x": 0.0005, - "y": 7.0 - }, - { - "x": 0.0276, - "y": 8.0 - }, - { - "x": 0.0168, - "y": 9.0 - }, - { - "x": 0.0003, - "y": 10.0 - }, - { - "x": -0.0193, - "y": 11.0 - }, - { - "x": -0.0031, - "y": 12.0 - }, - { - "x": -0.0058, - "y": 13.0 - }, - { - "x": 0.0085, - "y": 14.0 - }, - { - "x": -0.0042, - "y": 15.0 - }, - { - "x": 0.0036, - "y": 16.0 - }, - { - "x": -0.0022, - "y": 17.0 - }, - { - "x": 0.003, - "y": 18.0 - }, - { - "x": 0.0064, - "y": 19.0 - }, - { - "x": -0.0057, - "y": 20.0 - }, - { - "x": 0.011, - "y": 21.0 - }, - { - "x": 0.0072, - "y": 22.0 - }, - { - "x": 0.0006, - "y": 23.0 - }, - { - "x": 0.0031, - "y": 24.0 - }, - { - "x": -0.0099, - "y": 25.0 - }, - { - "x": 0.0104, - "y": 26.0 - }, - { - "x": 0.005, - "y": 27.0 - }, - { - "x": -0.0018, - "y": 28.0 - }, - { - "x": -0.0058, - "y": 29.0 - }, - { - "x": -0.0117, - "y": 30.0 - }, - { - "x": 0.0024, - "y": 31.0 - }, - { - "x": 0.0335, - "y": 32.0 - }, - { - "x": 0.0111, - "y": 33.0 - }, - { - "x": 0.0044, - "y": 34.0 - }, - { - "x": 0.011, - "y": 35.0 - }, - { - "x": 0.0128, - "y": 36.0 - }, - { - "x": 0.0101, - "y": 37.0 - }, - { - "x": -0.008, - "y": 38.0 - }, - { - "x": 0.0087, - "y": 39.0 - }, - { - "x": 0.0355, - "y": 40.0 - }, - { - "x": -0.0211, - "y": 41.0 - }, - { - "x": -0.0122, - "y": 42.0 - }, - { - "x": -0.0104, - "y": 43.0 - }, - { - "x": 0.0089, - "y": 44.0 - }, - { - "x": 0.0013, - "y": 45.0 - }, - { - "x": 0.0065, - "y": 46.0 - }, - { - "x": 0.0067, - "y": 47.0 - }, - { - "x": 0.0143, - "y": 48.0 - }, - { - "x": 0.0068, - "y": 49.0 - }, - { - "x": 0.0017, - "y": 50.0 - }, - { - "x": 0.0066, - "y": 51.0 - }, - { - "x": 0.0155, - "y": 52.0 - }, - { - "x": -0.003, - "y": 53.0 - }, - { - "x": 0.0056, - "y": 54.0 - }, - { - "x": -0.0084, - "y": 55.0 - }, - { - "x": -0.0004, - "y": 56.0 - }, - { - "x": 0.0018, - "y": 57.0 - }, - { - "x": 0.0001, - "y": 58.0 - }, - { - "x": 0.0191, - "y": 59.0 - }, - { - "x": 0.0036, - "y": 60.0 - }, - { - "x": 0.0033, - "y": 61.0 - }, - { - "x": 0.0142, - "y": 62.0 - }, - { - "x": -0.0015, - "y": 63.0 - }, - { - "x": -0.0092, - "y": 64.0 - }, - { - "x": -0.0048, - "y": 65.0 - }, - { - "x": 0.0015, - "y": 66.0 - }, - { - "x": -0.0196, - "y": 67.0 - }, - { - "x": 0.0468, - "y": 68.0 - }, - { - "x": -0.0066, - "y": 69.0 - }, - { - "x": 0.0123, - "y": 70.0 - }, - { - "x": -0.0157, - "y": 71.0 - }, - { - "x": -0.0277, - "y": 72.0 - }, - { - "x": 0.0002, - "y": 73.0 - }, - { - "x": -0.0109, - "y": 74.0 - }, - { - "x": -0.018, - "y": 75.0 - }, - { - "x": -0.0617, - "y": 76.0 - }, - { - "x": 0.0156, - "y": 77.0 - }, - { - "x": 0.0118, - "y": 78.0 - }, - { - "x": -0.0044, - "y": 79.0 - }, - { - "x": -0.0057, - "y": 80.0 - }, - { - "x": -0.0323, - "y": 81.0 - }, - { - "x": 0.0188, - "y": 82.0 - }, - { - "x": -0.0209, - "y": 83.0 - }, - { - "x": -0.0174, - "y": 84.0 - }, - { - "x": -0.0039, - "y": 85.0 - }, - { - "x": -0.0042, - "y": 86.0 - }, - { - "x": -0.0048, - "y": 87.0 - }, - { - "x": 0.0052, - "y": 88.0 - }, - { - "x": -0.0184, - "y": 89.0 - }, - { - "x": -0.0102, - "y": 90.0 - }, - { - "x": 0.0353, - "y": 91.0 - }, - { - "x": 0.0159, - "y": 92.0 - }, - { - "x": 0.0145, - "y": 93.0 - }, - { - "x": 0.0259, - "y": 94.0 - }, - { - "x": 0.0126, - "y": 95.0 - }, - { - "x": 0.0114, - "y": 96.0 - }, - { - "x": -0.0032, - "y": 97.0 - }, - { - "x": -0.0002, - "y": 98.0 - }, - { - "x": -0.0073, - "y": 99.0 - }, - { - "x": 0.0059, - "y": 100.0 - } - ] -} \ No newline at end of file diff --git a/src/app/MockData/data_4.json b/src/app/MockData/data_4.json deleted file mode 100644 index 006b9fe..0000000 --- a/src/app/MockData/data_4.json +++ /dev/null @@ -1,404 +0,0 @@ -{ - "data": [ - { - "x": 0.023, - "y": 1.0 - }, - { - "x": -0.0029, - "y": 2.0 - }, - { - "x": 0.008, - "y": 3.0 - }, - { - "x": -0.0034, - "y": 4.0 - }, - { - "x": -0.001, - "y": 5.0 - }, - { - "x": -0.0154, - "y": 6.0 - }, - { - "x": 0.0212, - "y": 7.0 - }, - { - "x": -0.0003, - "y": 8.0 - }, - { - "x": -0.0092, - "y": 9.0 - }, - { - "x": 0.018, - "y": 10.0 - }, - { - "x": 0.0058, - "y": 11.0 - }, - { - "x": 0.0082, - "y": 12.0 - }, - { - "x": -0.0009, - "y": 13.0 - }, - { - "x": -0.021, - "y": 14.0 - }, - { - "x": 0.0061, - "y": 15.0 - }, - { - "x": 0.0098, - "y": 16.0 - }, - { - "x": -0.0073, - "y": 17.0 - }, - { - "x": 0.0076, - "y": 18.0 - }, - { - "x": 0.0093, - "y": 19.0 - }, - { - "x": -0.0035, - "y": 20.0 - }, - { - "x": -0.0057, - "y": 21.0 - }, - { - "x": 0.0112, - "y": 22.0 - }, - { - "x": -0.0152, - "y": 23.0 - }, - { - "x": 0.0223, - "y": 24.0 - }, - { - "x": 0.0078, - "y": 25.0 - }, - { - "x": -0.0008, - "y": 26.0 - }, - { - "x": -0.008, - "y": 27.0 - }, - { - "x": 0.0035, - "y": 28.0 - }, - { - "x": 0.0093, - "y": 29.0 - }, - { - "x": -0.0043, - "y": 30.0 - }, - { - "x": 0.02, - "y": 31.0 - }, - { - "x": -0.0221, - "y": 32.0 - }, - { - "x": -0.0216, - "y": 33.0 - }, - { - "x": -0.0552, - "y": 34.0 - }, - { - "x": 0.0186, - "y": 35.0 - }, - { - "x": 0.0102, - "y": 36.0 - }, - { - "x": 0.0216, - "y": 37.0 - }, - { - "x": -0.0121, - "y": 38.0 - }, - { - "x": -0.0025, - "y": 39.0 - }, - { - "x": 0.0406, - "y": 40.0 - }, - { - "x": -0.0307, - "y": 41.0 - }, - { - "x": -0.005, - "y": 42.0 - }, - { - "x": 0.0231, - "y": 43.0 - }, - { - "x": 0.0183, - "y": 44.0 - }, - { - "x": 0.0, - "y": 45.0 - }, - { - "x": 0.0107, - "y": 46.0 - }, - { - "x": -0.0008, - "y": 47.0 - }, - { - "x": -0.0485, - "y": 48.0 - }, - { - "x": 0.0186, - "y": 49.0 - }, - { - "x": -0.0114, - "y": 50.0 - }, - { - "x": 0.0067, - "y": 51.0 - }, - { - "x": 0.0166, - "y": 52.0 - }, - { - "x": -0.0013, - "y": 53.0 - }, - { - "x": -0.0148, - "y": 54.0 - }, - { - "x": 0.0167, - "y": 55.0 - }, - { - "x": 0.0192, - "y": 56.0 - }, - { - "x": -0.0001, - "y": 57.0 - }, - { - "x": 0.0042, - "y": 58.0 - }, - { - "x": 0.0117, - "y": 59.0 - }, - { - "x": 0.0308, - "y": 60.0 - }, - { - "x": -0.0022, - "y": 61.0 - }, - { - "x": -0.0198, - "y": 62.0 - }, - { - "x": 0.0052, - "y": 63.0 - }, - { - "x": 0.0036, - "y": 64.0 - }, - { - "x": 0.0093, - "y": 65.0 - }, - { - "x": -0.0082, - "y": 66.0 - }, - { - "x": -0.0148, - "y": 67.0 - }, - { - "x": 0.0045, - "y": 68.0 - }, - { - "x": -0.0048, - "y": 69.0 - }, - { - "x": 0.0152, - "y": 70.0 - }, - { - "x": -0.0052, - "y": 71.0 - }, - { - "x": -0.0049, - "y": 72.0 - }, - { - "x": 0.023, - "y": 73.0 - }, - { - "x": 0.0028, - "y": 74.0 - }, - { - "x": -0.0257, - "y": 75.0 - }, - { - "x": 0.0084, - "y": 76.0 - }, - { - "x": 0.0273, - "y": 77.0 - }, - { - "x": 0.0002, - "y": 78.0 - }, - { - "x": -0.0119, - "y": 79.0 - }, - { - "x": 0.0116, - "y": 80.0 - }, - { - "x": 0.0133, - "y": 81.0 - }, - { - "x": 0.0259, - "y": 82.0 - }, - { - "x": -0.0014, - "y": 83.0 - }, - { - "x": -0.0023, - "y": 84.0 - }, - { - "x": -0.0041, - "y": 85.0 - }, - { - "x": 0.0039, - "y": 86.0 - }, - { - "x": 0.0048, - "y": 87.0 - }, - { - "x": 0.017, - "y": 88.0 - }, - { - "x": -0.0023, - "y": 89.0 - }, - { - "x": 0.0132, - "y": 90.0 - }, - { - "x": 0.0016, - "y": 91.0 - }, - { - "x": 0.0122, - "y": 92.0 - }, - { - "x": 0.0099, - "y": 93.0 - }, - { - "x": -0.0237, - "y": 94.0 - }, - { - "x": -0.0001, - "y": 95.0 - }, - { - "x": 0.0221, - "y": 96.0 - }, - { - "x": 0.0276, - "y": 97.0 - }, - { - "x": 0.0065, - "y": 98.0 - }, - { - "x": -0.0014, - "y": 99.0 - }, - { - "x": 0.0004, - "y": 100.0 - } - ] -} \ No newline at end of file diff --git a/src/app/MockData/data_5.json b/src/app/MockData/data_5.json deleted file mode 100644 index f4cfdb5..0000000 --- a/src/app/MockData/data_5.json +++ /dev/null @@ -1,404 +0,0 @@ -{ - "data": [ - { - "x": 0.0084, - "y": 1.0 - }, - { - "x": 0.0027, - "y": 2.0 - }, - { - "x": 0.0079, - "y": 3.0 - }, - { - "x": -0.0009, - "y": 4.0 - }, - { - "x": 0.0095, - "y": 5.0 - }, - { - "x": -0.007, - "y": 6.0 - }, - { - "x": 0.0117, - "y": 7.0 - }, - { - "x": 0.005, - "y": 8.0 - }, - { - "x": -0.003, - "y": 9.0 - }, - { - "x": -0.0118, - "y": 10.0 - }, - { - "x": -0.0045, - "y": 11.0 - }, - { - "x": -0.0009, - "y": 12.0 - }, - { - "x": 0.0172, - "y": 13.0 - }, - { - "x": -0.0079, - "y": 14.0 - }, - { - "x": 0.0133, - "y": 15.0 - }, - { - "x": -0.0022, - "y": 16.0 - }, - { - "x": -0.0117, - "y": 17.0 - }, - { - "x": -0.0182, - "y": 18.0 - }, - { - "x": 0.0087, - "y": 19.0 - }, - { - "x": 0.0145, - "y": 20.0 - }, - { - "x": 0.019, - "y": 21.0 - }, - { - "x": -0.0142, - "y": 22.0 - }, - { - "x": 0.0058, - "y": 23.0 - }, - { - "x": 0.0085, - "y": 24.0 - }, - { - "x": 0.0025, - "y": 25.0 - }, - { - "x": 0.0134, - "y": 26.0 - }, - { - "x": 0.0168, - "y": 27.0 - }, - { - "x": 0.002, - "y": 28.0 - }, - { - "x": -0.0024, - "y": 29.0 - }, - { - "x": 0.001, - "y": 30.0 - }, - { - "x": -0.0021, - "y": 31.0 - }, - { - "x": 0.0161, - "y": 32.0 - }, - { - "x": 0.0009, - "y": 33.0 - }, - { - "x": 0.0195, - "y": 34.0 - }, - { - "x": -0.0004, - "y": 35.0 - }, - { - "x": 0.0059, - "y": 36.0 - }, - { - "x": 0.0073, - "y": 37.0 - }, - { - "x": 0.0223, - "y": 38.0 - }, - { - "x": -0.0098, - "y": 39.0 - }, - { - "x": 0.0079, - "y": 40.0 - }, - { - "x": -0.0047, - "y": 41.0 - }, - { - "x": 0.0158, - "y": 42.0 - }, - { - "x": 0.0208, - "y": 43.0 - }, - { - "x": 0.0023, - "y": 44.0 - }, - { - "x": 0.0209, - "y": 45.0 - }, - { - "x": -0.0137, - "y": 46.0 - }, - { - "x": -0.0043, - "y": 47.0 - }, - { - "x": 0.0124, - "y": 48.0 - }, - { - "x": 0.0109, - "y": 49.0 - }, - { - "x": -0.0068, - "y": 50.0 - }, - { - "x": 0.0036, - "y": 51.0 - }, - { - "x": 0.0048, - "y": 52.0 - }, - { - "x": -0.0029, - "y": 53.0 - }, - { - "x": -0.0303, - "y": 54.0 - }, - { - "x": 0.0275, - "y": 55.0 - }, - { - "x": 0.0205, - "y": 56.0 - }, - { - "x": -0.0015, - "y": 57.0 - }, - { - "x": -0.0464, - "y": 58.0 - }, - { - "x": -0.0028, - "y": 59.0 - }, - { - "x": 0.032, - "y": 60.0 - }, - { - "x": 0.0081, - "y": 61.0 - }, - { - "x": 0.0116, - "y": 62.0 - }, - { - "x": -0.0162, - "y": 63.0 - }, - { - "x": 0.0047, - "y": 64.0 - }, - { - "x": -0.0061, - "y": 65.0 - }, - { - "x": 0.0232, - "y": 66.0 - }, - { - "x": -0.0072, - "y": 67.0 - }, - { - "x": 0.0002, - "y": 68.0 - }, - { - "x": -0.0187, - "y": 69.0 - }, - { - "x": 0.0143, - "y": 70.0 - }, - { - "x": -0.0104, - "y": 71.0 - }, - { - "x": -0.0232, - "y": 72.0 - }, - { - "x": -0.0499, - "y": 73.0 - }, - { - "x": -0.0351, - "y": 74.0 - }, - { - "x": 0.0156, - "y": 75.0 - }, - { - "x": -0.0699, - "y": 76.0 - }, - { - "x": -0.0006, - "y": 77.0 - }, - { - "x": 0.0852, - "y": 78.0 - }, - { - "x": -0.0328, - "y": 79.0 - }, - { - "x": 0.0443, - "y": 80.0 - }, - { - "x": -0.0335, - "y": 81.0 - }, - { - "x": -0.0135, - "y": 82.0 - }, - { - "x": -0.0859, - "y": 83.0 - }, - { - "x": 0.0672, - "y": 84.0 - }, - { - "x": -0.036, - "y": 85.0 - }, - { - "x": -0.1096, - "y": 86.0 - }, - { - "x": 0.107, - "y": 87.0 - }, - { - "x": -0.1476, - "y": 88.0 - }, - { - "x": 0.0421, - "y": 89.0 - }, - { - "x": -0.0251, - "y": 90.0 - }, - { - "x": -0.0077, - "y": 91.0 - }, - { - "x": -0.0678, - "y": 92.0 - }, - { - "x": -0.0217, - "y": 93.0 - }, - { - "x": 0.0912, - "y": 94.0 - }, - { - "x": -0.0055, - "y": 95.0 - }, - { - "x": 0.05, - "y": 96.0 - }, - { - "x": -0.0432, - "y": 97.0 - }, - { - "x": 0.0277, - "y": 98.0 - }, - { - "x": -0.002, - "y": 99.0 - }, - { - "x": -0.0555, - "y": 100.0 - } - ] -} \ No newline at end of file diff --git a/src/app/page.tsx b/src/app/page.tsx index 9472f57..69abe76 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -12,8 +12,8 @@ import { export default function Home() { return ( -
-
+
+
diff --git a/src/components/charts/AdvChart.tsx b/src/components/charts/AdvChart.tsx new file mode 100644 index 0000000..b0edc01 --- /dev/null +++ b/src/components/charts/AdvChart.tsx @@ -0,0 +1,210 @@ +import { createChart } from "lightweight-charts"; +import React, { + createContext, + forwardRef, + useCallback, + useContext, + useEffect, + useImperativeHandle, + useLayoutEffect, + useRef, + useState, +} from "react"; + +const Context = createContext(); + +const initialData = [ + { time: "2018-10-11", value: 52.89 }, + { time: "2018-10-12", value: 51.65 }, + { time: "2018-10-13", value: 51.56 }, + { time: "2018-10-14", value: 50.19 }, + { time: "2018-10-15", value: 51.86 }, + { time: "2018-10-16", value: 51.25 }, +]; +const currentDate = new Date(initialData[initialData.length - 1].time); + +export const App = (props: any) => { + const { + colors: { + backgroundColor = "white", + lineColor = "#2962FF", + textColor = "black", + } = {}, + } = props; + + const [chartLayoutOptions, setChartLayoutOptions] = useState({}); + // The following variables illustrate how a series could be updated. + const series1 = useRef(null); + const [started, setStarted] = useState(false); + + // The purpose of this effect is purely to show how a series could + // be updated using the `reference` passed to the `Series` component. + useEffect(() => { + if (series1.current === null) { + return; + } + + if (started) { + const interval = setInterval(() => { + currentDate.setDate(currentDate.getDate() + 1); + const next = { + time: currentDate.toISOString().slice(0, 10), + value: 53 - 2 * Math.random(), + }; + series1.current.update(next); + }, 1000); + return () => clearInterval(interval); + } + }, [started]); + + useEffect(() => { + setChartLayoutOptions({ + background: { + color: backgroundColor, + }, + textColor, + }); + }, [backgroundColor, textColor]); + + return ( + <> + + + + + + ); +}; + +export function Chart(props: any) { + const [container, setContainer] = useState(false); + const handleRef = useCallback((ref) => setContainer(ref), []); + return ( +
+ {container && } +
+ ); +} + +interface chartContainerProps { + children: any; + container: any; + layout: any; +} + +export const ChartContainer = forwardRef((props: chartContainerProps, ref) => { + const { children, container, layout, ...rest } = props; + + const chartApiRef = useRef({ + api() { + if (!this._api) { + this._api = createChart(container, { + ...rest, + layout, + width: container.clientWidth, + height: 300, + }); + this._api.timeScale().fitContent(); + } + return this._api; + }, + free() { + if (this._api) { + this._api.remove(); + } + }, + }); + + useLayoutEffect(() => { + const currentRef = chartApiRef.current; + const chart = currentRef.api(); + + const handleResize = () => { + chart.applyOptions({ + ...rest, + width: container.clientWidth, + }); + }; + + window.addEventListener("resize", handleResize); + return () => { + window.removeEventListener("resize", handleResize); + chart.remove(); + }; + }, []); + + useLayoutEffect(() => { + const currentRef = chartApiRef.current; + currentRef.api(); + }, []); + + useLayoutEffect(() => { + const currentRef = chartApiRef.current; + currentRef.api().applyOptions(rest); + }, []); + + useImperativeHandle(ref, () => chartApiRef.current.api(), []); + + useEffect(() => { + const currentRef = chartApiRef.current; + currentRef.api().applyOptions({ layout }); + }, [layout]); + + return ( + + {props.children} + + ); +}); +ChartContainer.displayName = "ChartContainer"; + +export const Series = forwardRef((props, ref) => { + const parent = useContext(Context); + const context = useRef({ + api() { + if (!this._api) { + const { children, data, type, ...rest } = props; + this._api = + type === "line" + ? parent.api().addLineSeries(rest) + : parent.api().addAreaSeries(rest); + this._api.setData(data); + } + return this._api; + }, + free() { + if (this._api) { + parent.free(); + } + }, + }); + + useLayoutEffect(() => { + const currentRef = context.current; + currentRef.api(); + + return () => currentRef.free(); + }, []); + + useLayoutEffect(() => { + const currentRef = context.current; + const { children, data, ...rest } = props; + currentRef.api().applyOptions(rest); + }); + + useImperativeHandle(ref, () => context.current.api(), []); + + return ( + + {props.children} + + ); +}); +Series.displayName = "Series"; diff --git a/src/components/charts/PortfolioChart.tsx b/src/components/charts/PortfolioChart.tsx index 1461d76..3c8ac14 100644 --- a/src/components/charts/PortfolioChart.tsx +++ b/src/components/charts/PortfolioChart.tsx @@ -60,7 +60,7 @@ const PortfolioChart = (props: any) => { return (
diff --git a/src/components/charts/news/NewsTable.tsx b/src/components/charts/news/NewsTable.tsx index c7b99bd..6e1afc0 100644 --- a/src/components/charts/news/NewsTable.tsx +++ b/src/components/charts/news/NewsTable.tsx @@ -58,7 +58,7 @@ export function NewsTable({ {row.getVisibleCells().map((cell) => ( diff --git a/src/components/charts/news/newsColumns.tsx b/src/components/charts/news/newsColumns.tsx index fa9d7dd..08f5bbb 100644 --- a/src/components/charts/news/newsColumns.tsx +++ b/src/components/charts/news/newsColumns.tsx @@ -11,7 +11,7 @@ export const newsColumns: ColumnDef[] = [ const headline: string = row.getValue("headline"); return ( -
+
{headline}
); diff --git a/src/components/modules/HomepageModuleCard.tsx b/src/components/modules/HomepageModuleCard.tsx index 545e5c7..20cbfb0 100644 --- a/src/components/modules/HomepageModuleCard.tsx +++ b/src/components/modules/HomepageModuleCard.tsx @@ -9,7 +9,7 @@ interface HomepageModuleProps { const HomepageModule = ({ title, children }: HomepageModuleProps) => { return ( -
+
{title} diff --git a/src/components/modules/HomepageModules.tsx b/src/components/modules/HomepageModules.tsx index 5d0e9f6..12324a2 100644 --- a/src/components/modules/HomepageModules.tsx +++ b/src/components/modules/HomepageModules.tsx @@ -21,7 +21,9 @@ export const PortfolioModule = () => {
2W 1M YTD
^10.0% $3,412.09
- +
+ +