javascript 在 IE 上工作的图表库?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4475923/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-25 13:48:30  来源:igfitidea点击:

chart libraries that work on IE?

javascriptinternet-explorercharts

提问by grautur

I'm looking for (javascript or HTML-based) chart libraries that work on Internet Explorer. Any suggestions? Interactivity is a plus, but not necessary.

我正在寻找适用于 Internet Explorer 的(基于 JavaScript 或 HTML 的)图表库。有什么建议?交互性是一个优点,但不是必需的。

I've tried using Flot, but I'm having trouble getting it to work in IE8 (though a recent patch fixed it for IE9). I've also used the Google Chart API, but something a little more easily customizable would be preferred.

我试过使用 Flot,但我无法让它在 IE8 中工作(尽管最近的补丁为 IE9 修复了它)。我也使用过 Google Chart API,但更喜欢更容易定制的东西。

回答by mg1075

It depends a bit on what all you need to accomplish with your library, but maybe you'll find these musings useful...

这在一定程度上取决于你需要用你的图书馆完成什么,但也许你会发现这些思考很有用......

You can do quite a bit with just CSSand make your own "library", albeit a limited one, for graphs such as horizontal bar charts. For instance:

您可以仅使用CSS做很多 事情,并为水平条形图等图形制作自己的“库”,尽管数量有限。例如:

http://meyerweb.com/eric/css/edge/bargraph/demo.html

http://meyerweb.com/eric/css/edge/bargraph/demo.html

http://applestooranges.com/blog/post/css-for-bar-graphs/

http://applestooranges.com/blog/post/css-for-bar-graphs/

jQuery Sparklinesis not a true "library", either, but it has some great options, and it works all the way back to IE 6. Definitely underrated.

jQuery Sparklines也不是一个真正的“库”,但它有一些很棒的选择,而且它一直工作到 IE 6。绝对被低估了。

http://omnipotent.net/jquery.sparkline/

http://omnipotent.net/jquery.sparkline/

Highchartscould be a good bet.

Highcharts可能是一个不错的选择。

http://www.highcharts.com/

http://www.highcharts.com/

If Protovishad full support for IE, it might have to be considered the best, because it adheres to best practices for data visualization. However, it doesn't have the world's most accessible api, and it doesn't support IE, at least not entirely - read issue 15:

如果Protovis完全支持 IE,它可能必须被认为是最好的,因为它遵循数据可视化的最佳实践。但是,它没有世界上最容易访问的 api,并且它不支持 IE,至少不完全支持 - 阅读第 15 期:

http://vis.stanford.edu/protovis/

http://vis.stanford.edu/protovis/

http://code.google.com/p/protovis-js/issues/detail?id=15

http://code.google.com/p/protovis-js/issues/detail?id=15

Amchartshas flash-based charts at the moment, but take note: I believe they are working on javascript library for their charts. If and when they do come out with their library, I have a feeling it will be pretty good.

Amcharts目前有基于 flash 的图表,但请注意:我相信他们正在为他们的图表开发 javascript 库。如果他们真的推出他们的图书馆,我有一种感觉会很好。

http://www.amcharts.com/

http://www.amcharts.com/

Please also consider this when choosing a library: if you see a plethora of 3-d stacked pie charts, or glossy bars, or drop-shadows, then be careful: it's a good bet the makers of those charts didn't create them with data visualization best practices in mind.

选择库时还请考虑这一点:如果您看到过多的 3 d 堆叠饼图、光面条或阴影,那么要小心:这些图表的制作者很可能没有使用这些图表创建它们牢记数据可视化最佳实践。

回答by PallavN

For any JavaScript chart library to work on IE 6,7,8, they need to render the chart in VML. Hence, libraries rendering using SVG or Canvas only wouldn't work (hence d3.js based solutions wouldn't work). The following libraries currently have support on IE 6,7,8 as they use a hybrid of SVG and VML:

对于任何在 IE 6、7、8 上工作的 JavaScript 图表库,它们都需要在 VML 中呈现图表。因此,仅使用 SVG 或 Canvas 呈现的库是行不通的(因此基于 d3.js 的解决方案行不通)。以下库目前支持 IE 6、7、8,因为它们使用 SVG 和 VML 的混合:

FusionCharts JavaScript Charting @ http://www.fusioncharts.com

FusionCharts JavaScript 图表 @ http://www.fusioncharts.com

HighCharts @ http://www.highcharts.com

HighCharts @ http://www.highcharts.com

Any JavaScript charting library built on top of Raphael JS e.g., amcharts, gRaphael would also work on IE6,7,8.

任何建立在 Raphael JS 之上的 JavaScript 图表库,例如 amcharts、gRaphael 也可以在 IE6、7、8 上运行。

回答by Mohamed Kamal

have you tried telerik

你有没有试过电传

http://www.telerik.com/

http://www.telerik.com/

i did not use it myself, but a friend of mine thinks it is doing the job.

我自己没有使用它,但我的一个朋友认为它可以完成这项工作。

回答by Alan Mendelevich

Check out the recently released amCharts JavaScriptbundle. It brings all the interactivity of the Flash charts but in JS/HTML5.

查看最近发布的amCharts JavaScript包。它带来了 Flash 图表的所有交互性,但在 JS/HTML5 中。

回答by Chris

I've used jqPlotin the past and it worked well for me. It's a jQuery plugin though; not sure if that matters to you or not.

我过去使用过jqPlot,它对我来说效果很好。不过它是一个 jQuery 插件;不确定这对您是否重要。