Flot 和 Internet Explorer 9?
我正要为我的 ASP.NET 应用程序选择一个图表库。
我关注的是 stackoverflow 也使用的 float。当我转到此处的 float 示例时: http://people.iola.dk/olau/flot/examples/
他们看起来很棒。但在 IE9 中不行。我在 IE9 中什么也没看到。如果我将 IE9 置于 IE8 或 IE7 模式,它就可以工作。 如果我转到 SO
https://stackoverflow.com/users/22656/jon- 上的用户页面skeet?tab=reputation
它也适用于 IE9。 我缺少什么?是否有一个秘密的 SupportIE9=true 开关?
我看了一下 protovis 作为替代方案。 http://vis.stanford.edu/protovis/ex/
在 IE9 中看起来很棒但如果我把浏览器换成IE7或IE8,又郁闷了。
提示?如何使这些工作或跨 IE 版本工作的替代方案? 火狐浏览器不存在这个问题。适用于所有图书馆:)
I am just about to choose a chart library for my ASP.NET application.
I had my eye on flot which is also used by stackoverflow. When I go to the flot examples here:
http://people.iola.dk/olau/flot/examples/
They look great. But not in IE9. I don't see anything in IE9. If I put my IE9 into IE8 or IE7 mode it works.
If I go to the User page here on SO
https://stackoverflow.com/users/22656/jon-skeet?tab=reputation
it works also in IE9.
What am I missing? Is there a secret SupportIE9=true switch?
I had a look at protovis as an alternative.
http://vis.stanford.edu/protovis/ex/
That looks great in IE9 but if I put the browser into IE7 or IE8 it is depressing again.
Hints? How to make these work or an alternative which works cross-IE-version?
Firefox is not in issue. Works with all libraries :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
获取最新版本的 flot(当前为 0.8.3)。
自版本(0.6)以来,IE9 发生了一些变化,具体来说,IE6-8 支持画布的方式是通过一个名为 excanvas。 IE9 现在原生支持 canvas,因此仅当用户没有 IE9 时才应包含 excanvas。 flot 的 subversion 存储库中的具体更改如下:
您需要进行的更改的一个示例如下:
变为:
Get the latest version of flot (currently 0.8.3).
There are some changes since around version (0.6) that pretain to IE9, specifically, the way IE6-8 support canvas is via a library called excanvas. IE9 now supports canvas natively, so the inclusion of excanvas should only happen if the user doesn't have IE9. The specific change in the subversion repository for flot is this one:
An example of the change you need to make is this:
Becomes this:
你应该给 gRaphael 一个机会。即使在 IE 中也能表现出色,而且功能齐全。以下是一些结果:
https://gist.github.com/275992
You should give gRaphael a shot. Excellent performance, even in IE, and well featured. Here are some results:
https://gist.github.com/275992
如果您想坚持使用相同的版本并解决问题,这应该会有所帮助。 http://bugs.endian.com/view.php?id=3813
If you want to stick to the same version and fix the issue, this should help. http://bugs.endian.com/view.php?id=3813
flot 在 IE9 中可以,但 IE9 不能使用某些 JavaScript 语法。
调试所描述的相同问题揭示了数据数组的错误,定义为:
IE 认为该数组有 3 个成员,因此 flot 中的循环被破坏。
如此清晰的数组语法从奇数结束逗号!
flot is ok in IE9, but IE9 is not ok with some JavaScript syntax.
Debugging the same problem as described have revealed the error with data array defined as:
IE thinks of that array as having 3 members, so a cycle in flot got broken.
So clear array syntax from odd closing comma!