javascript - Highstock don't draw any -


i have function called data(), function write echo $result."<br>"; (data obtained database):

[20010426000000, 1], [20010820000000, 1], [20011201000000, 1], [20020718000000, 1], 

and have function draw highstock:

$(function() {         // create chart         $('#lineasac').highcharts('stockchart', {           ...           name: 'sales',           data: [              //here problem           ],         ... 

if put manually result of function works:

data: [           [20010426000000, 1],   [20010820000000, 1],   [20011201000000, 1],   [20020718000000, 1], ], 

but if call function don't work:

data: [    <? echo data();?> ], 

i tried put function inside data without function , echo $result."<br>";, tried put <?data();?>, etc. tried of know

any idea?

thanks!

i think problem may data() function. if outputs
tags, these included in highcharts data, , won't valid json. should echo data:

echo $result; 

Comments

Popular posts from this blog

Why can rails not find a route created by a helper? -

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -