binbot-charts 0.7.1 → 0.7.2
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/package.json +21 -5
- package/babel.config.json +0 -13
- package/browserslist +0 -31
- package/package-lock.json +0 -18327
- package/public/charting_library/bundles/0.d46f0b5e9380d7893de5.js +0 -2
- package/public/charting_library/bundles/0579d40b812fa2c3ffe72e5803a6e14c.cur +0 -0
- package/public/charting_library/bundles/1.92647ec0a7beb8b2898d.css +0 -0
- package/public/charting_library/bundles/1.92647ec0a7beb8b2898d.rtl.css +0 -0
- package/public/charting_library/bundles/1.f02c87d35fbc8ffcaedb.js +0 -1
- package/public/charting_library/bundles/10.21e665b7935d5bc4ba64.js +0 -6
- package/public/charting_library/bundles/11.8b65dc2e0d8b6e5041c4.css +0 -1
- package/public/charting_library/bundles/11.8b65dc2e0d8b6e5041c4.rtl.css +0 -1
- package/public/charting_library/bundles/11.df012db70159a159d927.js +0 -1
- package/public/charting_library/bundles/12.37750b21f6d8d35c6e6e.js +0 -1
- package/public/charting_library/bundles/12.ef8057448f3a7ae1c3d8.css +0 -1
- package/public/charting_library/bundles/12.ef8057448f3a7ae1c3d8.rtl.css +0 -1
- package/public/charting_library/bundles/13.699469c73d09b7add56d.js +0 -1
- package/public/charting_library/bundles/13.9240f13280154f2593b7.css +0 -1
- package/public/charting_library/bundles/13.9240f13280154f2593b7.rtl.css +0 -1
- package/public/charting_library/bundles/14.8095b40dd1e7deedf401.css +0 -1
- package/public/charting_library/bundles/14.8095b40dd1e7deedf401.rtl.css +0 -1
- package/public/charting_library/bundles/14.d1148b38d59df9ca5061.js +0 -1
- package/public/charting_library/bundles/15.44f2acca80348a1da1a6.js +0 -3
- package/public/charting_library/bundles/16.680572949c1125757d35.js +0 -1
- package/public/charting_library/bundles/16.d567c9db608f3d98d8de.css +0 -1
- package/public/charting_library/bundles/16.d567c9db608f3d98d8de.rtl.css +0 -1
- package/public/charting_library/bundles/17.404a01f527881dfff424.js +0 -1
- package/public/charting_library/bundles/17.ec35a19db935279c5b42.css +0 -1
- package/public/charting_library/bundles/17.ec35a19db935279c5b42.rtl.css +0 -1
- package/public/charting_library/bundles/18.78de69cfba051874e071.js +0 -4
- package/public/charting_library/bundles/19.048f7f5d36fef428ca8d.js +0 -1
- package/public/charting_library/bundles/19.75c30426f9d3ad5ca0c5.css +0 -1
- package/public/charting_library/bundles/19.75c30426f9d3ad5ca0c5.rtl.css +0 -1
- package/public/charting_library/bundles/1df47f578aeef40dd1f2328338a133be.png +0 -0
- package/public/charting_library/bundles/2.60931787a6734697ac13.js +0 -4
- package/public/charting_library/bundles/20.bc09ed47c5a62e1bc5c2.js +0 -4
- package/public/charting_library/bundles/21.4c7b5cccb67a95e7e782.js +0 -1
- package/public/charting_library/bundles/21.8153544955cdc47262e3.css +0 -1
- package/public/charting_library/bundles/21.8153544955cdc47262e3.rtl.css +0 -1
- package/public/charting_library/bundles/22.ca4300bcf614d8d5f4ab.js +0 -1
- package/public/charting_library/bundles/22.da9773799a06c6066d1e.css +0 -1
- package/public/charting_library/bundles/22.da9773799a06c6066d1e.rtl.css +0 -1
- package/public/charting_library/bundles/23.256ba98e6a03200bdeba.js +0 -1
- package/public/charting_library/bundles/23.ee754f50171546186397.css +0 -1
- package/public/charting_library/bundles/23.ee754f50171546186397.rtl.css +0 -1
- package/public/charting_library/bundles/24.bc4fafedb1730259aa10.js +0 -1
- package/public/charting_library/bundles/24.e70c1623e0c74477ef2e.css +0 -1
- package/public/charting_library/bundles/24.e70c1623e0c74477ef2e.rtl.css +0 -1
- package/public/charting_library/bundles/25.7416db26ed3dcc87c05a.js +0 -18
- package/public/charting_library/bundles/26.3aeec391d4e6e19989ee.js +0 -1
- package/public/charting_library/bundles/26.69139a843bc1c84f790b.css +0 -1
- package/public/charting_library/bundles/26.69139a843bc1c84f790b.rtl.css +0 -1
- package/public/charting_library/bundles/27.e3ec08b1fb9df5f36ada.js +0 -3
- package/public/charting_library/bundles/28.3140e8cb507ad2593c76.css +0 -1
- package/public/charting_library/bundles/28.3140e8cb507ad2593c76.rtl.css +0 -1
- package/public/charting_library/bundles/28.9f103042c27ea2df422f.js +0 -1
- package/public/charting_library/bundles/29.07af6dca962ea27209f0.css +0 -1
- package/public/charting_library/bundles/29.07af6dca962ea27209f0.rtl.css +0 -1
- package/public/charting_library/bundles/29.3df8712b85d45a626aa0.js +0 -1
- package/public/charting_library/bundles/3.76c398b01b707e5b251c.js +0 -1
- package/public/charting_library/bundles/3.eeb90413029441681f91.css +0 -1
- package/public/charting_library/bundles/3.eeb90413029441681f91.rtl.css +0 -1
- package/public/charting_library/bundles/30.0b732ccb122d160480b6.js +0 -8
- package/public/charting_library/bundles/31.8d2b7a538755fd1bb760.js +0 -5
- package/public/charting_library/bundles/32.13ce02217cf8f9dd6d90.js +0 -4
- package/public/charting_library/bundles/3293616ec0c605c7c2db25829a0a509e.woff +0 -0
- package/public/charting_library/bundles/33.02ed7df481ae8243d2f2.css +0 -1
- package/public/charting_library/bundles/33.02ed7df481ae8243d2f2.rtl.css +0 -1
- package/public/charting_library/bundles/33.4d0dd1f7001fc02099bb.js +0 -1
- package/public/charting_library/bundles/34.4b6099931f57311efc1a.css +0 -1
- package/public/charting_library/bundles/34.4b6099931f57311efc1a.rtl.css +0 -1
- package/public/charting_library/bundles/34.c9baa59add71a1e48fd2.js +0 -1
- package/public/charting_library/bundles/35.999f0e072062b7369a1a.css +0 -1
- package/public/charting_library/bundles/35.999f0e072062b7369a1a.rtl.css +0 -1
- package/public/charting_library/bundles/35.ed9e360f9686ad3a9497.js +0 -1
- package/public/charting_library/bundles/36.1882d1a8d312a0e193e9.js +0 -1
- package/public/charting_library/bundles/36.f315a19c17d5636af8f7.css +0 -1
- package/public/charting_library/bundles/36.f315a19c17d5636af8f7.rtl.css +0 -1
- package/public/charting_library/bundles/37.90129e4904155350d6a1.js +0 -8
- package/public/charting_library/bundles/38.41f3d509b61c8af47de3.js +0 -3
- package/public/charting_library/bundles/39.74a7bc3b464cd284827f.css +0 -1
- package/public/charting_library/bundles/39.74a7bc3b464cd284827f.rtl.css +0 -1
- package/public/charting_library/bundles/39.bc1e9ce938fd5152831f.js +0 -1
- package/public/charting_library/bundles/4.92647ec0a7beb8b2898d.css +0 -0
- package/public/charting_library/bundles/4.92647ec0a7beb8b2898d.rtl.css +0 -0
- package/public/charting_library/bundles/4.c7430b8d89cddcf51345.js +0 -1
- package/public/charting_library/bundles/40.b59f41ba4cacbfb8acc3.js +0 -2
- package/public/charting_library/bundles/40566afd832a155e5e370a8bd423de4b.svg +0 -1
- package/public/charting_library/bundles/40f9a03d174178efb12303caa9bc7cd8.woff2 +0 -0
- package/public/charting_library/bundles/41.8fa0fb0bd4ad0241ef2f.css +0 -1
- package/public/charting_library/bundles/41.8fa0fb0bd4ad0241ef2f.rtl.css +0 -1
- package/public/charting_library/bundles/41.a19b0ae5d68f855d2753.js +0 -1
- package/public/charting_library/bundles/42.494986b0981f6d116fef.js +0 -1
- package/public/charting_library/bundles/42.9078fb8f1629e3eee9bd.css +0 -1
- package/public/charting_library/bundles/42.9078fb8f1629e3eee9bd.rtl.css +0 -1
- package/public/charting_library/bundles/43.619c5ed4a592cc2965a4.js +0 -1
- package/public/charting_library/bundles/43.8bf90585004742c338c5.css +0 -1
- package/public/charting_library/bundles/43.8bf90585004742c338c5.rtl.css +0 -1
- package/public/charting_library/bundles/44.0a7df307e4f397763ce8.js +0 -25
- package/public/charting_library/bundles/45.12a19785e3864bd62a76.css +0 -1
- package/public/charting_library/bundles/45.12a19785e3864bd62a76.rtl.css +0 -1
- package/public/charting_library/bundles/45.db9dbd3e9bfeca5333da.js +0 -1
- package/public/charting_library/bundles/46.f1d4cfe6d6f830b4a011.js +0 -3
- package/public/charting_library/bundles/47.a3da3f774c90bd22798e.js +0 -4
- package/public/charting_library/bundles/48.a3fdb9dd54af71b3bda6.css +0 -1
- package/public/charting_library/bundles/48.a3fdb9dd54af71b3bda6.rtl.css +0 -1
- package/public/charting_library/bundles/48.a93f9cb8b1bcc0e0f21e.js +0 -1
- package/public/charting_library/bundles/49.bacd609f7eb77a4a4b68.js +0 -1
- package/public/charting_library/bundles/49.d723843c9192493b8c13.css +0 -1
- package/public/charting_library/bundles/49.d723843c9192493b8c13.rtl.css +0 -1
- package/public/charting_library/bundles/4a9abefd31dab7c8239e02e925aacd78.png +0 -0
- package/public/charting_library/bundles/4fafff07d8914dc11f6d335f606ff47c.png +0 -0
- package/public/charting_library/bundles/5.5e97b270ab80d99e9085.js +0 -3
- package/public/charting_library/bundles/50.8d5cba5b90176d3d2e3d.css +0 -1
- package/public/charting_library/bundles/50.8d5cba5b90176d3d2e3d.rtl.css +0 -1
- package/public/charting_library/bundles/50.b282667dddcb7fe1569a.js +0 -1
- package/public/charting_library/bundles/51.11871c50951db825ace3.js +0 -1
- package/public/charting_library/bundles/51.300c3df03ca063ec03a0.css +0 -1
- package/public/charting_library/bundles/51.300c3df03ca063ec03a0.rtl.css +0 -1
- package/public/charting_library/bundles/52.0379a85baae3ab43b15c.js +0 -1
- package/public/charting_library/bundles/52.29cec22b3525b47af67e.css +0 -1
- package/public/charting_library/bundles/52.29cec22b3525b47af67e.rtl.css +0 -1
- package/public/charting_library/bundles/53.1d3ec98cfb8e19affb1c.js +0 -12
- package/public/charting_library/bundles/54.bb5888ae55ea0a253a5b.js +0 -7
- package/public/charting_library/bundles/55.3c35a629db21ab961f11.js +0 -9
- package/public/charting_library/bundles/56.b3e69145c0fee614443d.js +0 -4
- package/public/charting_library/bundles/57.236996ec416da4c1f683.js +0 -3
- package/public/charting_library/bundles/58.7ffac4ba908b95705e63.js +0 -3
- package/public/charting_library/bundles/59.397cb6699b74d64072a8.js +0 -1
- package/public/charting_library/bundles/59.418f1db161eefae63284.css +0 -1
- package/public/charting_library/bundles/59.418f1db161eefae63284.rtl.css +0 -1
- package/public/charting_library/bundles/6.2221bb6a5d920bbb4bb2.css +0 -1
- package/public/charting_library/bundles/6.2221bb6a5d920bbb4bb2.rtl.css +0 -1
- package/public/charting_library/bundles/6.2d67b0ae77825dbd455d.js +0 -1
- package/public/charting_library/bundles/60.6b5eced2ef8fa856be88.js +0 -1
- package/public/charting_library/bundles/60.d4583c71cca790a25900.css +0 -1
- package/public/charting_library/bundles/60.d4583c71cca790a25900.rtl.css +0 -1
- package/public/charting_library/bundles/61.38a3040c925fadff7b64.js +0 -6
- package/public/charting_library/bundles/62.63b309f5f8da9ca013b8.js +0 -3
- package/public/charting_library/bundles/63.8255c7f5191bcafcee7c.js +0 -1
- package/public/charting_library/bundles/63.898a61bf08239711dc74.css +0 -1
- package/public/charting_library/bundles/63.898a61bf08239711dc74.rtl.css +0 -1
- package/public/charting_library/bundles/64.6f232bdb0fb4cdcc2d7d.css +0 -1
- package/public/charting_library/bundles/64.6f232bdb0fb4cdcc2d7d.rtl.css +0 -1
- package/public/charting_library/bundles/64.ec4b4d03b28c77658dde.js +0 -1
- package/public/charting_library/bundles/65.556980fc277562af83c8.css +0 -1
- package/public/charting_library/bundles/65.556980fc277562af83c8.rtl.css +0 -1
- package/public/charting_library/bundles/65.f895a78b4e04257983ff.js +0 -1
- package/public/charting_library/bundles/66.2979e9b7c35e7bf03a37.js +0 -1
- package/public/charting_library/bundles/66.84b4001b5c622a569dde.css +0 -1
- package/public/charting_library/bundles/66.84b4001b5c622a569dde.rtl.css +0 -1
- package/public/charting_library/bundles/67.19c83a0c303c290216d2.css +0 -1
- package/public/charting_library/bundles/67.19c83a0c303c290216d2.rtl.css +0 -1
- package/public/charting_library/bundles/67.25fd4b78c8c514988aeb.js +0 -1
- package/public/charting_library/bundles/68.8b4124c875484d11fd94.js +0 -1
- package/public/charting_library/bundles/68.fa7424ae9c5fe5483aac.css +0 -1
- package/public/charting_library/bundles/68.fa7424ae9c5fe5483aac.rtl.css +0 -1
- package/public/charting_library/bundles/69.094b4a764d3dc17820cf.css +0 -1
- package/public/charting_library/bundles/69.094b4a764d3dc17820cf.rtl.css +0 -1
- package/public/charting_library/bundles/69.43756a5c7477730eb0c4.js +0 -1
- package/public/charting_library/bundles/7.2c7c4f8a49c6380227de.js +0 -3
- package/public/charting_library/bundles/70.c27146ec029eda556108.css +0 -1
- package/public/charting_library/bundles/70.c27146ec029eda556108.rtl.css +0 -1
- package/public/charting_library/bundles/70.cb9d1bb5a00896c1bb97.js +0 -1
- package/public/charting_library/bundles/71.15e639d294c4209f256e.css +0 -1
- package/public/charting_library/bundles/71.15e639d294c4209f256e.rtl.css +0 -1
- package/public/charting_library/bundles/71.6a9d0842f5e48f68399c.js +0 -1
- package/public/charting_library/bundles/72.07441fd67b864b86147b.css +0 -1
- package/public/charting_library/bundles/72.07441fd67b864b86147b.rtl.css +0 -1
- package/public/charting_library/bundles/72.e3925aaf38d2c8997638.js +0 -1
- package/public/charting_library/bundles/73.6b8b9e5e2c8e2b753cb8.css +0 -1
- package/public/charting_library/bundles/73.6b8b9e5e2c8e2b753cb8.rtl.css +0 -1
- package/public/charting_library/bundles/73.8ca1a096c5bdc2e5fb8a.js +0 -1
- package/public/charting_library/bundles/7393f661fc7d4389ea6d4dabd2a5aeea.png +0 -0
- package/public/charting_library/bundles/74.34dcc0d3cd1bbfa5e951.js +0 -1
- package/public/charting_library/bundles/74.8c591c252b2e7ad8f744.css +0 -1
- package/public/charting_library/bundles/74.8c591c252b2e7ad8f744.rtl.css +0 -1
- package/public/charting_library/bundles/75.1c9a3a6524248ddf88bf.js +0 -1
- package/public/charting_library/bundles/75.fefbc386c59bf7d4f9f7.css +0 -1
- package/public/charting_library/bundles/75.fefbc386c59bf7d4f9f7.rtl.css +0 -1
- package/public/charting_library/bundles/76.5d20bed213399f326603.js +0 -1
- package/public/charting_library/bundles/76.f14d71a31295d8cd8d8b.css +0 -1
- package/public/charting_library/bundles/76.f14d71a31295d8cd8d8b.rtl.css +0 -1
- package/public/charting_library/bundles/77.3e4ccccc7d3eb03c488f.js +0 -1
- package/public/charting_library/bundles/77.9c35f7046b848fbfd7f5.css +0 -1
- package/public/charting_library/bundles/77.9c35f7046b848fbfd7f5.rtl.css +0 -1
- package/public/charting_library/bundles/78.0d502ab4d94441708606.css +0 -1
- package/public/charting_library/bundles/78.0d502ab4d94441708606.rtl.css +0 -1
- package/public/charting_library/bundles/78.1d1d47a915b06f1496fb.js +0 -1
- package/public/charting_library/bundles/79.86e92b77f8cf32e6bc37.js +0 -1
- package/public/charting_library/bundles/79.b990749a4839f9123f26.css +0 -1
- package/public/charting_library/bundles/79.b990749a4839f9123f26.rtl.css +0 -1
- package/public/charting_library/bundles/7e0cc5f7d7f5151500dd60b8d6ca60a1.png +0 -0
- package/public/charting_library/bundles/8.e66ab8f27911a033604f.css +0 -1
- package/public/charting_library/bundles/8.e66ab8f27911a033604f.rtl.css +0 -1
- package/public/charting_library/bundles/8.ffab20b86db484062268.js +0 -1
- package/public/charting_library/bundles/80.5bdd53d5fc42d40eee28.css +0 -1
- package/public/charting_library/bundles/80.5bdd53d5fc42d40eee28.rtl.css +0 -1
- package/public/charting_library/bundles/80.b5bc6acec3b531a510a9.js +0 -1
- package/public/charting_library/bundles/81.552e046aa828739c508b.css +0 -1
- package/public/charting_library/bundles/81.552e046aa828739c508b.rtl.css +0 -1
- package/public/charting_library/bundles/81.e6a1f76017a44b03480b.js +0 -1
- package/public/charting_library/bundles/82.8c2919e6c8f54e36e9e6.js +0 -1
- package/public/charting_library/bundles/82.e06fe84c8cdead4bd52e.css +0 -1
- package/public/charting_library/bundles/82.e06fe84c8cdead4bd52e.rtl.css +0 -1
- package/public/charting_library/bundles/83.e238aa056c5d4827cbdd.css +0 -1
- package/public/charting_library/bundles/83.e238aa056c5d4827cbdd.rtl.css +0 -1
- package/public/charting_library/bundles/83.f3e53bb5a5940e084955.js +0 -1
- package/public/charting_library/bundles/84.8acc496b4deeeeefb5af.js +0 -1
- package/public/charting_library/bundles/84.bb4fc57627c8626019fd.css +0 -1
- package/public/charting_library/bundles/84.bb4fc57627c8626019fd.rtl.css +0 -1
- package/public/charting_library/bundles/85.39c78fbeaabae306f343.js +0 -1
- package/public/charting_library/bundles/85.e0ba32bafcab02208901.css +0 -1
- package/public/charting_library/bundles/85.e0ba32bafcab02208901.rtl.css +0 -1
- package/public/charting_library/bundles/86.4bbbb9e6262243419986.js +0 -1
- package/public/charting_library/bundles/86.9244fc2bcc2370425a15.css +0 -1
- package/public/charting_library/bundles/86.9244fc2bcc2370425a15.rtl.css +0 -1
- package/public/charting_library/bundles/87.605cbc508223ec27341c.css +0 -1
- package/public/charting_library/bundles/87.605cbc508223ec27341c.rtl.css +0 -1
- package/public/charting_library/bundles/87.cf03fa0a76bfcadd157d.js +0 -1
- package/public/charting_library/bundles/88.158dd8a18e176936a343.css +0 -1
- package/public/charting_library/bundles/88.158dd8a18e176936a343.rtl.css +0 -1
- package/public/charting_library/bundles/88.d1e3aec63ece25f6b8a9.js +0 -1
- package/public/charting_library/bundles/89.5f142643917701de773b.css +0 -1
- package/public/charting_library/bundles/89.5f142643917701de773b.rtl.css +0 -1
- package/public/charting_library/bundles/89.d8aa43b4b9378722d572.js +0 -1
- package/public/charting_library/bundles/898929f1acdb622689e0fc0c95c8fcd0.png +0 -0
- package/public/charting_library/bundles/9.84ecbc930e51cb26d06a.js +0 -1
- package/public/charting_library/bundles/9.8ab09f93a5113a634119.css +0 -1
- package/public/charting_library/bundles/9.8ab09f93a5113a634119.rtl.css +0 -1
- package/public/charting_library/bundles/90.877114560c4828a97702.css +0 -1
- package/public/charting_library/bundles/90.877114560c4828a97702.rtl.css +0 -1
- package/public/charting_library/bundles/90.ce47bb68fc3fc88b5590.js +0 -1
- package/public/charting_library/bundles/91.2142b248a2bb29549a99.css +0 -1
- package/public/charting_library/bundles/91.2142b248a2bb29549a99.rtl.css +0 -1
- package/public/charting_library/bundles/91.a9b79ef7ba0a62311a53.js +0 -1
- package/public/charting_library/bundles/92.76d5ca7ebec10a1a7a12.js +0 -1
- package/public/charting_library/bundles/92.e46f0aa06bcdbddf3831.css +0 -1
- package/public/charting_library/bundles/92.e46f0aa06bcdbddf3831.rtl.css +0 -1
- package/public/charting_library/bundles/93.17d34ca77a7fc85a24d9.css +0 -1
- package/public/charting_library/bundles/93.17d34ca77a7fc85a24d9.rtl.css +0 -1
- package/public/charting_library/bundles/93.6de56ef1975f4a31e542.js +0 -1
- package/public/charting_library/bundles/94.231bea5fb12b806ef287.js +0 -1
- package/public/charting_library/bundles/94.b204218cb73b576333a1.css +0 -1
- package/public/charting_library/bundles/94.b204218cb73b576333a1.rtl.css +0 -1
- package/public/charting_library/bundles/95.51244d1c4baf49d08807.css +0 -1
- package/public/charting_library/bundles/95.51244d1c4baf49d08807.rtl.css +0 -1
- package/public/charting_library/bundles/95.6f7da80aac5cf2bf77d6.js +0 -1
- package/public/charting_library/bundles/96.43bb935eee30715afff7.js +0 -1
- package/public/charting_library/bundles/96.be9ad3d6a7c91501bb55.css +0 -1
- package/public/charting_library/bundles/96.be9ad3d6a7c91501bb55.rtl.css +0 -1
- package/public/charting_library/bundles/a6506134daec7169f68f563f084a9d41.svg +0 -1
- package/public/charting_library/bundles/add-compare-dialog.f980c19f222ff9cb8fe6.js +0 -9
- package/public/charting_library/bundles/b1a63a011fd92dfb93db6db243bb036c.woff2 +0 -0
- package/public/charting_library/bundles/change-interval-dialog.e928f8dec65c9244cafe.js +0 -2
- package/public/charting_library/bundles/chart-bottom-toolbar.b2e895a5fd3f204fb6b6.js +0 -15
- package/public/charting_library/bundles/chart-event-hint.94e94e93f9fdee936b66.js +0 -2
- package/public/charting_library/bundles/chart-screenshot-hint.14bfec43c52bc3d28f82.js +0 -2
- package/public/charting_library/bundles/chart-widget-gui.226991e9f53aba124fc2.js +0 -54
- package/public/charting_library/bundles/compare-model.0e6bbdc5f5942c9a716e.js +0 -5
- package/public/charting_library/bundles/context-menu-renderer.7f6f59270ef0f3afa2ed.js +0 -4
- package/public/charting_library/bundles/currency-label-menu.a7a0c0e44d64b092f2cc.js +0 -4
- package/public/charting_library/bundles/custom-intervals-add-dialog.bb64431fb1c6d852f9f1.js +0 -3
- package/public/charting_library/bundles/drawing-toolbar.8cc497633535648562e7.js +0 -13
- package/public/charting_library/bundles/ed68e83c16f77203e73dbc4c3a7c7fa1.cur +0 -0
- package/public/charting_library/bundles/export-data.c819cfa996e2815ff11d.js +0 -2
- package/public/charting_library/bundles/f55394b616ed1ae9462c37daab941d93.png +0 -0
- package/public/charting_library/bundles/floating-toolbars.d78a058b82ab09013aac.js +0 -20
- package/public/charting_library/bundles/full-tooltips-popup.96fc751e06523b742440.js +0 -3
- package/public/charting_library/bundles/general-chart-properties-dialog.b08948e0c90aebf07ebd.js +0 -5
- package/public/charting_library/bundles/general-property-page.32bdfdbafbd81d9e83c6.js +0 -6
- package/public/charting_library/bundles/go-to-date-dialog-impl.3481c4fcfde2f4d46426.js +0 -14
- package/public/charting_library/bundles/hammerjs.e5489031ed611f47bf09.js +0 -7
- package/public/charting_library/bundles/header-toolbar.4bff61e047f9b8379494.js +0 -9
- package/public/charting_library/bundles/library.579e6e3fd95b660ad833.css +0 -1
- package/public/charting_library/bundles/library.579e6e3fd95b660ad833.rtl.css +0 -1
- package/public/charting_library/bundles/library.8b0dd8732414a2bcbcb1.js +0 -756
- package/public/charting_library/bundles/line-tools-icons.090f39d92664af3915a5.js +0 -29
- package/public/charting_library/bundles/load-chart-dialog.6cc1a47b17698c0108cb.js +0 -4
- package/public/charting_library/bundles/lollipop-tooltip-renderer.6705b971a2e73c26ecad.js +0 -4
- package/public/charting_library/bundles/lt-pane-views.4d2ee6c5330cd3760eb0.js +0 -102
- package/public/charting_library/bundles/lt-property-pages-with-definitions.a5e8283e77afa66b5636.js +0 -24
- package/public/charting_library/bundles/manage-drawings-dialog.1c0c3737002fa63fe6a6.js +0 -1
- package/public/charting_library/bundles/moment.78e587a83a009ca48cda.js +0 -17
- package/public/charting_library/bundles/new-confirm-inputs-dialog.00d79c2263e005170345.js +0 -2
- package/public/charting_library/bundles/new-edit-object-dialog.0ed1c3834cfc0e834aed.js +0 -19
- package/public/charting_library/bundles/object-tree-dialog.8e2b7eb9ba2f1dbfbc11.js +0 -58
- package/public/charting_library/bundles/react.9f2899b40ad0e104f6c9.js +0 -45
- package/public/charting_library/bundles/redux.43c3f6d214bcf2d1fbd1.js +0 -9
- package/public/charting_library/bundles/restricted-toolset.08fefbae2bc0877b0ef2.js +0 -27
- package/public/charting_library/bundles/runtime.dfe30490f666a6b5d4fe.js +0 -5
- package/public/charting_library/bundles/series-icons-map.ec8043f64d8b06dbce29.js +0 -2
- package/public/charting_library/bundles/series-pane-views.eefe35e1c508ac16c102.js +0 -1
- package/public/charting_library/bundles/share-chart-to-social-utils.c225af2051efd23269e0.js +0 -1
- package/public/charting_library/bundles/show-theme-save-dialog.f81ebf1b2ce08f4399fd.js +0 -1
- package/public/charting_library/bundles/simple-dialog.bd79f02afd512f0f36dd.js +0 -6
- package/public/charting_library/bundles/source-properties-editor.e858d44541ebb6f974a2.js +0 -2
- package/public/charting_library/bundles/study-market.3efd7bf7bc6e6fc7db2d.js +0 -7
- package/public/charting_library/bundles/study-pane-views.9a873dcf74adedf7600b.js +0 -5
- package/public/charting_library/bundles/study-property-pages-with-definitions.ca4fc2ef5a4deff8c0bb.js +0 -4
- package/public/charting_library/bundles/study-template-dialog.fe56a9893a3695e93531.js +0 -11
- package/public/charting_library/bundles/symbol-info-dialog-impl.17daedab6f893acdeae4.js +0 -4
- package/public/charting_library/bundles/symbol-search-dialog.fd3311eee8604f807c80.js +0 -1
- package/public/charting_library/bundles/take-chart-image-impl.c0e6073dcac3041eecf2.js +0 -2
- package/public/charting_library/bundles/vendors.6f5e0d8d267cb3e63ee0.js +0 -42
- package/public/charting_library/charting_library.cjs.js +0 -1
- package/public/charting_library/charting_library.d.ts +0 -2087
- package/public/charting_library/charting_library.esm.js +0 -1
- package/public/charting_library/charting_library.js +0 -1
- package/public/charting_library/charting_library.standalone.js +0 -1
- package/public/charting_library/datafeed-api.d.ts +0 -274
- package/public/charting_library/en-tv-chart.f0bc1e45.html +0 -1
- package/public/charting_library/package.json +0 -8
- package/public/index.html +0 -23
- package/src/App.css +0 -26
- package/src/App.tsx +0 -89
- package/src/charting-library-interfaces.d.ts +0 -36
- package/src/datafeed.ts +0 -289
- package/src/helpers.ts +0 -53
- package/src/index.css +0 -5
- package/src/index.tsx +0 -10
- package/src/main.tsx +0 -151
- package/src/streaming.ts +0 -124
- package/tsconfig.json +0 -97
- package/tsup.config.ts +0 -10
package/src/datafeed.ts
DELETED
|
@@ -1,289 +0,0 @@
|
|
|
1
|
-
import { getAllSymbols, makeApiRequest } from "./helpers";
|
|
2
|
-
import { subscribeOnStream, unsubscribeFromStream } from "./streaming";
|
|
3
|
-
|
|
4
|
-
enum BinanceResolutions {
|
|
5
|
-
one_second = "1s",
|
|
6
|
-
one_minute = "1m",
|
|
7
|
-
three_minute = "3m",
|
|
8
|
-
five_minute = "5m",
|
|
9
|
-
fifteen_minute = "15m",
|
|
10
|
-
thirty_minute = "30m",
|
|
11
|
-
one_hour = "1h",
|
|
12
|
-
two_hour = "2h",
|
|
13
|
-
four_hour = "4h",
|
|
14
|
-
six_hour = "6h",
|
|
15
|
-
eight_hour = "8h",
|
|
16
|
-
twelve_hour = "12h",
|
|
17
|
-
one_day = "1d",
|
|
18
|
-
three_day = "3d",
|
|
19
|
-
one_week = "1w",
|
|
20
|
-
one_month = "1M",
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
interface ConfigurationData {
|
|
24
|
-
supports_marks: boolean;
|
|
25
|
-
supports_timescale_marks: boolean;
|
|
26
|
-
supports_time: boolean;
|
|
27
|
-
supported_resolutions: string[];
|
|
28
|
-
exchanges: { value: string; name: string; desc: string }[];
|
|
29
|
-
symbols_types: { name: string; value: string }[];
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
const getConfigurationData = async (): Promise<ConfigurationData> => {
|
|
33
|
-
return {
|
|
34
|
-
supports_marks: true,
|
|
35
|
-
supports_timescale_marks: true,
|
|
36
|
-
supports_time: true,
|
|
37
|
-
supported_resolutions: [
|
|
38
|
-
"1S",
|
|
39
|
-
"1",
|
|
40
|
-
"3",
|
|
41
|
-
"5",
|
|
42
|
-
"15",
|
|
43
|
-
"30",
|
|
44
|
-
"60",
|
|
45
|
-
"120",
|
|
46
|
-
"240",
|
|
47
|
-
"360",
|
|
48
|
-
"480",
|
|
49
|
-
"720",
|
|
50
|
-
"1D",
|
|
51
|
-
"3D",
|
|
52
|
-
"1W",
|
|
53
|
-
"12M",
|
|
54
|
-
],
|
|
55
|
-
exchanges: [
|
|
56
|
-
{
|
|
57
|
-
value: "Binance",
|
|
58
|
-
name: "Binance",
|
|
59
|
-
desc: "Binance",
|
|
60
|
-
},
|
|
61
|
-
],
|
|
62
|
-
symbols_types: [
|
|
63
|
-
{
|
|
64
|
-
name: "crypto",
|
|
65
|
-
value: "crypto",
|
|
66
|
-
},
|
|
67
|
-
],
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
interface TimescaleMark {
|
|
72
|
-
id: string;
|
|
73
|
-
time: number;
|
|
74
|
-
color: string;
|
|
75
|
-
label: string;
|
|
76
|
-
tooltip: string;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
interface SymbolInfo {
|
|
80
|
-
name: string;
|
|
81
|
-
ticker: string;
|
|
82
|
-
description: string;
|
|
83
|
-
type: string;
|
|
84
|
-
session: string;
|
|
85
|
-
timezone: string;
|
|
86
|
-
exchange: string;
|
|
87
|
-
minmov: number;
|
|
88
|
-
pricescale: number;
|
|
89
|
-
has_daily: boolean;
|
|
90
|
-
has_intraday: boolean;
|
|
91
|
-
has_no_volume: boolean;
|
|
92
|
-
has_seconds: boolean;
|
|
93
|
-
seconds_multipliers: number[];
|
|
94
|
-
volume: string;
|
|
95
|
-
volume_precision: number;
|
|
96
|
-
data_status: string;
|
|
97
|
-
resolution: string;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
interface PeriodParams {
|
|
101
|
-
from: number;
|
|
102
|
-
to: number;
|
|
103
|
-
firstDataRequest: boolean;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
interface Bar {
|
|
107
|
-
time: number;
|
|
108
|
-
low: number;
|
|
109
|
-
high: number;
|
|
110
|
-
open: number;
|
|
111
|
-
close: number;
|
|
112
|
-
volume: number;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
export default class Datafeed {
|
|
116
|
-
private streaming: any;
|
|
117
|
-
private timescaleMarks: TimescaleMark[];
|
|
118
|
-
private interval: string;
|
|
119
|
-
private configurationData: ConfigurationData | null = null;
|
|
120
|
-
|
|
121
|
-
constructor(timescaleMarks: TimescaleMark[] = [], interval: string = "1h") {
|
|
122
|
-
this.streaming = null;
|
|
123
|
-
this.timescaleMarks = timescaleMarks;
|
|
124
|
-
this.interval = interval;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
onReady = async (callback: (data: ConfigurationData) => void): Promise<void> => {
|
|
128
|
-
this.configurationData = await getConfigurationData();
|
|
129
|
-
callback(this.configurationData);
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
searchSymbols = async (
|
|
133
|
-
userInput: string,
|
|
134
|
-
exchange: string,
|
|
135
|
-
symbolType: string,
|
|
136
|
-
onResultReadyCallback: (symbols: any[]) => void
|
|
137
|
-
): Promise<void> => {
|
|
138
|
-
const symbols = await getAllSymbols(userInput);
|
|
139
|
-
onResultReadyCallback(symbols);
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
resolveSymbol = async (
|
|
143
|
-
symbolName: string,
|
|
144
|
-
onSymbolResolvedCallback: (symbolInfo: SymbolInfo) => void,
|
|
145
|
-
onResolveErrorCallback: (error: string) => void
|
|
146
|
-
): Promise<void> => {
|
|
147
|
-
if (!symbolName) {
|
|
148
|
-
await onResolveErrorCallback("cannot resolve symbol");
|
|
149
|
-
return;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
const symbolInfo = async (): Promise<SymbolInfo> => {
|
|
153
|
-
|
|
154
|
-
const symbolData = await makeApiRequest(`api/v3/exchangeInfo?symbol=${symbolName}`);
|
|
155
|
-
const priceScale = symbolData.symbols[0].baseAssetPrecision;
|
|
156
|
-
|
|
157
|
-
console.log("Symbol info:", 1 ** parseFloat(priceScale));
|
|
158
|
-
|
|
159
|
-
return {
|
|
160
|
-
name: symbolName,
|
|
161
|
-
ticker: symbolName,
|
|
162
|
-
description: symbolName,
|
|
163
|
-
type: "crypto",
|
|
164
|
-
session: "24x7",
|
|
165
|
-
timezone: "Etc/UTC",
|
|
166
|
-
exchange: "Binance",
|
|
167
|
-
minmov: 1,
|
|
168
|
-
pricescale: 10 ** parseFloat(priceScale),
|
|
169
|
-
has_daily: true,
|
|
170
|
-
has_intraday: true,
|
|
171
|
-
has_no_volume: false,
|
|
172
|
-
has_seconds: true,
|
|
173
|
-
seconds_multipliers: [1],
|
|
174
|
-
volume: "hundreds",
|
|
175
|
-
volume_precision: 9,
|
|
176
|
-
data_status: "streaming",
|
|
177
|
-
resolution: "1h",
|
|
178
|
-
};
|
|
179
|
-
};
|
|
180
|
-
const symbol = await symbolInfo();
|
|
181
|
-
onSymbolResolvedCallback(symbol);
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
getBars = async (
|
|
185
|
-
symbolInfo: SymbolInfo,
|
|
186
|
-
resolution: string,
|
|
187
|
-
periodParams: PeriodParams,
|
|
188
|
-
onHistoryCallback: (bars: Bar[], meta: { noData: boolean }) => void,
|
|
189
|
-
onErrorCallback: (error: any) => void
|
|
190
|
-
): Promise<void> => {
|
|
191
|
-
const { from, to, firstDataRequest } = periodParams;
|
|
192
|
-
let interval = "60"; // 1 hour
|
|
193
|
-
// Calculate interval using resolution data
|
|
194
|
-
if (!/[a-zA-Z]$/.test(resolution)) {
|
|
195
|
-
if (parseInt(resolution) >= 60) {
|
|
196
|
-
interval = parseInt(resolution) / 60 + "h";
|
|
197
|
-
} else {
|
|
198
|
-
interval = resolution + "m";
|
|
199
|
-
}
|
|
200
|
-
} else {
|
|
201
|
-
interval = resolution.toLowerCase().replace(/[a-z]\b/g, (c) => c.toLowerCase());
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
let urlParameters = {
|
|
205
|
-
symbol: symbolInfo.name,
|
|
206
|
-
interval: interval,
|
|
207
|
-
startTime: Math.abs(from * 1000),
|
|
208
|
-
endTime: Math.abs(to * 1000),
|
|
209
|
-
limit: 600,
|
|
210
|
-
};
|
|
211
|
-
|
|
212
|
-
const query = Object.keys(urlParameters)
|
|
213
|
-
.map((name) => `${name}=${encodeURIComponent(urlParameters[name])}`)
|
|
214
|
-
.join("&");
|
|
215
|
-
|
|
216
|
-
try {
|
|
217
|
-
const data = await makeApiRequest(`api/v3/uiKlines?${query}`);
|
|
218
|
-
if ((data.Response && data.Response === "Error") || data.length === 0) {
|
|
219
|
-
// "noData" should be set if there is no data in the requested period.
|
|
220
|
-
onHistoryCallback([], {
|
|
221
|
-
noData: true,
|
|
222
|
-
});
|
|
223
|
-
return;
|
|
224
|
-
}
|
|
225
|
-
let bars: Bar[] = [];
|
|
226
|
-
data.forEach((bar: any) => {
|
|
227
|
-
if (bar[0] >= from * 1000 && bar[0] < to * 1000) {
|
|
228
|
-
bars = [
|
|
229
|
-
...bars,
|
|
230
|
-
{
|
|
231
|
-
time: bar[0],
|
|
232
|
-
low: bar[3],
|
|
233
|
-
high: bar[2],
|
|
234
|
-
open: bar[1],
|
|
235
|
-
close: bar[4],
|
|
236
|
-
volume: bar[5],
|
|
237
|
-
},
|
|
238
|
-
];
|
|
239
|
-
}
|
|
240
|
-
});
|
|
241
|
-
onHistoryCallback(bars, {
|
|
242
|
-
noData: false,
|
|
243
|
-
});
|
|
244
|
-
} catch (error) {
|
|
245
|
-
console.log("[getBars]: Get error", error);
|
|
246
|
-
onErrorCallback(error);
|
|
247
|
-
}
|
|
248
|
-
};
|
|
249
|
-
|
|
250
|
-
getTimescaleMarks(
|
|
251
|
-
symbolInfo: SymbolInfo,
|
|
252
|
-
from: number,
|
|
253
|
-
to: number,
|
|
254
|
-
onDataCallback: (marks: TimescaleMark[]) => void,
|
|
255
|
-
resolution: string
|
|
256
|
-
): void {
|
|
257
|
-
if (this.timescaleMarks.length > 0) {
|
|
258
|
-
let timescaleMarks = Object.assign([], this.timescaleMarks);
|
|
259
|
-
onDataCallback(timescaleMarks);
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
async getServerTime(onServertimeCallback: (time: number) => void): Promise<void> {
|
|
264
|
-
const data = await makeApiRequest(`api/v3/time`);
|
|
265
|
-
const serverTime = data.serverTime / 1000;
|
|
266
|
-
onServertimeCallback(serverTime);
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
subscribeBars = (
|
|
270
|
-
symbolInfo: SymbolInfo,
|
|
271
|
-
resolution: string,
|
|
272
|
-
onRealtimeCallback: (bar: Bar) => void,
|
|
273
|
-
subscribeUID: string,
|
|
274
|
-
onResetCacheNeededCallback: () => void
|
|
275
|
-
): void => {
|
|
276
|
-
subscribeOnStream(
|
|
277
|
-
symbolInfo,
|
|
278
|
-
resolution,
|
|
279
|
-
onRealtimeCallback,
|
|
280
|
-
subscribeUID,
|
|
281
|
-
onResetCacheNeededCallback,
|
|
282
|
-
this.interval
|
|
283
|
-
);
|
|
284
|
-
};
|
|
285
|
-
|
|
286
|
-
unsubscribeBars = (subscriberUID: string): void => {
|
|
287
|
-
unsubscribeFromStream(subscriberUID);
|
|
288
|
-
};
|
|
289
|
-
}
|
package/src/helpers.ts
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { useEffect, useRef } from "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export async function makeApiRequest(path) {
|
|
5
|
-
try {
|
|
6
|
-
const response = await fetch(`https://api.binance.com/${path}`);
|
|
7
|
-
return response.json();
|
|
8
|
-
} catch (error) {
|
|
9
|
-
throw new Error(`Binance request error: ${error.status}`);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export async function getAllSymbols(symbol) {
|
|
14
|
-
let newSymbols = [];
|
|
15
|
-
try {
|
|
16
|
-
const data = await makeApiRequest(`api/v3/exchangeInfo?symbol=${symbol.toUpperCase()}`);
|
|
17
|
-
data.symbols.forEach(item => {
|
|
18
|
-
if (item.status === "TRADING") {
|
|
19
|
-
newSymbols.push({
|
|
20
|
-
symbol: item.symbol,
|
|
21
|
-
full_name: `${item.baseAsset}/${item.quoteAsset}`,
|
|
22
|
-
description: `Precision: ${item.quoteAssetPrecision}`,
|
|
23
|
-
exchange: "Binance",
|
|
24
|
-
ticker: item.symbol,
|
|
25
|
-
type: "crypto",
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
} catch (e) {
|
|
30
|
-
return newSymbols
|
|
31
|
-
}
|
|
32
|
-
return newSymbols;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export function usePrevious(value) {
|
|
36
|
-
const ref = useRef();
|
|
37
|
-
useEffect(() => {
|
|
38
|
-
ref.current = value;
|
|
39
|
-
});
|
|
40
|
-
return ref.current;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export function roundTime(ts: number): number {
|
|
44
|
-
/**
|
|
45
|
-
* @param ts a JavaScript new Date().getTime() timestamp
|
|
46
|
-
*/
|
|
47
|
-
let time = new Date(ts);
|
|
48
|
-
time.setMinutes(0);
|
|
49
|
-
time.setSeconds(0)
|
|
50
|
-
time.setMilliseconds(0);
|
|
51
|
-
const roundFloor = time.getTime();
|
|
52
|
-
return roundFloor / 1000
|
|
53
|
-
}
|
package/src/index.css
DELETED
package/src/index.tsx
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { createRoot } from "react-dom/client";
|
|
2
|
-
import App from "./App"; // Ensure App is a default export from "./App"
|
|
3
|
-
import "./index.css";
|
|
4
|
-
|
|
5
|
-
const rootElement = document.getElementById("root");
|
|
6
|
-
|
|
7
|
-
if (rootElement) {
|
|
8
|
-
const root = createRoot(rootElement);
|
|
9
|
-
root.render(<App />);
|
|
10
|
-
}
|
package/src/main.tsx
DELETED
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import { FC, useEffect, useRef, useState } from "react";
|
|
2
|
-
import { useImmer } from "use-immer";
|
|
3
|
-
import { type IOrderLine } from "./charting-library-interfaces";
|
|
4
|
-
import {
|
|
5
|
-
ResolutionString,
|
|
6
|
-
widget,
|
|
7
|
-
} from "./charting_library/";
|
|
8
|
-
import Datafeed from "./datafeed";
|
|
9
|
-
|
|
10
|
-
export interface OrderLine extends IOrderLine {
|
|
11
|
-
id: string;
|
|
12
|
-
lineStyle?: number;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
interface TVChartContainerProps {
|
|
16
|
-
symbol?: string;
|
|
17
|
-
interval?: ResolutionString;
|
|
18
|
-
libraryPath?: string;
|
|
19
|
-
timescaleMarks?: any[];
|
|
20
|
-
orderLines?: OrderLine[];
|
|
21
|
-
height?: string;
|
|
22
|
-
onTick?: (event: any) => void;
|
|
23
|
-
getLatestBar?: (data: any) => void;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
const TVChartContainer: FC<TVChartContainerProps> = ({
|
|
27
|
-
symbol = "BTCUSDT",
|
|
28
|
-
interval = "1h" as ResolutionString,
|
|
29
|
-
libraryPath = "/charting_library/",
|
|
30
|
-
timescaleMarks = [],
|
|
31
|
-
orderLines = [],
|
|
32
|
-
height = "calc(100vh - 80px)",
|
|
33
|
-
onTick,
|
|
34
|
-
getLatestBar,
|
|
35
|
-
}) => {
|
|
36
|
-
const containerRef = useRef<HTMLDivElement | null>(null);
|
|
37
|
-
|
|
38
|
-
const [chartOrderLines, setChartOrderLines] = useImmer<any[]>([]);
|
|
39
|
-
const [widgetState, setWidgetState] = useImmer<any>(null);
|
|
40
|
-
const [symbolState] = useState<string | null>(null);
|
|
41
|
-
const prevTimescaleMarks = useRef<any[]>(timescaleMarks);
|
|
42
|
-
|
|
43
|
-
useEffect(() => {
|
|
44
|
-
if (!widgetState) {
|
|
45
|
-
initializeChart(interval);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
if (orderLines && orderLines.length > 0) {
|
|
49
|
-
updateOrderLines(orderLines);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if (widgetState && symbol !== symbolState) {
|
|
53
|
-
widgetState.setSymbol(symbol, interval);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
if (
|
|
57
|
-
widgetState &&
|
|
58
|
-
prevTimescaleMarks.current &&
|
|
59
|
-
timescaleMarks !== prevTimescaleMarks.current
|
|
60
|
-
) {
|
|
61
|
-
widgetState._options.datafeed.timescaleMarks = timescaleMarks;
|
|
62
|
-
prevTimescaleMarks.current = timescaleMarks;
|
|
63
|
-
}
|
|
64
|
-
}, [orderLines, timescaleMarks]);
|
|
65
|
-
|
|
66
|
-
const initializeChart = (interval: ResolutionString) => {
|
|
67
|
-
const widgetOptions: any = {
|
|
68
|
-
symbol: symbol,
|
|
69
|
-
datafeed: new Datafeed(timescaleMarks, interval),
|
|
70
|
-
interval: interval,
|
|
71
|
-
container: containerRef.current,
|
|
72
|
-
library_path: libraryPath,
|
|
73
|
-
locale: "en",
|
|
74
|
-
fullscreen: false,
|
|
75
|
-
autosize: true,
|
|
76
|
-
studies_overrides: {},
|
|
77
|
-
symbol_search_request_delay: 1000,
|
|
78
|
-
overrides: {
|
|
79
|
-
volumePaneSize: "small",
|
|
80
|
-
"mainSeriesProperties.barStyle.dontDrawOpen": false,
|
|
81
|
-
},
|
|
82
|
-
};
|
|
83
|
-
const tvWidget = new widget(widgetOptions);
|
|
84
|
-
|
|
85
|
-
tvWidget.onChartReady(() => {
|
|
86
|
-
tvWidget.subscribe("onTick", (event: any) => onTick && onTick(event));
|
|
87
|
-
setWidgetState(tvWidget);
|
|
88
|
-
|
|
89
|
-
// get latest bar for last price
|
|
90
|
-
const prices = async () => {
|
|
91
|
-
const data = await tvWidget.activeChart().exportData({
|
|
92
|
-
includeTime: false,
|
|
93
|
-
includeSeries: true,
|
|
94
|
-
includedStudies: [],
|
|
95
|
-
});
|
|
96
|
-
getLatestBar && getLatestBar(data.data[data.data.length - 1]);
|
|
97
|
-
};
|
|
98
|
-
prices();
|
|
99
|
-
});
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
const updateOrderLines = (orderLines: OrderLine[]) => {
|
|
103
|
-
if (chartOrderLines && chartOrderLines.length > 0) {
|
|
104
|
-
chartOrderLines.forEach((item) => {
|
|
105
|
-
orderLines.forEach((order) => {
|
|
106
|
-
if (item.id == order.id) {
|
|
107
|
-
item
|
|
108
|
-
.setText(order.text)
|
|
109
|
-
.setTooltip(order.tooltip)
|
|
110
|
-
.setQuantity(order.quantity)
|
|
111
|
-
.setPrice(order.price);
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
});
|
|
115
|
-
} else {
|
|
116
|
-
if (widgetState && orderLines && orderLines.length > 0) {
|
|
117
|
-
orderLines.forEach((order) => {
|
|
118
|
-
const lineStyle = order.lineStyle || 0;
|
|
119
|
-
let chartOrderLine = widgetState
|
|
120
|
-
.chart()
|
|
121
|
-
.createOrderLine()
|
|
122
|
-
.setText(order.text)
|
|
123
|
-
.setTooltip(order.tooltip)
|
|
124
|
-
.setQuantity(order.quantity)
|
|
125
|
-
.setQuantityFont("inherit 14px Arial")
|
|
126
|
-
.setQuantityBackgroundColor(order.color)
|
|
127
|
-
.setQuantityBorderColor(order.color)
|
|
128
|
-
.setLineStyle(lineStyle)
|
|
129
|
-
.setLineLength(25)
|
|
130
|
-
.setLineColor(order.color)
|
|
131
|
-
.setBodyFont("inherit 14px Arial")
|
|
132
|
-
.setBodyBorderColor(order.color)
|
|
133
|
-
.setBodyTextColor(order.color)
|
|
134
|
-
.setPrice(order.price);
|
|
135
|
-
|
|
136
|
-
// set custom id easier search
|
|
137
|
-
chartOrderLine.id = order.id;
|
|
138
|
-
|
|
139
|
-
setChartOrderLines((draft) => {
|
|
140
|
-
draft.push(chartOrderLine);
|
|
141
|
-
return draft;
|
|
142
|
-
});
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
return <div ref={containerRef} style={{ height: height }} />;
|
|
149
|
-
};
|
|
150
|
-
|
|
151
|
-
export default TVChartContainer;
|
package/src/streaming.ts
DELETED
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
const channelToSubscription = new Map();
|
|
2
|
-
|
|
3
|
-
declare global {
|
|
4
|
-
interface Window { socket: WebSocket; }
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
function setupSockets(subRequest) {
|
|
8
|
-
const socket: WebSocket = new WebSocket("wss://stream.binance.com:9443/ws");
|
|
9
|
-
window.socket = socket;
|
|
10
|
-
socket.onopen = (event) => {
|
|
11
|
-
console.log("[socket] Connected");
|
|
12
|
-
socket.send(JSON.stringify(subRequest));
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
socket.onclose = (reason) => {
|
|
16
|
-
console.log("[socket] Disconnected:", reason);
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
socket.onerror = (error) => {
|
|
20
|
-
console.log("[socket] Error:", error);
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
socket.onmessage = (e) => {
|
|
24
|
-
const data = JSON.parse(e.data);
|
|
25
|
-
if (data.e == undefined) {
|
|
26
|
-
// skip all non-TRADE events
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
const {
|
|
30
|
-
s: symbol,
|
|
31
|
-
t: startTime,
|
|
32
|
-
T: closeTime,
|
|
33
|
-
i: interval,
|
|
34
|
-
o: open,
|
|
35
|
-
c: close,
|
|
36
|
-
h: high,
|
|
37
|
-
l: low,
|
|
38
|
-
v: volume,
|
|
39
|
-
n: trades,
|
|
40
|
-
q: quoteVolume,
|
|
41
|
-
} = data.k;
|
|
42
|
-
|
|
43
|
-
const channelString = `${symbol.toLowerCase()}@kline_${interval}`;
|
|
44
|
-
const subscriptionItem = channelToSubscription.get(channelString);
|
|
45
|
-
if (subscriptionItem === undefined) {
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
const bar = {
|
|
49
|
-
time: startTime,
|
|
50
|
-
open: open,
|
|
51
|
-
high: high,
|
|
52
|
-
low: low,
|
|
53
|
-
close: close,
|
|
54
|
-
volume: volume,
|
|
55
|
-
};
|
|
56
|
-
// send data to every subscriber of that symbol
|
|
57
|
-
subscriptionItem.handlers.forEach((handler) => handler.callback(bar));
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export function subscribeOnStream(
|
|
62
|
-
symbolInfo,
|
|
63
|
-
resolution,
|
|
64
|
-
onRealtimeCallback,
|
|
65
|
-
subscribeUID,
|
|
66
|
-
onResetCacheNeededCallback,
|
|
67
|
-
interval
|
|
68
|
-
) {
|
|
69
|
-
const channelString = `${symbolInfo.name.toLowerCase()}@kline_${interval}`;
|
|
70
|
-
const handler = {
|
|
71
|
-
id: subscribeUID,
|
|
72
|
-
callback: onRealtimeCallback,
|
|
73
|
-
};
|
|
74
|
-
let subscriptionItem = channelToSubscription.get(channelString);
|
|
75
|
-
if (subscriptionItem) {
|
|
76
|
-
// already subscribed to the channel, use the existing subscription
|
|
77
|
-
subscriptionItem.handlers.push(handler);
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
subscriptionItem = {
|
|
81
|
-
subscribeUID,
|
|
82
|
-
resolution,
|
|
83
|
-
handlers: [handler],
|
|
84
|
-
};
|
|
85
|
-
const subRequest = {
|
|
86
|
-
method: "SUBSCRIBE",
|
|
87
|
-
params: [channelString],
|
|
88
|
-
id: 1,
|
|
89
|
-
};
|
|
90
|
-
channelToSubscription.set(channelString, subscriptionItem);
|
|
91
|
-
setupSockets(subRequest);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export function unsubscribeFromStream(subscriberUID) {
|
|
95
|
-
// find a subscription with id === subscriberUID
|
|
96
|
-
for (const channelString of channelToSubscription.keys()) {
|
|
97
|
-
const subscriptionItem = channelToSubscription.get(channelString);
|
|
98
|
-
const handlerIndex = subscriptionItem.handlers.findIndex(
|
|
99
|
-
(handler) => handler.id === subscriberUID
|
|
100
|
-
);
|
|
101
|
-
|
|
102
|
-
if (handlerIndex !== -1) {
|
|
103
|
-
// remove from handlers
|
|
104
|
-
subscriptionItem.handlers.splice(handlerIndex, 1);
|
|
105
|
-
|
|
106
|
-
if (subscriptionItem.handlers.length === 0) {
|
|
107
|
-
// unsubscribe from the channel, if it was the last handler
|
|
108
|
-
console.log(
|
|
109
|
-
"[unsubscribeBars]: Unsubscribe from streaming. Channel:",
|
|
110
|
-
channelString
|
|
111
|
-
);
|
|
112
|
-
const subRequest = {
|
|
113
|
-
method: "UNSUBSCRIBE",
|
|
114
|
-
params: [channelString],
|
|
115
|
-
id: 1,
|
|
116
|
-
};
|
|
117
|
-
window.socket.send(JSON.stringify(subRequest));
|
|
118
|
-
channelToSubscription.delete(channelString);
|
|
119
|
-
window.socket = undefined;
|
|
120
|
-
break;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|