If you want several episodes with your tags:
plot.setData([ { label: 'Hola', data: data[0], }, { label: 'Hola2', data: data[1] } ]); plot.setupGrid(); plot.draw();
If the data can be obtained from an ajax call in json format.
For example, in php:
<?php $data[] = array(2,4); $data[] = array(12,6); $data[] = array(22,8); $data[] = array(32,2); $data1[] = array(4,6); $data1[] = array(14,3); $data1[] = array(24,9); $data1[] = array(34,5); $response[0] = $data; $response[1] = $data1; echo json_encode($response); ?>
In any case, the return format value from the server side should be approximately the same as for the two series, such as the example above:
[[[[2,4], [12,6], [22,8], [32,2]], [[4,6], [14,3], [24,9], [34,5 ]]]
Cesar morillas barrio
source share