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.

There is a function by which a chart is built for a certain pair of currencies, and when switching this pair, in theory I need to clear the chart and load new data into it. If I add the line chart.removeSeries (lineSeries); then the chart is always empty, what’s the problem?

function cd(){
    const lineSeries = chart.addLineSeries();
    let data_chart = [];
  //  chart.removeSeries(lineSeries);
    if (typeof(Data_for_chart[CoinVal]) != "undefined"){
        if (typeof(Data_for_chart[CoinVal][CoinProd]) != "undefined"){
            if ((typeof(Data_for_chart[CoinVal][CoinProd]['Price']) != "undefined")&&(typeof(Data_for_chart[CoinVal][CoinProd]['Time']) != "undefined")){
                console.log(Data_for_chart[CoinVal][CoinProd]['Price'])
                for(var i = 0; i < Data_for_chart[CoinVal][CoinProd]['Price'].length; i++){
                    data_chart.push({time:Data_for_chart[CoinVal][CoinProd]['Time'][i], value:Data_for_chart[CoinVal][CoinProd]['Price'][i]});
                }
                lineSeries.setData(data_chart);
            }
        }
    }
}

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
PandaSobaocommented, Jun 5, 2020

Believe @johnworthley is looking for update()

1reaction
nikitamarciuscommented, Dec 16, 2019

@timocov sure. While I have such a solution. When a trading pair changes, the OHLC data is rebuilt, while the chart remains in the same coordinates along X and Y. It is possible to align the graph only horizontally chart.timeScale().resetTimeScale(), but not vertically, I do not know this possibility.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Top ten ways to clean your data - Microsoft Support
The basics of cleaning your data · Insert a new column (B) next to the original column (A) that needs cleaning. · Add...
Read more >
Data cleansing with graph visualization - Cambridge Intelligence
The first step in the data cleansing process is understanding where data quality issues exist. In this blog post we use graph visualizations ......
Read more >
10 Super Neat Ways to Clean Data in Excel Spreadsheets
#4 – Remove Duplicates · Select the data and Go to Home –> Conditional Formatting –> Highlight Cells Rules –> Duplicate Values. ·...
Read more >
How to prepare your data for analysis and charting in Excel ...
How long will cleaning up my data take? · 1. Look at the data & understand it · 2. Rename your file ·...
Read more >
Top 8 Excel Data Cleaning Techniques to Know - Simplilearn
Now, you must learn how to eliminate conditional formatting for cleaning data in Excel. This time, consider a different sheet.
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