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 series does not update properly when resetting data

See original GitHub issue

Lightweight Charts Version: 1.2.1

Note: I saw this issue when updating from 1.1.0 to 1.2.1. I have reverted back to 1.1.0 to verify and could confirm it does not happen. I think that it’s a possible bug introduced in 1.2.1.

Steps/code to reproduce: Context: I have a button that lets the user switch timeframe for a given market.

Programmatically, the only thing I do is to call the candlestickSeries.setData(selectedTimeframeData).

The issue happens after I set the data.

Actual behavior: The chart looks fine when I set the data for the first time:

First set of data for candlestick series

Screen Shot 2020-01-10 at 12 35 28

After setting new data in the serie (another timeframe)

I can scroll the chart horizontally and I have wrong candles painted in the “future”.

You can see on the half right of the chart, all these “weird candles” that should not be there. Note that also there is no date / time on the time axis for these.

Screen Shot 2020-01-10 at 12 35 48

Expected behavior:

These unexpected candles, on the right, should not be there.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
AoDevcommented, Feb 21, 2020

Hello @timocov . Sorry, had been completely absorbed by my work. I’ll do something this week-end.

1reaction
AoDevcommented, Jan 14, 2020

Will do as soon as I can.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Updating lightweight-charts candlestick series results in ...
When running update on candlestick series I'm getting Uncaught TypeError: Cannot read properties of undefined (reading 'year') . Data is ...
Read more >
Candlestick chart for stock data analysis in Power BI Desktop
In this article we will explore Candlestick chart for stock data analysis in Power BI Desktop.
Read more >
How To Create a Candlestick Chart in Grafana - YouTube
In this tutorial, you'll learn what candlesticks are and how to use them in Grafana, using TimescaleDB and PostgreSQL. You'll find a handful ......
Read more >
Binance API Tutorial (Part 8) - Real-Time Candlestick Charts ...
Once the initial chart is rendered, we dynamically update the last ... and add new candlesticks to the chart using real-time websocket data....
Read more >
Create a Candlestick Stock Chart (Open-High-Low-Close) in ...
Create a Candlestick Stock Chart (Open-High-Low-Close) in Excel to show 30 days of price movements. ... Your browser can't play this video.
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