Dana
Posts: 3
Joined: Thu Dec 22, 2022 6:41 am

Import from JSON without limitations

Hey, we are using the function getJSON to get our data that is formatted like the following example.
The problem i am facing right now is that it is only possible to hand over 600 data stets to the chart if i hand over more than 600 the chart is going white...are there any limitations?
If I only transfer 600 data sets, everything works.

Example data:

Code: Select all

[{
   name: "test",
   data:  [[1620000000000,0.41],[1619913600000,0.37]...]
}]
User avatar
dawid.d
Posts: 807
Joined: Thu Oct 06, 2022 11:31 am

Re: Import from JSON without limitations

Hi,

Welcome to our forum and thanks for contacting us with your question!

The getJSON function should also work fine with more data as you can see in the demo below. Maybe it's for some other reason you didn't mention in your question? Could you reproduce the problem in e.g. jsfiddle?

Demo: https://jsfiddle.net/BlackLabel/4zx2nhup/

I'm waiting for your reply.
Best regards!
Dawid Draguła
Highcharts Developer
Dana
Posts: 3
Joined: Thu Dec 22, 2022 6:41 am

Re: Import from JSON without limitations

Hello,

thanks for your reply. To be honest, I don't think it's the getJSON function either.

Yes, I can reproduce the problem with jsfiddle. Regarding the demo, it works perfectly. But here only a normal chart is created. But I would like to make a stock chart like in this demo https://jsfiddle.net/gh/get/library/pur ... basic-line

If I use my data in the correct format instead of the demo data, the chart is empty.
Here is the link to my data source: https://derloeffler.at/test_data/data.json

Thank you for your help and best regards
User avatar
dawid.d
Posts: 807
Joined: Thu Oct 06, 2022 11:31 am

Re: Import from JSON without limitations

Hi,

Thanks for the reply and for sharing your data.

The problem seems to be that the data is not sorted. The console should display this error: https://assets.highcharts.com/errors/15/

Demo: https://jsfiddle.net/BlackLabel/ws1cnj7o/
In the demo, unfortunately, I can't present the problem on your data because of CORS, so I commented out the import line from your URL.

Let me know if you have any further questions!
Best regards
Dawid Draguła
Highcharts Developer
Dana
Posts: 3
Joined: Thu Dec 22, 2022 6:41 am

Re: Import from JSON without limitations

Hey,
Thanks for the quick feedback!

After checking the feedback I received from the browser again, I found the error message but unfortunately not as an error but as a warning, as shown below.

Code: Select all

c398c596fcabb6b336dc.js:2 Highcharts warning #15: www.highcharts.com/errors/15/
Nevertheless, my data is now displayed, thank you very much!
Attachments
Bildschirmfoto 2023-01-12 um 15.57.23.png
Bildschirmfoto 2023-01-12 um 15.57.23.png (11.65 KiB) Viewed 396 times
User avatar
dawid.d
Posts: 807
Joined: Thu Oct 06, 2022 11:31 am

Re: Import from JSON without limitations

You're welcome! I'm glad everything works for you now!

In case of any further questions, feel free to contact us again.
Regards!
Dawid Draguła
Highcharts Developer

Return to “Highcharts Stock”