遵循下面的示例http://teethgrinder.co.uk/open-flash-chart/gallery-bg-image.php
我在努力
import com.extjs.gxt.charts.client.model.ChartModel
ChartModel cm = new ChartModel(graphTitle, "color: #738995;font-weight: bold;font-size: 20px; font-family: arial; text-align: left;");
cm.setBackgroundColour("ffffff");
cm.set("bg_image", "http://teethgrinder.co.uk/open-flash-chart/images/logo.png");
cm.set("bg_image_x","right");
cm.set("bg_image_y","top");没有bg_image(_x,_y)位,所有东西都可以使用它抛出的位
(字符串):在NPObject上调用方法时出错!插件异常: Actionscript出错。使用try/catch块查找错误..
ChartModel cm = getChartModel(dataSet);
try {
this.setChartModel(cm);
} catch (Exception ex)
{
GWTMessageHandler.handleInfoMessage(
"Message ="+ex.getMessage()+
"Cause = "+ex.getCause()+
"getLocalizedMessage = "+ex.getLocalizedMessage()+
"StackTrace="+ex.getStackTrace());
}returns =(String):在NPObject上调用方法时出错!插件异常: Actionscript出错。使用try/catch块查找error..Cause = nullgetLocalizedMessage =(字符串):在NPObject上调用方法时出错!插件异常: Actionscript出错。使用try/catch块查找error..StackTrace=[Ljava.lang.StackTraceElement;@2ff
发布于 2011-03-16 00:29:21
编辑:听起来JavaScript和ActionScript之间的交互受到了安全限制的阻碍。试试这个security adjustment。
将您的代码包装在try/catch块中,看看它试图告诉您什么:
try{
ChartModel cm = new ChartModel(graphTitle, "color: #738995;font-weight: bold;font-size: 20px; font-family: arial; text-align: left;");
cm.setBackgroundColour("ffffff");
cm.set("bg_image", "http://teethgrinder.co.uk/open-flash-chart/images/logo.png");
cm.set("bg_image_x","right");
cm.set("bg_image_y","top");
} catch(err:Error) {
trace("name: " + err.name);
trace("message: " + err.message);
trace("problem code: " + err.getStackTrace());
}在不修改代码的情况下,我的第一个猜测是以下行应该接受数字而不是字符串:
cm.set("bg_image_x","200"); //instead of "right"
cm.set("bg_image_y","0"); //instead of "top"https://stackoverflow.com/questions/5311300
复制相似问题