We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
barChart中监听legendselectchanged事件并用echartsInstance.setOption更新graphic时报错。错误信息是Uncaught TypeError: Cannot set property '__alive' of undefined。
barChart
legendselectchanged
echartsInstance.setOption
graphic
Uncaught TypeError: Cannot set property '__alive' of undefined
option
title
zrUtil.each(option, function(o, mainType) { mainType !== 'graphic' && (this.__lastOnlyGraphic = false); }, this); /* -------------------------------------------------------------------------------------- */ if (this.__lastOnlyGraphic) { each(this._componentsViews, function(componentView) { var componentModel = componentView.__model; if (componentModel && componentModel.mainType === 'graphic') { componentView.render(componentModel, ecModel, this._api, payload); updateZ(componentModel, componentView); } }, this); this.__lastOnlyGraphic = false; } else { updateMethods.update.call(this, payload); }
更新指定 id 的graphic元素的内容。
option = { graphic: [ { "type": "group", "id": "MCC0", "children": [ { "type": "text", "id": "MCCnumber0", "left": 0, "style": { "text": "35" } }, { "type": "text", "id": "MCCunit0", "left": 24.89599609375, "style": { "text": "CNTR" } } ] }, { "type": "group", "id": "VDL1", "children": [ { "type": "text", "id": "VDLnumber1", "left": 0, "style": { "text": "5,849" } }, { "type": "text", "id": "VDLunit1", "left": 46.59197998046875, "style": { "text": "CNTR" } } ] }, { "type": "group", "id": "CRD2", "children": [ { "type": "text", "id": "CRDnumber2", "left": 0, "style": { "text": "1, 871" } }, { "type": "text", "id": "CRDunit2", "left": 46.59197998046875, "style": { "text": "CNTR" } } ] }] }
报错后的 chart 中再次选中的legend的 stack 的区域颜色透明
legend
The text was updated successfully, but these errors were encountered:
650f4f2
No branches or pull requests
One-line summary [问题简述]
option
中只有graphic
,如果换成title
就不会出错。graphic
与其他 type 的不同,为什么要额外判断?Version & Environment [版本及环境]
Expected behaviour [期望结果]
更新指定 id 的
graphic
元素的内容。ECharts option [ECharts配置项]
Other comments [其他信息]
报错后的 chart 中再次选中的

legend
的 stack 的区域颜色透明The text was updated successfully, but these errors were encountered: