apexcharts / apexcharts.js

📊 Interactive JavaScript Charts built on SVG
https://apexcharts.com
MIT License
14.26k stars 1.29k forks source link

How can I work with small values on Y-axis, like 0.00001500 #426

Closed molotoksoftware closed 5 years ago

molotoksoftware commented 5 years ago

Hello friends

I have got some problem with the charts.

Data array: [[1553258700000,["0.00376920","0.00377250","0.00376560","0.00377210"]],[1553259000000,["0.00377210","0.00378620","0.00377180","0.00378140"]],[1553259300000,["0.00378140","0.00378260","0.00377190","0.00378020"]],[1553259600000,["0.00378020","0.00378660","0.00377520","0.00378520"]],[1553259900000,["0.00378500","0.00379520","0.00378290","0.00379490"]],[1553260200000,["0.00379490","0.00379760","0.00377910","0.00378170"]],[1553260500000,["0.00377980","0.00378630","0.00377690","0.00378250"]],[1553260800000,["0.00378260","0.00378450","0.00377110","0.00377970"]],[1553261100000,["0.00377900","0.00379910","0.00377900","0.00379900"]],[1553261400000,["0.00379900","0.00379920","0.00378880","0.00379600"]],[1553261700000,["0.00379590","0.00379680","0.00379080","0.00379340"]],[1553262000000,["0.00379340","0.00380000","0.00379200","0.00379600"]],[1553262300000,["0.00379690","0.00380090","0.00379270","0.00379980"]],[1553262600000,["0.00379900","0.00380240","0.00379200","0.00379210"]],[1553262900000,["0.00379210","0.00379390","0.00375610","0.00376010"]]]

You can see that very small values!

And it looks like this https://i.imgur.com/Qb5iI3I.png

I have tried to change a lot of options. The last one: max: 0.0001 forceNiceScale: true tickAmount: 8 decimalsInFloat: 8

Could somebody help me?

junedchhipa commented 5 years ago

Those are really small values which I didn’t tested for. I will take a closer look tomorrow ans update this thread.

molotoksoftware commented 5 years ago

@junedchhipa Thanks

These are usual values for cryptocurrency. This feature will allow to create charts for cryptocurrency courses.

molotoksoftware commented 5 years ago

Thanks a lot.

But I've found a new problem.

Sometimes a candle goes outside the area.

image

Try this data

[[1553250600000,[0.20419999999999999,0.2051,0.20399999999999999,0.2041]],[1553252400000,[0.2041,0.20419999999999999,0.20349999999999999,0.2039]],[1553254200000,[0.2039,0.20419999999999999,0.20330000000000001,0.20399999999999999]],[1553256000000,[0.2041,0.20549999999999999,0.20349999999999999,0.20480000000000001]],[1553257800000,[0.20469999999999999,0.20519999999999999,0.2031,0.20430000000000001]],[1553259600000,[0.20430000000000001,0.20569999999999999,0.2039,0.20469999999999999]],[1553261400000,[0.2046,0.20530000000000001,0.20369999999999999,0.20369999999999999]],[1553263200000,[0.20369999999999999,0.2049,0.20230000000000001,0.2044]],[1553265000000,[0.2044,0.20549999999999999,0.2039,0.2051]],[1553266800000,[0.20499999999999999,0.20699999999999999,0.20469999999999999,0.20680000000000001]],[1553268600000,[0.20680000000000001,0.20730000000000001,0.2059,0.20710000000000001]],[1553270400000,[0.20710000000000001,0.20860000000000001,0.2056,0.20699999999999999]],[1553272200000,[0.20699999999999999,0.2072,0.20630000000000001,0.20699999999999999]],[1553274000000,[0.2069,0.20830000000000001,0.20660000000000001,0.20780000000000001]],[1553275800000,[0.20780000000000001,0.20830000000000001,0.2069,0.2072]],[1553277600000,[0.2072,0.2074,0.20660000000000001,0.2069]],[1553279400000,[0.20699999999999999,0.20710000000000001,0.20619999999999999,0.20619999999999999]],[1553281200000,[0.20630000000000001,0.2072,0.20580000000000001,0.20649999999999999]],[1553283000000,[0.20660000000000001,0.20699999999999999,0.20549999999999999,0.20630000000000001]],[1553284800000,[0.20619999999999999,0.20669999999999999,0.20569999999999999,0.20660000000000001]],[1553286600000,[0.2064,0.2074,0.20599999999999999,0.20699999999999999]],[1553288400000,[0.20699999999999999,0.20799999999999999,0.20649999999999999,0.2072]],[1553290200000,[0.20699999999999999,0.20730000000000001,0.20599999999999999,0.20630000000000001]],[1553292000000,[0.20630000000000001,0.2069,0.2054,0.2059]],[1553293800000,[0.2059,0.20619999999999999,0.20519999999999999,0.20599999999999999]],[1553295600000,[0.20610000000000001,0.20630000000000001,0.20530000000000001,0.20549999999999999]],[1553297400000,[0.2054,0.2064,0.2054,0.2054]],[1553299200000,[0.2054,0.2059,0.2026,0.20280000000000001]],[1553301000000,[0.20280000000000001,0.2039,0.20250000000000001,0.20349999999999999]],[1553302800000,[0.2036,0.20399999999999999,0.20300000000000001,0.20349999999999999]],[1553304600000,[0.20369999999999999,0.20530000000000001,0.20349999999999999,0.20469999999999999]],[1553306400000,[0.20480000000000001,0.20519999999999999,0.20399999999999999,0.20499999999999999]],[1553308200000,[0.20519999999999999,0.20530000000000001,0.2031,0.2034]],[1553310000000,[0.2034,0.20369999999999999,0.19589999999999999,0.19989999999999999]],[1553311800000,[0.1996,0.20119999999999999,0.19839999999999999,0.20080000000000001]],[1553313600000,[0.20080000000000001,0.20200000000000001,0.19980000000000001,0.20080000000000001]],[1553315400000,[0.20100000000000001,0.20150000000000001,0.19939999999999999,0.2001]],[1553317200000,[0.20019999999999999,0.20130000000000001,0.19989999999999999,0.20119999999999999]],[1553319000000,[0.20119999999999999,0.20280000000000001,0.2011,0.20230000000000001]],[1553320800000,[0.20219999999999999,0.2024,0.19969999999999999,0.2011]],[1553322600000,[0.2011,0.20300000000000001,0.20080000000000001,0.2024]],[1553324400000,[0.2024,0.2026,0.2011,0.2016]],[1553326200000,[0.2019,0.20280000000000001,0.2016,0.2026]],[1553328000000,[0.2026,0.20300000000000001,0.20219999999999999,0.2024]],[1553329800000,[0.2024,0.2026,0.2019,0.20250000000000001]],[1553331600000,[0.20250000000000001,0.2026,0.2016,0.2016]],[1553333400000,[0.2016,0.20200000000000001,0.2014,0.2019]],[1553335200000,[0.2019,0.20200000000000001,0.19850000000000001,0.20069999999999999]],[1553337000000,[0.2006,0.2014,0.20000000000000001,0.20130000000000001]],[1553338800000,[0.20130000000000001,0.20130000000000001,0.2011,0.20130000000000001]]]

uranum commented 5 years ago

the same problem on other graph Area Charts > Datetime X-Axis

my data: [[1551225600000,2.9e-7],[1551312000000,2.9e-7],[1551398400000,2.8e-7],[1551484800000,3e-7],[1551571200000,2.8e-7],[1551657600000,2.7e-7],[1551744000000,2.8e-7],[1551830400000,2.7e-7],[1551916800000,2.7e-7],[1552003200000,2.7e-7],[1552089600000,2.8e-7],[1552176000000,2.9e-7],[1552262400000,2.7e-7],[1552348800000,2.7e-7],[1552435200000,2.8e-7],[1552521600000,2.8e-7],[1552608000000,3e-7],[1552694400000,3.1e-7],[1552780800000,2.9e-7],[1552867200000,2.9e-7],[1552953600000,2.9e-7],[1553040000000,3.1e-7],[1553126400000,3e-7],[1553212800000,3e-7],[1553299200000,2.9e-7],[1553385600000,2.9e-7],[1553472000000,2.8e-7],[1553558400000,2.8e-7],[1553644800000,2.8e-7],[1553731200000,2.9e-7],[1553817600000,2.8e-7],[1553904000000,2.9e-7],[1553990400000,2.8e-7],[1554076800000,2.8e-7],[1554163200000,2.5e-7],[1554249600000,2.5e-7],[1554336000000,2.6e-7],[1554422400000,2.7e-7],[1554508800000,2.6e-7],[1554595200000,2.5e-7],[1554681600000,2.5e-7],[1554768000000,2.6e-7],[1554854400000,2.4e-7],[1554940800000,2.5e-7],[1555027200000,2.4e-7],[1555113600000,2.5e-7],[1555200000000,2.5e-7],[1555286400000,2.5e-7],[1555372800000,2.6e-7],[1555459200000,2.9e-7],[1555545600000,2.8e-7],[1555632000000,2.6e-7],[1555718400000,2.8e-7],[1555804800000,2.7e-7],[1555891200000,2.6e-7],[1555977600000,2.4e-7],[1556064000000,2.3e-7],[1556150400000,2.3e-7],[1556236800000,2.4e-7],[1556323200000,2.4e-7]]