question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Candlestick chart won't render candlesticks while loading around 5000 - 10000 candles

See original GitHub issue

Lightweight 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: image

CodeSandbox/JSFiddle/etc link: https://jsfiddle.net/markverkiel/j3syf4dr/4/

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
timocovcommented, Sep 7, 2020

Since this is currently breaking the chart, maybe it’s an idea to cancel the rendering and throw an error for duplicate time entries? Or throw a warning indicating that the data consist duplicate entries.

See #315

1reaction
matortheeternalcommented, Sep 4, 2020

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:

["1593663300", "1593664200", "1593665100", "1593666000", "1593666900", "1593667800", "1593668700", "1593669600", "1593670500", "1593671400", "1593672300", "1593673200", "1593674100", "1593675000"]

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)

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found