2013-06-05 68 views
0

大家好,为什么我的图表在iPhone/iPad上运行,但不在Android上运行?

我使用Enyo与JS。我用PhoneGap将我的代码移植到了IOs - IPhone/IPad。但该图表不适用于Android ..问题在于图表无法呈现。我一直在寻找和发现一些人说,SVG图表不适用于Android应用程序..但我使用的是jquery float类型。 好吧,如果必要的详细信息或细节,请填写免费问.. 谢谢..

这里是logcat的错误:

06-06 09:24:29.093: V/webview(3910): singleCursorHandlerTouchEvent -getEditableSupport >FASLE 06-06 09:24:30.593: V/webview(3910): singleCursorHandlerTouchEvent -getEditableSupport FASLE 06-06 09:24:30.921: V/webview(3910): singleCursorHandlerTouchEvent -getEditableSupport FASLE 06-06 09:24:32.007: V/webview(3910): singleCursorHandlerTouchEvent -getEditableSupport FASLE 06-06 09:24:33.398: V/webview(3910): singleCursorHandlerTouchEvent -getEditableSupport FASLE 06-06 09:24:36.125: V/webview(3910): singleCursorHandlerTouchEvent -getEditableSupport FASLE 06-06 09:24:37.640: V/webview(3910): singleCursorHandlerTouchEvent -getEditableSupport FASLE 06-06 09:24:39.867: V/webview(3910): singleCursorHandlerTouchEvent -getEditableSupport FASLE 06-06 09:24:40.406: D/CordovaLog(3910): Uncaught Error: Invalid dimensions for plot, width = 720, height = 0 06-06 09:24:40.406: E/Web Console(3910): Uncaught Error: Invalid dimensions for plot, width = 720, height = 0 at file:///android_asset/www/jquery.flot.js:118 06-06 09:24:40.421: D/CordovaLog(3910): Uncaught Error: Invalid dimensions for plot, width = 720, height = 0 06-06 09:24:40.421: E/Web Console(3910): Uncaught Error: Invalid dimensions for plot, width = 720, height = 0 at file:///android_asset/www/jquery.flot.js:118

任何想法?

+0

一个细节:容器没有找到图表的高度。什么不在IO或浏览器上发生。 – DTondin

回答

0

已解决!

我在创建图形的方法内添加了'if'语句。在此'if'中,找到的高度(零)乘以图表大小所需的百分比(以十进制表示)。

if (document.height == 0) { height = document.height * 0.5; }

+0

这还不算高度= 0吗? – sugardave

+0

嗨,是的,仍然在零。但是,我发现了解决这个问题的唯一方法。如果您有任何其他想法,请发帖! :D – DTondin

+0

您可能需要将图表(或您的应用程序)放入适合的行/列中,并在图表/主区域上设置适合度:true。或者,您可以尝试明确设置其中一个容器的高度。 – Pre101

相关问题