N
N
Naboska2019-02-18 20:40:15
JavaScript
Naboska, 2019-02-18 20:40:15

How to display data in Highcharts from Ajax?

Good afternoon.
Faced the problem of outputting data in a series of highcharts charts.

I'm displaying data on the site via ajax:

function data_load()
 {
$.ajax({
type: "GET",
url: "/lk/data.php"
data: "get=AJT&AJT=15&skill=0&time=get",
success: function(html) { $('#data_in').append(html);}
});
}

to a line It is necessary to display data in a highcharts chart
<div id="data_in"></div>
series: [{
data: [//вот тут вывод данных из id="data_in"],
name: "AJH"
}]

From the data.php file, the data is output in the format [1,2,3,4,]
Unfortunately for me

it represents the text as [d,i,v, ]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Ulanov, 2019-02-19
@antonsr98

You can use {} to specify in what order to output data to the chart

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question