Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chart complete freeze app on drawing or zoom #72

Open
cyberluke opened this issue May 13, 2020 · 2 comments
Open

Chart complete freeze app on drawing or zoom #72

cyberluke opened this issue May 13, 2020 · 2 comments

Comments

@cyberluke
Copy link

cyberluke commented May 13, 2020

Hi, it happens also with zoom plugin, so I disabled it to verify and it happens also without zoom.

Am I doing something wrong here? I get json very fast, then it freezes for at least 10s. For more data, it can freeze for minutes even!

            for (const candle of candleResponse.candles) {
                console.log(candle);
                const luxonDate: luxon.DateTime = luxon.DateTime.fromISO(candle.time);
                this.chartLabels.push(luxonDate.toString());
                this.chartData[0].data.push({
                    t: luxonDate.valueOf(),
                    o: candle.mid.o,
                    h: candle.mid.h,
                    l: candle.mid.l,
                    c: candle.mid.c
                });
            }
        });```
@benmccann
Copy link
Collaborator

You probably have to call chart.update at some point

I'm not sure if any plugins will work with this chart at the moment because I just upgraded it to use chartjs-3.0.0.alpha and most plugins haven't been updated to work with chart.js 3.0 yet

@cyberluke
Copy link
Author

Yes, I work on a commit before 3.0 to make it compatible. So I am on 2.9 and your revision f0c37e1.

I found Ionic Youtube video tutorial using your Chart.js and I also use ng4-charts wrapper for Angular, which according to their Github Issues, might have some bottlenecks in comparison with plain Chart.js.

So I was more interested in some best practice how to insert first time data into chart. The additional streaming should be ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants