I use a function in java script, which uses a static method to query the server, obtaining as a response a DataSet
with several tables sereializado as object JSON
(string json = JsonConvert.SerializeObject(_dsCon);)
and I return it in this way to the function JavaScript
, already in the JavaScript function I convert this response to JSON
(var json = JSON.parse(resultado.d))
Now I need to organize this JSON
so that I can send it to the function and recognize it so I can paint the graph.
So far I only get a response from the data server and in the client's part I have not advanced anything, I need your help, thank you very much.
I use library Highcharts
, Graphics Lines
with Irregular time intervals.
The result of my answer when making the Ajax call is as follows.
{
"Table": [
{
"C019FechaIngreso": "21-Abril-2017",
"mes": 4,
"C019Resultado": 8,
"C019CodMaestro": "ATP"
},
{
"C019FechaIngreso": "24-Abril-2017",
"mes": 4,
"C019Resultado": 2,
"C019CodMaestro": "ATP"
},
{
"C019FechaIngreso": "22-Mayo-2017",
"mes": 5,
"C019Resultado": 9.5,
"C019CodMaestro": "ATP"
},
{
"C019FechaIngreso": "23-Mayo-2017",
"mes": 5,
"C019Resultado": 10,
"C019CodMaestro": "ATP"
},
{
"C019FechaIngreso": "24-Mayo-2017",
"mes": 5,
"C019Resultado": 3.75,
"C019CodMaestro": "ATP"
},
{
"C019FechaIngreso": "20-Junio-2017",
"mes": 6,
"C019Resultado": 1.1,
"C019CodMaestro": "ATP"
},
{
"C019FechaIngreso": "22-Junio-2017",
"mes": 6,
"C019Resultado": 1,
"C019CodMaestro": "ATP"
},
{
"C019FechaIngreso": "6-Junio-2017",
"mes": 6,
"C019Resultado": 16.33,
"C019CodMaestro": "ATP"
},
{
"C019FechaIngreso": "4-Agosto-2017",
"mes": 8,
"C019Resultado": 4,
"C019CodMaestro": "ATP"
}
],
"Table1": [
{
"C019FechaIngreso": "4-Julio-2017",
"mes": 7,
"C019Resultado": -2.67,
"C019CodMaestro": "RDM"
},
{
"C019FechaIngreso": "4-Agosto-2017",
"mes": 8,
"C019Resultado": 1,
"C019CodMaestro": "RDM"
},
{
"C019FechaIngreso": "13-Septiembre-2017",
"mes": 9,
"C019Resultado": -10,
"C019CodMaestro": "RDM"
}
]
}
The way the function receives the data is as follows:
series: [{
name: "Winter 2014-2015",
data: [
[Date.UTC(1970, 10, 25), 0],
[Date.UTC(1970, 11, 6), 0.25],
[Date.UTC(1970, 11, 20), 1.41],
[Date.UTC(1970, 11, 25), 1.64],
[Date.UTC(1971, 0, 4), 1.6],
[Date.UTC(1971, 0, 17), 2.55],
]
}]
with that data I want to generate a graph like the one in the image.