-3

我的数据为:

$ data1 = array([[1341354816000,1],[1341358185000,2],[1341361620000,3],[1341538421000,4],[1341621724000,5],[1341621724,000 8],[1342651985000,9],[13427444374000,10],[1343151552000,11],[1343285910000,12],[1343286178000,13] ,[1343625187000,17],[1343648616000,18],[1343649176000,19] 1343939382000, 25], [1344041570000, 26], [1344051059000, 27], [1344235565000, 28], [1344236000000, 29], [13440]48074000, 3);


$ data2 = array([[1341354816000,1],[1341358185000,2],[1341361620000,3],[1342133445000,4],[1342645937000,5],[1342645937000 8],[1343288137000,9],[1343307010000,10],[1343307401000,11],[1343625187000,12],[1343867245000 ,[1344041570000,17],[1344051059000,18],[13444248074000,19],[1344322547000,20],[13444330089000 1344447855000, 25], [1344479054000, 26]);


$ data3 = array([[1341354816000,1],[1341358185000,2],[1341361620000,3],[1341538421000,4],[1341621724000,5],[1341621724,000 8],[1342744374000,9],[1343286178000,10],[1343288137000,11],[1343307010000,12],[1343307401000,13],[1343307401000,13] , [ 1343938916000, 17] , [ 1343939382000, 18] );

现在我必须将这些数据绘制到与打开/关闭系列示例相同的图中。

任何人都可以在 php.ini 中帮助此代码。

我已经从不同的 sql 表和 php 创建了这个列表,所以如果 php 中的延续代码那么它会有所帮助。

我曾尝试将该数据添加到数据集中:

var datasets = { "all": { label: "All", data : '$data1' }, "resolved": { label: "Resolved", data : '$data2' }, "closed": { label: "Closed", data : '$data3' } };

这不起作用

4

1 回答 1

0

添加数据、绘图和打开/关闭的示例- http://jsfiddle.net/zxtFc/3/

var DataSet1 = [ 
[1341354816000, 1], [ 1341358185000, 2] , [ 1341361620000, 3] , [ 1341538421000, 4] , [    1341621724000, 5] , [ 1341868470000, 6] , [ 1342133445000, 7] , [ 1342645937000, 8] , [ 1342651985000, 9] , [ 1342744374000, 10] , [ 1343151552000, 11] , [ 1343285910000, 12] , [ 1343286178000, 13] , [ 1343288137000, 14] , [ 1343307010000, 15] , [ 1343307401000, 16] , [ 1343625187000, 17] , [ 1343648616000, 18] , [ 1343649176000, 19] , [ 1343649567000, 20] , [ 1343649898000, 21] , [ 1343867245000, 22] , [ 1343938551000, 23] , [ 1343938916000, 24] , [ 1343939382000, 25] , [ 1344041570000, 26] , [ 1344051059000, 27] , [ 1344235565000, 28] , [ 1344236000000, 29] , [ 1344248074000, 30]
];
于 2013-02-13T17:46:44.357 回答