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
Post a Comment