javascript - HighChart flags Data load issues -


i working on drawing graphs our data. there no problem on drawing graph basically. problem flags information not loaded , located on graph lines. let me give issues on it.

  1. data cannot brought graph if has on 900 numbers of items.
  2. one data might have more 4000 items.
  3. instead using 1 big data, tried spilt 1 data small pieces of data. each piece of data has 800 items, , intended being loaded on graph sequentially. however, process not done well. sometime graph module cannot load every piece exactly. moreover, process take time using 1 data.

i wonder whether appropriate way load flag data contains many items exits or not.

$(function() {     var report_data;     $.ajax({         type: "post",         url:"/apps.chart/chart.reportshort",         data:"callback=?&report_type=co&business_code=005930",         datatype:"json",         success:function(report){             report_data = report;         }     });      $.getjson('/apps.chart/chart.chartlist?callback=?&report_type=co&business_code=005930', function(data) {          // create chart         $('#chartview').highcharts('stockchart', {             chart: {                 plotbordercolor: '#346691',                 plotborderwidth: 2,                 height: 600             },             rangeselector : {                 inputenabled: $('#chartview').width() > 400,                 selected : 1             },              title : {                 text : 'sk'             },              tooltip: {                 type: 'datetime',                 datetimelabelformats: {                     day: '%y년 %m월 %d일'                 },                 style: {                     width: '300px'                 },                 valuedecimals: 0             },             xaxis: {                 type: 'datetime',                 datetimelabelformats: {                     day: '%m.%d',                     week: '%m.%d',                     month: '%y.%m',                     year: '%y'                 }             },             yaxis : {                 labels : {                     formatter : function() {                         var n = this.value;                         var reg = /(^[+-]?\d+)(\d{3})/;                         n += '';                         while (reg.test(n))                         n = n.replace(reg, '$1' + ',' + '$2');                          return n;                     },                     align : 'left',                     x : 5,                     y : 2                 },                 maxpadding: 0.2,                 minpadding: 0,                 minortickinterval: 'auto',                 title : {                     text : '금액(원)',                 }             },              series : [{                 name : '종가',                 data : data,                 id : 'dataseries',                 marker : {                     enabled : true,                     radius : 3                 },                 shadow : true,                 tooltip : {                     valuedecimals : 0                 }             }             // event marker flags             ,{                 type : 'flags',                 data : report_data,                 style: {                     cursor: 'hand'                 },                 onseries : 'dataseries',                 shape : 'circlepin',                 width : 15,                 height : 15,                 color : '#121212'             }             ]         });     }); }); 

probably problem call 2 ajax asynchronously, advice next ajax insiae first callback , initialise chart.


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -