用于海量数据的 Javascript 图表库
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5019674/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Javascript charting library for huge data
提问by Adam Nellis
Does anyone know of a Javascript charting library that can handle huge datasets?
有谁知道可以处理大量数据集的 Javascript 图表库?
By 'huge', I mean drawing a line graph with around 1,000 lines and 25,000 data points in total. (With an uneven distribution of points per line. A lot of lines have very few points, but some have up to 4,000.) Here is an example data file.
“巨大”是指绘制一个总共有 1,000 条线和 25,000 个数据点的折线图。(每条线的点分布不均匀。很多线的点很少,但有些线高达 4,000。)这是一个示例数据文件。
Currently I'm using Highcharts, but it's far too slow at plotting the example file. Here is my test website, graphing the example data file using Highcharts. WARNING: Going to that page will eat up your processor for a while :)
目前我正在使用Highcharts,但绘制示例文件太慢了。这是我的测试网站,使用 Highcharts 绘制示例数据文件。警告:转到该页面会占用您的处理器一段时间:)
I don't want to use Flash or Silverlight.
我不想使用 Flash 或 Silverlight。
I was hoping to use Javascript so that my users can zoom+pan around the graph, and turn lines on/off etc. But if this is just too much data for any Javascript charting library to handle, then I'll have to make the graphs server-side.
我希望使用 Javascript 以便我的用户可以在图形周围缩放 + 平移,并打开/关闭线条等。图服务器端。
回答by Nicholas Shanks
回答by Merrily
The ZingChart JavaScript charting librarymight be worth checking out. It was specifically built for big data and offers some great features to ensure fast, stable renders without losing interactivity.
该ZingChart的JavaScript图表库可能是值得一试。它专为大数据而构建,并提供了一些强大的功能,以确保快速、稳定的渲染而不会失去交互性。
Here is a demothat renders 100k points in under one second. And if you'd like to make some comparisons, there is also the ZingChart Vs. demo(note the warning on the top right- some libs can mess with your browser).
这是一个在不到一秒的时间内渲染 100k 点的演示。如果您想进行一些比较,还有ZingChart Vs。演示(请注意右上角的警告 - 某些库可能会干扰您的浏览器)。
Full disclosure, I'm on the ZingChart team. I'm happy to answer any questions you might have about the library.
完全披露,我在 ZingChart 团队。我很乐意回答您对图书馆的任何问题。
回答by jmarceli
EChartscan handle a large amount of data (I've tested them with 100k points x 3 series).
ECharts可以处理大量数据(我已经用 100k 点 x 3 系列测试了它们)。
It is an open source and free to use (Apache 2.0) library. Here is an example of a large scale data chart https://ecomfe.github.io/echarts-examples/public/editor.html?c=candlestick-large
它是一个开源且免费使用的 (Apache 2.0) 库。这是一个大规模数据图表的例子https://ecomfe.github.io/echarts-examples/public/editor.html?c=candlestick-large
If you would like to use Echarts line
series type with a large amount of data you should turn on "sampling" http://echarts.apache.org/option.html#series-line.samplingto aggregate data points.
Another useful option would be showSymbol: false
which will also boost performance.
如果您想使用line
带有大量数据的Echarts系列类型,您应该打开“采样” http://echarts.apache.org/option.html#series-line.sampling来聚合数据点。另一个有用的选择是showSymbol: false
这也将提高性能。
回答by andora
Old thread but maybe of some use. Highcharts have added a 'boost' module to improve dataset point plotting. They say this can handle millions of data points with ease.
旧线程,但也许有一些用处。Highcharts 添加了一个 'boost' 模块来改进数据集点绘图。他们说这可以轻松处理数百万个数据点。