Reputation: 197
I am loading chart using json but it takes while so meanwhile i want to show progress bar to show the process happening behind.
$.getJSON('frontend/js/tmp/data40.json', function(data) {
options.series=data;
var chart = new Highcharts.Chart(options);
});
How can i show progress bar?
Upvotes: 0
Views: 2284
Reputation: 4769
you can use showLoading function of highcharts to show progressbar.
yourChart.showLoading('Loading...');
yourChart.hideLoading();
will share a working demo
see the Alternate way of doing this , as you want to wait till response comes back and data fills in highchart see Working demo on your code
You can style and position this "Loading data" text or use a loading icon/spinner icon as you want.
$("#container").text("Loading Data");
$.getJSON('data10.json', function(data) {
options.series=data;
chart = new Highcharts.Chart(options);
});
Upvotes: 1