我有来自我的数据库的数据,我将其转换为 json,如下所示
[{"name":"partner1","cost":"311328","date":"2013-04-01"},
{"name":"partner1","cost":"363780","date":"2013-04-02"},
{"name":"partner1","cost":"364062","date":"2013-04-03"},
{"name":"partner1","cost":"283128","date":"2013-04-04"},
{"name":"partner1","cost":"322608","date":"2013-04-05"},
{"name":"partner2","cost":"425538","date":"2013-04-01"},
{"name":"partner2","cost":"263670","date":"2013-04-02"},
{"name":"partner2","cost":"213192","date":"2013-04-03"},
{"name":"partner2","cost":"378726","date":"2013-04-04"},
{"name":"partner2","cost":"532698","date":"2013-04-05"}]
将此json数据转换为多个系列数据的highcharta标准的最佳方法是什么?
我最后的手段是对数据库进行多次查询来构造数据,但我认为它会消耗服务器时间资源。
感谢您的帮助。
问候,