You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2022/01/07 02:47:40 UTC
[GitHub] [echarts] lyp000119 opened a new issue #16337: [Bug] must init on canvas if it is used as texture.
lyp000119 opened a new issue #16337:
URL: https://github.com/apache/echarts/issues/16337
### Version
5.1.1
### Link to Minimal Reproduction
_No response_
### Steps to Reproduce
// context 为 ifram 对象
const chart = init(
context.document.getElementById(echartsId),
'default',
);
const canvas = context.document.createElement('canvas');
const myChart1 = init(canvas, 'default', {
width: 4096,
height: 2048,
});
myChart1.setOption(newOptions);
let worldOptions = this.getWorldOptions({
...,
globe: {
baseTexture: myChart1,
left: 'center',
globeRadius: 150,
displacementScale: 0,
environment: 'none',
shading: 'color',
viewControl: {
distance: 240,
// autoRotate: true
},
},
});
chart.setOption(Object.assign({}, worldOptions), true);
### Current Behavior

我在ifram里面创建了一个div作为echarts的实例,然后获取到ifram里面的document去创建一个canvas去当做baseTexture的参数,就会出现这种错误,打印了一下,canvas正常创建成功了,为什么还会出现图片上的这个问题呢?
### Expected Behavior
期望能在ifram里面能够正常使用
### Environment
```markdown
- OS: macOS 12.0.1
- Browser: Chrome 96.0.4664.110(正式版本) (x86_64)
- Framework: "react": "^17.0.1",
```
### Any additional comments?
_No response_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] echarts-bot[bot] commented on issue #16337: [Bug] must init on canvas if it is used as texture.
Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #16337:
URL: https://github.com/apache/echarts/issues/16337#issuecomment-1007097509
@lyp000119 It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗
<details><summary><b>TRANSLATED</b></summary><br>
**BODY**
### Version
5.1.1
### Link to Minimal Reproduction
_No response_
### Steps to Reproduce
// context is the ifram object
const chart = init(
context.document.getElementById(echartsId),
'default',
);
const canvas = context.document.createElement('canvas');
const myChart1 = init(canvas,'default', {
width: 4096,
height: 2048,
});
myChart1.setOption(newOptions);
let worldOptions = this.getWorldOptions({
...,
globe: {
baseTexture: myChart1,
left:'center',
globeRadius: 150,
displacementScale: 0,
environment:'none',
shading:'color',
viewControl: {
distance: 240,
// autoRotate: true
},
},
});
chart.setOption(Object.assign({}, worldOptions), true);
### Current Behavior

I created a div in ifram as an instance of echarts, and then obtained the document in ifram to create a canvas as a parameter of baseTexture. This kind of error would appear. After printing it, the canvas was successfully created normally, why is it still Does this problem appear on the picture?
### Expected Behavior
Hope it can be used normally in ifram
### Environment
```markdown
-OS: macOS 12.0.1
-Browser: Chrome 96.0.4664.110 (official version) (x86_64)
-Framework: "react": "^17.0.1",
```
### Any additional comments?
_No response_
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] lyp000119 closed issue #16337: [Bug] must init on canvas if it is used as texture.
Posted by GitBox <gi...@apache.org>.
lyp000119 closed issue #16337:
URL: https://github.com/apache/echarts/issues/16337
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] lyp000119 commented on issue #16337: [Bug] must init on canvas if it is used as texture.
Posted by GitBox <gi...@apache.org>.
lyp000119 commented on issue #16337:
URL: https://github.com/apache/echarts/issues/16337#issuecomment-1015236557
???
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org