amCharts support forum

You are not logged in.

Announcement

FORUM CLOSED! This forum is closed. We moved to a new place at Zendesk. Update your bookmarks.

JavaScript Charts: JavaScript Stock Chart


#1 2012-08-17 00:15:13

bashu
Member

Chart and loading screen

Hey,

Is it possible to show loading screen when chart.write is called and hide it when chart.write is done (I have complex charts and it takes some time to render them). Is there any related events which I can bind loading screen to?

Thanks!

Offline

 

#2 2012-08-17 03:10:46

martynasma
Administrator

Re: Chart and loading screen

Currently Stock chart does not have "init" handler. We will add it in upcoming versions.

Meanwhile you can use "zoomed" event. It's called when the chart is first initialized so you can use first call to "zoomed" handler to catch when chart is fully initialized.

Code:

var inited = false;
chart.addListener('zoomed', function (event) {
  if (!inited) {
    // remove "loading" panel
    // ...
    inited = true;
  }
});

Offline

 

#3 2012-08-17 03:35:24

bashu
Member

Re: Chart and loading screen

Thanks!

Offline

 

© amCharts | Forum engine: PunBB