关于DOM element with id in Element cache is not the same as element in the Dom解决方法
来源:互联网 发布:广电总局封网络机顶盒 编辑:程序博客网 时间:2024/05/20 16:01
ExtJS 5.1.1在使用统计图调用时,代码如下:
var graph0101 = Ext.create('Ext.chart.CartesianChart',{id:'graph_0101',insetPadding: {top: 60, bottom: 10, left: 40, right: 20},store:loaderObj.chartStore,width: 900,height: 420,animate: true,shadow: true,legend:{position:'bottom'},axes:[{type:'numeric',position:'left',grid:true,fields:['items'], grid: { odd: { opacity: 1, fill: '#ddd', stroke: '#bbb', 'stroke-width': 1 } }, minimum:0, maximum:total_xmsl+100,title:{text: '目数(个)', fontSize: 16}},{type:'category',title:{text: '年份', fontSize: 16},position:'bottom'}],series: [ { type: 'bar', xField:'year', yField:['items'],gutter: 20,groupGutter: 10,axis: 'left',highlight: true, showInLegend : true, label : { field : ['items'],//标签字段名 contrast: true, //统计图里的字反亮显示 display : 'outside',//标签显现方式 color:'blue', font : '12px 宋体',//字体 orientation:'horizontal', renderer : function(v){//自定义标签渲染函数 return v+'个' ; } }, }],sprites: {type:'text',text:Ext.getCmp('txt_charttitle').getValue(),font:'25px 宋体',width:300,height:35,x:150,y: 40}});
,产生如下图的错误
解决方法,在以上代码前加上以下代码
if(!Ext.Object.isEmpty(Ext.getCmp('graph_0101'))){Ext.destroy(Ext.getCmp('graph_0101'));}
就可以解决该错误。
阅读全文
0 0
- 关于DOM element with id in Element cache is not the same as element in the Dom解决方法
- XML DOM - The Element Object
- Selenium Webdriver : Element not found in the cache - perhaps the page has changed since it
- js replace dom element in html
- selenium之 坑(StaleElementReferenceException: Message: Element not found in the cache...)
- 第二十三节: selenium之 坑(StaleElementReferenceException: Message: Element not found in the cache...)
- dom element
- media in the link element -CSS and select by #id
- Maven抛出异常repository element was not specified in the POM inside distributionManagement element
- 解决webdriver(Element not found in the cache - perhaps the page has changed since it was looked up )
- [React Error]: Target container is not a DOM element
- Word2010 Error:The name in the end tag of the element must match the element type in the start tag.
- How a DOM Element is Attached
- DOM Element 常用方法
- DOM Node Element Attr
- XML DOM - Element 对象
- HTML DOM Element 对象
- DOM 中的Element详解
- Linux系统下shell脚本语言学习手册指南
- java中重载与重写的区别
- IntentService使用详解
- javascript知识体系
- 给3个布尔变量,当其中有2个或者2个以上为true才返回true
- 关于DOM element with id in Element cache is not the same as element in the Dom解决方法
- 图片做背景时状态栏透明
- ffmpeg -比特率,帧率和文件大小
- Android Activity的生命周期
- 函数模板与函数重载
- AngularJS页面数据绑定设置默认值
- Synopsys DesignWareI2C master init
- 争当巡视反馈热烈欢呼第一人
- java nio(一)--Buffer基础