Candlestick chart won't render candlesticks while loading around 5000 - 10000 candles
See original GitHub issueLightweight Charts Version: 3.1.5
Steps/code to reproduce:
Easiest way to reproduce is to call candleStickSeries.setData([candles])
with 5000 - 10000 candles.
I used the example from JSFiddle as base to reproduce this problem, making sure this isn’t a config problem on my end.
Actual behavior:
Chart starts spamming "Value is null"
errors in the developer console and won’t render the candlesticks.
Expected behavior: Longer wait time since the chart is loading a large amount of data, but render all the candlesticks.
Screenshots:
CodeSandbox/JSFiddle/etc link: https://jsfiddle.net/markverkiel/j3syf4dr/4/
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Candlestick Patterns DONT Work : 3 Reason Why - YouTube
Here are my top 3 reasons candlestick patterns don't work. Stick around for reason number 3 because it will blow your mind.And when...
Read more >Reading and Using Your Candlestick Chart to Make Decisions ...
Candlestick charts are primarily for short-term trading decisions; longer-term traders or investors tend to use candlestick charts to pick entry and exit ...
Read more >Understanding a Candlestick Chart - Investopedia
Key Takeaways. Candlestick charts are used by traders to determine possible price movement based on past patterns. Candlesticks are useful when trading as...
Read more >How to Read a Candlestick Chart - DailyFX
Learn how to read and interpret candlestick charts for day trading. Our guide explores top candlestick chart analysis strategies and tips.
Read more >Weekly data not displaying correctly in amCharts candlestick ...
When I have setting: dateAxis.skipEmptyPeriods = true many of the candles disappear. For example, the first candle is 2019-12-30, the next ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
See #315
I added some code to your fiddle to check if you had duplicate times in your data, and you do. The following times were duplicated:
Also your times aren’t integers, which is kind of weird, you should use Math.round to make them into whole numbers instead of floating point.
If you got your data via multiple requests you should make sure you don’t have overlap. You can sort, filter, and clean up your data for the time being if you don’t want to bother with re-fetching it. (if the data is sorted you only need to check if the previous item has the same time)