In HighChart I needs to plot a series of data against x and y axis. HighChart expects the data to be in json format. ie, [ [ x, y],[x, y]……[x, y] ]. Where x and y are time ( 1392345000 – Unix epoch format ) and value ( 49.322 ). So I am making an ajax call to get the data and on success I render the json returned data in highchart. In most of the time ie, if the count of data( [x,y] ) is below 87500 rows than Json returns the data from controller to view. But when the data exceeds 87500 the ajax error is called with 404, not found error. Is there any size restriction for json returned data.
Section-1 – Controller Class public JsonResult GetPlotData(Dictionary<string, List<ChartData>> dataPlot) { // dataPlot = D00213 - [[13245678000,49.9],[13245345000,43.9]...[n,n]] // if dataPlot.Count < 87500 here throwing error and in ajax error 404 Not found return Json(dataPlot, JsonRequestBehavior.AllowGet); } Section-2 – Ajax $.ajax( { url: '../Report/GetPlotData', data: { "fromDate": fromDate, "toDate":toDate, "item": items[i].id }, type: "POST", dataType: "json", cache: false, success: function(chartData) { alert(‘success’ }, error: function(xhr, ajaxOptions, thrownError) { debugger; ShowDialogError(xhr, 'Site Status Report'); } });
在HighChart我需要策划一系列数据对x和y轴。HighChart预计要以json格式的数据。例如,[[x,y],[x,y]……[x,y]]。在x和y时间(1392345000 - Unix时间戳格式)和价值(49.322)。所以我制作一个ajax调用获取数据和成功我在highchart呈现json返回的数据。在大多数时候,如果计数的数据((x,y))低于87500行比Json返回数据从控制器到视图。但当数据超过87500 ajax错误被称为404,没有发现错误。有大小限制为json返回的数据。
Section-1——控制器类public JsonResult GetPlotData(Dictionary<string, List<ChartData>> dataPlot) { // dataPlot = D00213 - [[13245678000,49.9],[13245345000,43.9]...[n,n]] // if dataPlot.Count < 87500 here throwing error and in ajax error 404 Not found return Json(dataPlot, JsonRequestBehavior.AllowGet); } Section-2 - Ajax $.ajax( { url: '../Report/GetPlotData', data: { "fromDate": fromDate, "toDate":toDate, "item": items[i].id }, type: "POST", dataType: "json", cache: false, success: function(chartData) { alert(‘success’ }, error: function(xhr, ajaxOptions, thrownError) { debugger; ShowDialogError(xhr, 'Site Status Report'); } });