AmCharts 4 DataSource: Force chart to wait for all external data to load









up vote
1
down vote

favorite












I'm using AmCharts 4 to create a scatter plot with external data, using this code to point to the external URL:



dataURL = 'http://somesite.com/page?params=1234';
ScatterChart.dataSource.disableCache = true;
ScatterChart.dataSource.url = dataURL;


The chart loads; however, each time I load the chart, it is giving me a different set of data, and it always is missing significant chunks of the data I am expecting. When I go to dataURL the external data downloads onto into its URL over a period of approximately 20 seconds. I think it is not waiting for the data source page to finish downloading information before graphing.



Is there a way to force AmCharts to wait for a data source to finish loading before graphing a chart?



Here is a screenshot of the network view of dataURL:



screenshot of the network view










share|improve this question

















  • 1




    Just a fyi, this has caught our attention and we'll let you know when we've had a chance to look it over.
    – notacouch
    Nov 21 at 5:22






  • 2




    amCharts 4 does not have any timeouts for data load built in. It also does not initiate build of the chart with only-partially loaded data. I'm suspecting that something might be happening with the actual data source, like maybe there are some server-side execution limits that are hit that cause only partial data to be generated. I suggest you try accessing the data URL directly and checking whether it loads fully, there are no errors - both in output and in response headers.
    – martynasma
    Nov 21 at 9:23






  • 1




    @martynasma Content appears on the page after "Waiting (TTFB)" period of 1.26 seconds on the screenshot above; however, it loads continuously into the page during the 21.39 seconds of "Content Download". Visually, you can watch the scrollbar get smaller, and if you scroll to the bottom it will keep loading in content underneath. At first, I tried loading the data myself via Ajax and sending it to the chart's data object, but it ended up crashing my browser with very high memory usage (data is only 13Mb). I ended up switching the chart back to an AmCharts3 dataLoader and it worked quickly.
    – Nathan Clement
    Nov 21 at 18:53






  • 1




    Let me know if there is any kind of diagnostic information that might be useful. I manage the dataURL as well.
    – Nathan Clement
    Nov 21 at 18:54






  • 1




    Also, there are no errors in the response or the actual output.
    – Nathan Clement
    Nov 21 at 20:42














up vote
1
down vote

favorite












I'm using AmCharts 4 to create a scatter plot with external data, using this code to point to the external URL:



dataURL = 'http://somesite.com/page?params=1234';
ScatterChart.dataSource.disableCache = true;
ScatterChart.dataSource.url = dataURL;


The chart loads; however, each time I load the chart, it is giving me a different set of data, and it always is missing significant chunks of the data I am expecting. When I go to dataURL the external data downloads onto into its URL over a period of approximately 20 seconds. I think it is not waiting for the data source page to finish downloading information before graphing.



Is there a way to force AmCharts to wait for a data source to finish loading before graphing a chart?



Here is a screenshot of the network view of dataURL:



screenshot of the network view










share|improve this question

















  • 1




    Just a fyi, this has caught our attention and we'll let you know when we've had a chance to look it over.
    – notacouch
    Nov 21 at 5:22






  • 2




    amCharts 4 does not have any timeouts for data load built in. It also does not initiate build of the chart with only-partially loaded data. I'm suspecting that something might be happening with the actual data source, like maybe there are some server-side execution limits that are hit that cause only partial data to be generated. I suggest you try accessing the data URL directly and checking whether it loads fully, there are no errors - both in output and in response headers.
    – martynasma
    Nov 21 at 9:23






  • 1




    @martynasma Content appears on the page after "Waiting (TTFB)" period of 1.26 seconds on the screenshot above; however, it loads continuously into the page during the 21.39 seconds of "Content Download". Visually, you can watch the scrollbar get smaller, and if you scroll to the bottom it will keep loading in content underneath. At first, I tried loading the data myself via Ajax and sending it to the chart's data object, but it ended up crashing my browser with very high memory usage (data is only 13Mb). I ended up switching the chart back to an AmCharts3 dataLoader and it worked quickly.
    – Nathan Clement
    Nov 21 at 18:53






  • 1




    Let me know if there is any kind of diagnostic information that might be useful. I manage the dataURL as well.
    – Nathan Clement
    Nov 21 at 18:54






  • 1




    Also, there are no errors in the response or the actual output.
    – Nathan Clement
    Nov 21 at 20:42












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I'm using AmCharts 4 to create a scatter plot with external data, using this code to point to the external URL:



dataURL = 'http://somesite.com/page?params=1234';
ScatterChart.dataSource.disableCache = true;
ScatterChart.dataSource.url = dataURL;


The chart loads; however, each time I load the chart, it is giving me a different set of data, and it always is missing significant chunks of the data I am expecting. When I go to dataURL the external data downloads onto into its URL over a period of approximately 20 seconds. I think it is not waiting for the data source page to finish downloading information before graphing.



Is there a way to force AmCharts to wait for a data source to finish loading before graphing a chart?



Here is a screenshot of the network view of dataURL:



screenshot of the network view










share|improve this question













I'm using AmCharts 4 to create a scatter plot with external data, using this code to point to the external URL:



dataURL = 'http://somesite.com/page?params=1234';
ScatterChart.dataSource.disableCache = true;
ScatterChart.dataSource.url = dataURL;


The chart loads; however, each time I load the chart, it is giving me a different set of data, and it always is missing significant chunks of the data I am expecting. When I go to dataURL the external data downloads onto into its URL over a period of approximately 20 seconds. I think it is not waiting for the data source page to finish downloading information before graphing.



Is there a way to force AmCharts to wait for a data source to finish loading before graphing a chart?



Here is a screenshot of the network view of dataURL:



screenshot of the network view







javascript amcharts






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 10 at 0:19









Nathan Clement

485816




485816







  • 1




    Just a fyi, this has caught our attention and we'll let you know when we've had a chance to look it over.
    – notacouch
    Nov 21 at 5:22






  • 2




    amCharts 4 does not have any timeouts for data load built in. It also does not initiate build of the chart with only-partially loaded data. I'm suspecting that something might be happening with the actual data source, like maybe there are some server-side execution limits that are hit that cause only partial data to be generated. I suggest you try accessing the data URL directly and checking whether it loads fully, there are no errors - both in output and in response headers.
    – martynasma
    Nov 21 at 9:23






  • 1




    @martynasma Content appears on the page after "Waiting (TTFB)" period of 1.26 seconds on the screenshot above; however, it loads continuously into the page during the 21.39 seconds of "Content Download". Visually, you can watch the scrollbar get smaller, and if you scroll to the bottom it will keep loading in content underneath. At first, I tried loading the data myself via Ajax and sending it to the chart's data object, but it ended up crashing my browser with very high memory usage (data is only 13Mb). I ended up switching the chart back to an AmCharts3 dataLoader and it worked quickly.
    – Nathan Clement
    Nov 21 at 18:53






  • 1




    Let me know if there is any kind of diagnostic information that might be useful. I manage the dataURL as well.
    – Nathan Clement
    Nov 21 at 18:54






  • 1




    Also, there are no errors in the response or the actual output.
    – Nathan Clement
    Nov 21 at 20:42












  • 1




    Just a fyi, this has caught our attention and we'll let you know when we've had a chance to look it over.
    – notacouch
    Nov 21 at 5:22






  • 2




    amCharts 4 does not have any timeouts for data load built in. It also does not initiate build of the chart with only-partially loaded data. I'm suspecting that something might be happening with the actual data source, like maybe there are some server-side execution limits that are hit that cause only partial data to be generated. I suggest you try accessing the data URL directly and checking whether it loads fully, there are no errors - both in output and in response headers.
    – martynasma
    Nov 21 at 9:23






  • 1




    @martynasma Content appears on the page after "Waiting (TTFB)" period of 1.26 seconds on the screenshot above; however, it loads continuously into the page during the 21.39 seconds of "Content Download". Visually, you can watch the scrollbar get smaller, and if you scroll to the bottom it will keep loading in content underneath. At first, I tried loading the data myself via Ajax and sending it to the chart's data object, but it ended up crashing my browser with very high memory usage (data is only 13Mb). I ended up switching the chart back to an AmCharts3 dataLoader and it worked quickly.
    – Nathan Clement
    Nov 21 at 18:53






  • 1




    Let me know if there is any kind of diagnostic information that might be useful. I manage the dataURL as well.
    – Nathan Clement
    Nov 21 at 18:54






  • 1




    Also, there are no errors in the response or the actual output.
    – Nathan Clement
    Nov 21 at 20:42







1




1




Just a fyi, this has caught our attention and we'll let you know when we've had a chance to look it over.
– notacouch
Nov 21 at 5:22




Just a fyi, this has caught our attention and we'll let you know when we've had a chance to look it over.
– notacouch
Nov 21 at 5:22




2




2




amCharts 4 does not have any timeouts for data load built in. It also does not initiate build of the chart with only-partially loaded data. I'm suspecting that something might be happening with the actual data source, like maybe there are some server-side execution limits that are hit that cause only partial data to be generated. I suggest you try accessing the data URL directly and checking whether it loads fully, there are no errors - both in output and in response headers.
– martynasma
Nov 21 at 9:23




amCharts 4 does not have any timeouts for data load built in. It also does not initiate build of the chart with only-partially loaded data. I'm suspecting that something might be happening with the actual data source, like maybe there are some server-side execution limits that are hit that cause only partial data to be generated. I suggest you try accessing the data URL directly and checking whether it loads fully, there are no errors - both in output and in response headers.
– martynasma
Nov 21 at 9:23




1




1




@martynasma Content appears on the page after "Waiting (TTFB)" period of 1.26 seconds on the screenshot above; however, it loads continuously into the page during the 21.39 seconds of "Content Download". Visually, you can watch the scrollbar get smaller, and if you scroll to the bottom it will keep loading in content underneath. At first, I tried loading the data myself via Ajax and sending it to the chart's data object, but it ended up crashing my browser with very high memory usage (data is only 13Mb). I ended up switching the chart back to an AmCharts3 dataLoader and it worked quickly.
– Nathan Clement
Nov 21 at 18:53




@martynasma Content appears on the page after "Waiting (TTFB)" period of 1.26 seconds on the screenshot above; however, it loads continuously into the page during the 21.39 seconds of "Content Download". Visually, you can watch the scrollbar get smaller, and if you scroll to the bottom it will keep loading in content underneath. At first, I tried loading the data myself via Ajax and sending it to the chart's data object, but it ended up crashing my browser with very high memory usage (data is only 13Mb). I ended up switching the chart back to an AmCharts3 dataLoader and it worked quickly.
– Nathan Clement
Nov 21 at 18:53




1




1




Let me know if there is any kind of diagnostic information that might be useful. I manage the dataURL as well.
– Nathan Clement
Nov 21 at 18:54




Let me know if there is any kind of diagnostic information that might be useful. I manage the dataURL as well.
– Nathan Clement
Nov 21 at 18:54




1




1




Also, there are no errors in the response or the actual output.
– Nathan Clement
Nov 21 at 20:42




Also, there are no errors in the response or the actual output.
– Nathan Clement
Nov 21 at 20:42

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53234902%2famcharts-4-datasource-force-chart-to-wait-for-all-external-data-to-load%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53234902%2famcharts-4-datasource-force-chart-to-wait-for-all-external-data-to-load%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kleinkühnau

Makov (Slowakei)

Deutsches Schauspielhaus