认为我终于以正确的形式获得了我想要的数据。我只是没有得到图表。因为我需要时间(每小时),所以我正在使用散点图。我从 mysql 中提取,但我以正确的格式将它交给 rgraph。我没有收到任何错误,也没有图表。
<script>
chart = new RGraph.Scatter('cvs', [[2013-03-28 00:05, 0.00, 'red'], [2013-03-28 01:05, -2.00, 'red'], [2013-03-28 02:05, -2.58, 'red'], [2013-03-28 03:05, -3.90, 'red'], [2013-03-28 04:05, -5.53, 'red'], [2013-03-28 05:05, -7.58, 'red'], [2013-03-28 06:05, -6.26, 'red'], [2013-03-28 07:05, -3.63, 'red'], [2013-03-28 08:05, -4.78, 'red'], [2013-03-28 09:05, -4.29, 'red'], [2013-03-28 10:05, -3.69, 'red'], [2013-03-28 11:05, -3.27, 'red'], [2013-03-28 12:05, -4.23, 'red'], [2013-03-28 13:05, -5.02, 'red'], [2013-03-28 14:05, -4.50, 'red'], [2013-03-28 15:05, -5.43, 'red'], [2013-03-28 16:05, -5.12, 'red'], [2013-03-28 17:05, -5.42, 'red'], [2013-03-28 18:05, -5.16, 'red'], [2013-03-28 19:05, -5.11, 'red']]);
chart.Set('chart.background.barcolor1', 'white');
chart.Set('chart.grid.color', 'rgba(238,238,238,1)');
chart.Set('chart.gutter.left', 30);
chart.Set('chart.labels', ['12', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11']);
chart.Set('chart.xmax', 12);
chart.Set('chart.line', true);
chart.Draw();
</script>
我错过了什么?