javascript - Rendering many highcharts is very slow, can I make it non blocking -


i have around 300 highcharts on 1 page. after loading of html , data, rendering of highcharts taking around 3 seconds. made 2 functions take few parameters(div rendered , data ) in turn uses highcharts.chart() function reder chart. calling functions multiple times render charts in divisions. here how code looks :

    for(i=0;i<json_object.length;i++)      {          var container= document.getelementbyid("q_"+json_object[i].q_no);          distribution_chart(container, json_object[i]['distribution_texts'],json_object[i]['distribution_values']);          (j=0;j<json_object[i]['meta_distributions'].length;j++)          {              var container= document.getelementbyid("q_"+json_object[i].q_no+"_"+j);              (k=0; k< json_object[i]['meta_distributions'][j]['distribution_values'].length;k++)              {                  json_object[i]['meta_distributions'][j]['distribution_values'][k]=parsefloat(json_object[i]['meta_distributions'][j]['distribution_values'][k])              }              distribution_chart_demographic(container,json_object[i]['meta_distributions'][j]['distribution_texts'],json_object[i]['meta_distributions'][j]['distribution_values'],json_object[i]['meta_distributions'][j]['distribution_values_pos']);          }        }

can render highcharts in non blocking way. or such first few highcharts render during page load , others keep rendering in background after that.


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -