我一直在使用dimple.js,我确实喜欢它。然而,对于大型数据集,我注意到一些性能问题,并希望尝试使用crossfilter + dc来查看它的执行情况。我的问题是我不太确定如何在发送到页面/ javascript之前最好地打包有效负载。
我的json有点复杂,但在它的核心,它包含一组数据集,我想在与图表或条形图相同的图表上绘图。例如,在下面,我想将前两组(打开和关闭)绘制为线系列,将第三系列绘制为条形图(理想情况下在第二个y轴上)。
我的问题是: dc.js有可能吗? 在这种情况下,关于页面加载速度,我是否可以获得crossfilter的任何好处(实际数据将由6个数组和每个约3k数据点组成)。?
以下是json的样子:
{
"hist_quotes" : [{
"title" : "Open Prices",
"data" : [{
"y" : 4318.28,
"x" : "2014-12-05 00:00:00",
"category" : "Open"
}, {
"y" : 4309.48,
"x" : "2014-12-04 00:00:00",
"category" : "Open"
}, {
"y" : 4312.17,
"x" : "2014-12-03 00:00:00",
"category" : "Open"
}, {
"y" : 4291.33,
"x" : "2014-12-02 00:00:00",
"category" : "Open"
}
}],
[{
"title" : "Close Prices",
"data" : [{
"y" : 4324.28,
"x" : "2014-12-05 00:00:00",
"category" : "Open"
}, {
"y" : 4355.48,
"x" : "2014-12-04 00:00:00",
"category" : "Open"
}, {
"y" : 4333.17,
"x" : "2014-12-03 00:00:00",
"category" : "Open"
}, {
"y" : 4334.33,
"x" : "2014-12-02 00:00:00",
"category" : "Open"
}
}],
[{
"title" : "Volume",
"data" : [{
"y" : 431828000,
"x" : "2014-12-05 00:00:00",
"category" : "Open"
}, {
"y" : 401828000,
"x" : "2014-12-04 00:00:00",
"category" : "Open"
}, {
"y" : 431828000,
"x" : "2014-12-03 00:00:00",
"category" : "Open"
}, {
"y" : 401828000,
"x" : "2014-12-02 00:00:00",
"category" : "Open"
}
}]
]
}