You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are duplicates data in my array (see last index of array on time 1595635200) that cause error on my candlestick.setData. If the duplicate data removed it will not throw any error. However If I reduced the data size to smaller amount, it still work even there are duplicates in data
Yeah, duplicated data isn't allowed and might cause any kind of "strange" effects like this. We'll warn about that in #315.
However If I reduced the data size to smaller amount, it still work even there are duplicates in data
I didn't dig enough into this, but just guess that possible reason could be https://github.com/tradingview/lightweight-charts/blob/master/src/model/plot-list.ts - PlotList is something like "store" for series' data with some helpers like search or minMaxOnRange. To improve perf here we use "smart" cache, which is basically chunk-based cache, where all data is split by 30 items per chunk. Maybe "the issue" is somewhere there. Or, it's possible, a cache-issue somewhere else... I don't think that we need to spend a lot of time to debug it actually, because I'd say we should restrict data to don't have data with the same time.
Lightweight Charts Version: standalone master branch build
Steps/code to reproduce:
There are duplicates data in my array (see last index of array on time 1595635200) that cause error on my candlestick.setData. If the duplicate data removed it will not throw any error. However If I reduced the data size to smaller amount, it still work even there are duplicates in data
Actual behavior:
Chart broken, throws error on screenshot below
Expected behavior:
Chart not broken
Screenshots:
CodeSandbox/JSFiddle/etc link:
This worked fine somehow
The text was updated successfully, but these errors were encountered: