1

Sorry for the bother, recently start with ASP: NET and Google Chart.

I am making an application in ASP.NET in C #.

I made a chart using Google Charts Line, whether by an array with 1000 values, this represents correctly. If the array is 2500 for example, and does not show a failure alert.

The inquiry is whether there is any limit on the size or length of the array or data table.

Code:

var _puntoDeMedicionId = $('#<%= DropDownPtoMedicionGraf.ClientID %>').val();
 var _EntradasSalidas = _ids;
 var _FechaHoraIni = $('#<%= TextBoxFechaIniGraf.ClientID %>').val(); //Fecha inicial de seleccion
 var _FechaHoraFin = $('#<%= TextBoxFechaFinGraf.ClientID %>').val(); //Fecha final de seleccion

 $.ajax({
     url: "Graficos.aspx/GetChartData",
     data: "{'pPuntoDeMedicionId':'" + _puntoDeMedicionId + "'," +
           " 'pEntradasSalidas' : '" + _EntradasSalidas + "'," +
           " 'pFechaHoraIni' : '" + _FechaHoraIni + "'," +
           " 'pFechaHoraFin' : '" + _FechaHoraFin + "'" +
     "}",
     dataType: "json",
     type: "POST",
     contentType: "application/json; chartset=utf-8",
     success: function (data) {
           var _primero = true;
            $(data.d).each(function (_index, _objeto) {
                if (_primero == true)
                    _primero = false;
                else
                       _objeto[0] = moment(_objeto[0]).toDate();


            });
         chartData = data.d;
     },
     failure: function (r) {
         alert(data.d);
     },
     error: function (data) {
       //  alert(data.d);
         alert("Error cargando los datos, demasiados datos a representar o conexion muy lenta");
     }
 }).done(function () {
     // after complete loading data



     google.setOnLoadCallback(drawChart);
     drawChart();

 });

My English is not very good, sorry for any mistakes.

Solution

Looking for what would be the problem, I found, is in json serialization, which has a small default value, you have to edit the web.config and add a parameter, for more information:

Json Serialization StackOverflow

regards

Community
  • 1
  • 1
MicroAr
  • 11
  • 1
  • 6

0 Answers0