Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library adds decimal values to timestamp? #82

Open
BranislavBrnjos opened this issue Jun 10, 2022 · 0 comments
Open

Library adds decimal values to timestamp? #82

BranislavBrnjos opened this issue Jun 10, 2022 · 0 comments

Comments

@BranislavBrnjos
Copy link

BranislavBrnjos commented Jun 10, 2022

DATA:

[{"x": 76320.535807, "y": 1654259419717}, {"x": 75703.132447, "y": 1654261220623}, {"x": 75926.207895, "y": 1654263018920}, {"x": 76242.632317, "y": 1654264819540}, {"x": 75897.787162, "y": 1654266616073}, {"x": 75627.517177, "y": 1654268419753}, {"x": 75589.605532, "y": 1654270218223}, {"x": 75683.344545, "y": 1654272016513}, {"x": 75568.56951, "y": 1654273817187}, {"x": 75785.768392, "y": 1654275619710}, {"x": 75727.548795, "y": 1654277418823}, {"x": 75695.513715, "y": 1654279217280}, {"x": 75816.711367, "y": 1654281015130}, {"x": 75811.146832, "y": 1654282821983}, {"x": 75817.387432, "y": 1654284616247}, {"x": 75883.589797, "y": 1654286419243}, {"x": 76008.193777, "y": 1654288216403}, {"x": 76107.081285, "y": 1654290014423}, {"x": 76308.28863, "y": 1654291814507}, {"x": 76463.965597, "y": 1654293613723}, {"x": 76528.139767, "y": 1654295417683}, {"x": 76259.92398, "y": 1654297215063}, {"x": 76158.280207, "y": 1654299017323}, {"x": 76203.888592, "y": 1654300817050}, {"x": 76326.958425, "y": 1654302614843}, {"x": 76242.476302, "y": 1654304419640}, {"x": 75876.465112, "y": 1654306214027}, {"x": 75915.44286, "y": 1654308013643}, {"x": 75685.606762, "y": 1654309815197}, {"x": 75858.13335, "y": 1654311619907}, {"x": 75957.436897, "y": 1654313413887}, {"x": 75826.462305, "y": 1654315214460}, {"x": 76097.720385, "y": 1654317018337}, {"x": 76237.45782, "y": 1654318818500}, {"x": 76148.399257, "y": 1654320614817}, {"x": 76123.852897, "y": 1654322426997}, {"x": 76172.789602, "y": 1654324223320}, {"x": 76174.037722, "y": 1654326015043}, {"x": 76105.703152, "y": 1654327818533}, {"x": 76199.468167, "y": 1654329617150}, {"x": 76280.986005, "y": 1654331417167}, {"x": 76321.991947, "y": 1654333216107}, {"x": 76289.488822, "y": 1654335017097}, {"x": 76249.41897, "y": 1654336817077}, {"x": 76296.665512, "y": 1654338618320}, {"x": 76269.102862, "y": 1654340418323}, {"x": 76199.49417, "y": 1654342220163}, {"x": 76136.334097, "y": 1654344019213}, {"x": 75937.935022, "y": 1654345817257}, {"x": 75779.059747, "y": 1654347617590}, {"x": 75982.503307, "y": 1654349414360}, {"x": 75929.328195, "y": 1654351218977}, {"x": 76312.215007, "y": 1654353014417}, {"x": 76402.989735, "y": 1654354816403}, {"x": 76646.347132, "y": 1654356617087}, {"x": 76614.026025, "y": 1654358417363}, {"x": 76418.64324, "y": 1654360219010}, {"x": 76356.159232, "y": 1654362016253}, {"x": 76095.926212, "y": 1654363819617}, {"x": 76236.183697, "y": 1654365616853}, {"x": 76336.137307, "y": 1654367416780}, {"x": 76398.88134, "y": 1654369215837}, {"x": 76241.82624, "y": 1654371017280}, {"x": 76082.144887, "y": 1654372823147}, {"x": 76279.139827, "y": 1654374615313}, {"x": 76360.423642, "y": 1654376418090}, {"x": 76396.437105, "y": 1654378217733}, {"x": 76561.65699, "y": 1654380016020}, {"x": 76618.86249, "y": 1654381816333}, {"x": 76451.848432, "y": 1654383616667}, {"x": 76412.61066, "y": 1654385413827}, {"x": 76631.057662, "y": 1654387215097}, {"x": 76665.04293, "y": 1654389016027}, {"x": 76327.192447, "y": 1654390813990}, {"x": 76277.137635, "y": 1654392619987}, {"x": 76194.735712, "y": 1654394422580}, {"x": 76457.933017, "y": 1654396216477}, {"x": 76461.235335, "y": 1654398017307}, {"x": 76465.86378, "y": 1654399815103}, {"x": 76372.540807, "y": 1654401619133}, {"x": 76261.640145, "y": 1654403418763}, {"x": 76299.109747, "y": 1654405218017}, {"x": 76483.23345, "y": 1654407018983}, {"x": 76452.810525, "y": 1654408820427}, {"x": 76386.270127, "y": 1654410614437}, {"x": 76284.236317, "y": 1654412418077}, {"x": 76475.770732, "y": 1654414221087}, {"x": 76092.077842, "y": 1654416023907}, {"x": 76217.747925, "y": 1654417820700}, {"x": 76206.332827, "y": 1654419617690}, {"x": 76003.695345, "y": 1654421419813}, {"x": 76055.492325, "y": 1654423216390}, {"x": 76154.379832, "y": 1654425015913}, {"x": 76070.31375, "y": 1654426818653}, {"x": 76057.41651, "y": 1654428621533}, {"x": 76258.181812, "y": 1654430418647}, {"x": 76399.869435, "y": 1654432214210}, {"x": 76260.678052, "y": 1654434018910}, {"x": 76220.81622, "y": 1654435816580}, {"x": 76082.638935, "y": 1654437619550}, {"x": 76357.667377, "y": 1654439414703}, {"x": 76507.597792, "y": 1654441217777}, {"x": 76550.293897, "y": 1654443016573}, {"x": 76882.83987, "y": 1654444814363}, {"x": 76591.533862, "y": 1654446615170}, {"x": 76626.013177, "y": 1654448417187}, {"x": 77092.784055, "y": 1654450219883}, {"x": 77044.029367, "y": 1654452017710}, {"x": 77126.43129, "y": 1654453815093}, {"x": 76981.54536, "y": 1654455614727}, {"x": 76942.281585, "y": 1654457422447}, {"x": 77130.825712, "y": 1654459218350}, {"x": 77170.167495, "y": 1654461016820}, {"x": 76850.050717, "y": 1654462820783}, {"x": 76625.987175, "y": 1654464619483}, {"x": 76881.435735, "y": 1654466419063}, {"x": 76861.465815, "y": 1654468220853}, {"x": 77022.681315, "y": 1654470019707}, {"x": 76793.859315, "y": 1654471824900}, {"x": 76765.6206, "y": 1654473618997}, {"x": 76956.114915, "y": 1654475418610}, {"x": 77765.130697, "y": 1654477220970}, {"x": 78488.468242, "y": 1654479017687}, {"x": 79101.16515, "y": 1654480819267}, {"x": 79501.057597, "y": 1654482614767}, {"x": 79358.17386, "y": 1654484416843}, {"x": 79739.552527, "y": 1654486215067}, {"x": 80179.54083, "y": 1654488021820}, {"x": 80211.237877, "y": 1654489815937}, {"x": 80111.908327, "y": 1654491614270}, {"x": 80135.674612, "y": 1654493414420}, {"x": 80003.841937, "y": 1654495225497}, {"x": 80108.502, "y": 1654497015527}, {"x": 80258.666437, "y": 1654498817283}, {"x": 80383.738462, "y": 1654500616040}, {"x": 80305.886977, "y": 1654502422023}, {"x": 80693.55825, "y": 1654504216807}, {"x": 80860.728322, "y": 1654506018157}, {"x": 80614.146615, "y": 1654507814177}, {"x": 80744.83518, "y": 1654509614723}, {"x": 80647.039777, "y": 1654511416820}, {"x": 80788.7274, "y": 1654513216227}, {"x": 80543.67984, "y": 1654515015320}, {"x": 111546.221727, "y": 1654516815470}, {"x": 116387.945662, "y": 1654518614717}, {"x": 116355.583683, "y": 1654520417980}, {"x": 116600.325848, "y": 1654522212897}, {"x": 116474.895019, "y": 1654524019470}, {"x": 117520.389698, "y": 1654525821520}, {"x": 116714.005749, "y": 1654527618587}, {"x": 115795.293443, "y": 1654529418080}, {"x": 116858.358199, "y": 1654531218260}, {"x": 115890.126808, "y": 1654533016820}, {"x": 115977.564222, "y": 1654534823363}, {"x": 115722.009702, "y": 1654536621160}, {"x": 116128.411595, "y": 1654538420507}, {"x": 116007.110485, "y": 1654540215363}, {"x": 116164.753122, "y": 1654542017640}, {"x": 115911.751519, "y": 1654543818000}, {"x": 116579.714796, "y": 1654545627110}, {"x": 116405.478197, "y": 1654547422700}, {"x": 116534.775944, "y": 1654549218303}, {"x": 116746.818243, "y": 1654551024327}, {"x": 116691.142123, "y": 1654552819440}, {"x": 116464.195292, "y": 1654554618927}, {"x": 116337.150119, "y": 1654556418070}, {"x": 116172.712217, "y": 1654558216573}, {"x": 116226.849078, "y": 1654560021150}, {"x": 113931.213372, "y": 1654561821440}, {"x": 111850.623397, "y": 1654563617207}, {"x": 110788.271956, "y": 1654565421200}, {"x": 109545.52688, "y": 1654567218750}, {"x": 108508.929868, "y": 1654569016670}, {"x": 108897.536426, "y": 1654570816733}, {"x": 109584.909382, "y": 1654572617297}, {"x": 109623.20314, "y": 1654574417673}, {"x": 109650.759629, "y": 1654576216430}, {"x": 109448.741284, "y": 1654578015977}, {"x": 109152.039745, "y": 1654579814773}, {"x": 109299.808599, "y": 1654581630830}, {"x": 109282.426237, "y": 1654583414953}, {"x": 109419.007307, "y": 1654585219847}, {"x": 109523.038683, "y": 1654587014603}, {"x": 109621.438624, "y": 1654588815503}, {"x": 109790.71956, "y": 1654590616787}, {"x": 109869.109135, "y": 1654592430607}, {"x": 109604.581862, "y": 1654594220043}, {"x": 109565.537246, "y": 1654596016297}, {"x": 109634.541096, "y": 1654597813270}, {"x": 109681.319549, "y": 1654599619163}, {"x": 109972.652469, "y": 1654600519817}, {"x": 110294.050005, "y": 1654601416337}, {"x": 110235.917254, "y": 1654603222107}, {"x": 109938.740637, "y": 1654605016710}, {"x": 110783.195537, "y": 1654605164537}, {"x": 111028.086376, "y": 1654606826347}, {"x": 111209.65675, "y": 1654608620500}, {"x": 111262.24486, "y": 1654610420980}, {"x": 111746.831976, "y": 1654612215147}, {"x": 111792.03502, "y": 1654612307063}, {"x": 112585.031994, "y": 1654614018427}, {"x": 112209.187946, "y": 1654615818920}, {"x": 112540.948675, "y": 1654617617677}, {"x": 112254.649814, "y": 1654619415633}, {"x": 112622.804852, "y": 1654621219467}, {"x": 112699.072913, "y": 1654623015643}, {"x": 112706.733607, "y": 1654624817467}, {"x": 113718.285782, "y": 1654626621510}, {"x": 113671.95088, "y": 1654628416497}, {"x": 114482.170327, "y": 1654630219760}, {"x": 116903.171409, "y": 1654632021843}, {"x": 118001.828735, "y": 1654633822310}, {"x": 117985.391061, "y": 1654635618487}, {"x": 117759.494345, "y": 1654637415557}, {"x": 118161.667708, "y": 1654639219497}, {"x": 118063.205755, "y": 1654641015503}, {"x": 117745.929545, "y": 1654642816220}, {"x": 117172.774164, "y": 1654644618517}, {"x": 117118.066008, "y": 1654646416897}, {"x": 117696.905628, "y": 1654648217987}, {"x": 116973.16637, "y": 1654650015797}, {"x": 117001.793041, "y": 1654651817383}, {"x": 117072.079118, "y": 1654653614550}, {"x": 116990.093818, "y": 1654655420190}, {"x": 116584.286857, "y": 1654657214390}, {"x": 113671.555994, "y": 1654659015810}, {"x": 112951.454135, "y": 1654660816560}, {"x": 114048.457459, "y": 1654662618270}, {"x": 113794.238456, "y": 1654664416670}, {"x": 113874.766888, "y": 1654666219640}, {"x": 114882.632199, "y": 1654666265577}, {"x": 115782.790301, "y": 1654666303690}, {"x": 116749.493925, "y": 1654668026277}, {"x": 116227.952956, "y": 1654669818037}, {"x": 116666.113619, "y": 1654671624187}, {"x": 116139.22523, "y": 1654673415610}, {"x": 116824.366808, "y": 1654675219993}, {"x": 116632.397331, "y": 1654677017833}, {"x": 116526.240809, "y": 1654678819110}, {"x": 116367.894011, "y": 1654680618660}, {"x": 116637.708135, "y": 1654682424023}, {"x": 116280.036042, "y": 1654684219983}, {"x": 116153.9511, "y": 1654686017807}, {"x": 116255.320581, "y": 1654687817343}, {"x": 116327.27052, "y": 1654689624377}, {"x": 115440.893548, "y": 1654691420383}, {"x": 115187.406399, "y": 1654693221167}, {"x": 116056.340244, "y": 1654695021547}, {"x": 117616.607486, "y": 1654696819103}, {"x": 116592.775344, "y": 1654698616390}, {"x": 116226.946699, "y": 1654700419043}, {"x": 116527.180916, "y": 1654702215227}, {"x": 116465.831379, "y": 1654704026990}, {"x": 116290.328021, "y": 1654705824513}, {"x": 115890.177365, "y": 1654707618027}, {"x": 116158.344987, "y": 1654709418337}, {"x": 116110.751961, "y": 1654711218623}, {"x": 115416.99607, "y": 1654713022057}, {"x": 115547.484526, "y": 1654714815703}, {"x": 115567.321594, "y": 1654716619767}, {"x": 115193.070524, "y": 1654718423533}, {"x": 115414.339419, "y": 1654720220567}, {"x": 115453.607092, "y": 1654722019510}, {"x": 115834.173589, "y": 1654723816490}, {"x": 116275.912861, "y": 1654725619883}, {"x": 115920.59631, "y": 1654727418063}, {"x": 115834.486077, "y": 1654729218763}, {"x": 115700.838648, "y": 1654731013043}, {"x": 115439.932302, "y": 1654732819710}, {"x": 115151.061896, "y": 1654734617467}, {"x": 115533.38741, "y": 1654736417393}, {"x": 115699.556988, "y": 1654738223773}, {"x": 115020.787115, "y": 1654740014207}, {"x": 115355.236203, "y": 1654741817867}, {"x": 115427.33404, "y": 1654743613353}, {"x": 115642.561218, "y": 1654745414503}, {"x": 115786.721538, "y": 1654747216823}, {"x": 115737.64937, "y": 1654749018507}, {"x": 115689.097115, "y": 1654750816253}, {"x": 116117.116588, "y": 1654752619447}, {"x": 115920.102918, "y": 1654754424110}, {"x": 115870.009235, "y": 1654756213290}, {"x": 115967.99306, "y": 1654758017120}, {"x": 116243.424852, "y": 1654759814783}, {"x": 116515.016916, "y": 1654761621583}, {"x": 116329.642862, "y": 1654763417343}, {"x": 116651.813173, "y": 1654765220083}, {"x": 116926.562396, "y": 1654767019093}, {"x": 116766.966898, "y": 1654768816683}, {"x": 116287.080484, "y": 1654772421690}, {"x": 116236.097153, "y": 1654774216423}, {"x": 115805.352835, "y": 1654776026180}, {"x": 115509.100645, "y": 1654777814840}, {"x": 115069.857949, "y": 1654779614873}, {"x": 115222.128928, "y": 1654781419043}, {"x": 115262.683036, "y": 1654783221433}, {"x": 115617.983163, "y": 1654785018490}, {"x": 115074.077733, "y": 1654786821440}, {"x": 115176.543274, "y": 1654788615417}, {"x": 115821.849537, "y": 1654790422903}, {"x": 115484.516993, "y": 1654792218127}, {"x": 116018.476406, "y": 1654794018657}, {"x": 115635.143775, "y": 1654795822097}, {"x": 115883.099266, "y": 1654797617803}, {"x": 115562.062395, "y": 1654799418643}, {"x": 115209.700311, "y": 1654801218427}, {"x": 115008.460721, "y": 1654803017703}, {"x": 114661.952607, "y": 1654804816997}, {"x": 115117.33752, "y": 1654806616070}, {"x": 115337.984167, "y": 1654808414970}, {"x": 115327.463267, "y": 1654810216160}, {"x": 115186.296308, "y": 1654812021910}, {"x": 114995.255111, "y": 1654813815843}, {"x": 114855.894232, "y": 1654815620310}, {"x": 114950.406856, "y": 1654817419870}, {"x": 115046.400276, "y": 1654819216953}, {"x": 113939.050131, "y": 1654821018513}, {"x": 113817.335103, "y": 1654822818343}, {"x": 114537.446956, "y": 1654824615723}, {"x": 114284.037946, "y": 1654826420157}, {"x": 114703.825019, "y": 1654828218773}, {"x": 114733.579252, "y": 1654830016443}, {"x": 115494.69529, "y": 1654831821240}, {"x": 115103.80796, "y": 1654833615617}, {"x": 114941.953998, "y": 1654835418747}, {"x": 115012.757913, "y": 1654837218010}, {"x": 115263.431652, "y": 1654839016723}, {"x": 115080.120362, "y": 1654840821727}, {"x": 115211.437479, "y": 1654842617847}, {"x": 115023.050018, "y": 1654844419050}, {"x": 114995.260544, "y": 1654846217250}, {"x": 114871.302633, "y": 1654848022260}, {"x": 114757.578072, "y": 1654849817023}, {"x": 114733.318339, "y": 1654851622823}, {"x": 114790.475254, "y": 1654853416537}, {"x": 114188.058158, "y": 1654855223647}, {"x": 114512.657254, "y": 1654857019707}, {"x": 114596.158573, "y": 1654858818690}, {"x": 114535.341779, "y": 1654860616023}, {"x": 114698.067616, "y": 1654862421497}]

How do I stop the library from adding decimal numbers to my Y values? My Y values are Timestamps and i would love for them to stay as they are, and the library keeps adding some random decimals to the TimeStamps...

How do I prevent the Library from adding those decimals, and showing all data on the Y as it is?

I have tried adding the Range as Length, but I had no luck.

const points = monotoneCubicInterpolation({ data: chartData, range: chartData.length - 1 })

<ChartPathProvider data={{ points, smoothingStrat <img width="298" alt="Screen Shot 2022-06-10 at 2 32 15 PM" src="https://user-images.githubusercontent.com/51318860/173064810-4a1863e6-e6dc-401a-a817-01149f2b6ac3.png"> egy: 'bezier' }}>

You can see the timestamp value on the right upper corner beneath the price.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant