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/09/05 03:01:44 UTC
[GitHub] [echarts] han-ysys opened a new issue, #17615: [Bug] Property 'renderToSVGString' does not exist on type 'EChartsType'.
han-ysys opened a new issue, #17615:
URL: https://github.com/apache/echarts/issues/17615
### Version
5.3.3
### Link to Minimal Reproduction
_No response_
### Steps to Reproduce
我想把chart导出成pdf,查到5.3.0之后有renderToSVGString这个方法,尝试了一下
```javascript
const echartsdiv = document.getElementById('chart-for-download') as HTMLElement
chartins = echarts.init(echartsdiv, undefined, {renderer: 'svg'})
console.log('renderToSVGString', chartins.renderToSVGString())
```
### Current Behavior
vscode报错
> Property 'renderToSVGString' does not exist on type 'EChartsType'.
然而在echarts.d.ts里是能找到renderToSVGString的定义的
> renderToSVGString(opts?: {
useViewBox?: boolean;
}): string;
### Expected Behavior
希望能够得到解决
### Environment
_No response_
### 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.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 #17615: [Bug] Property 'renderToSVGString' does not exist on type 'EChartsType'.
Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #17615:
URL: https://github.com/apache/echarts/issues/17615#issuecomment-1236498457
@han-ysys 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.3.3
### Link to Minimal Reproduction
_No response_
### Steps to Reproduce
I want to export the chart to pdf. After I found 5.3.0, there is a method renderToSVGString. I tried it
````javascript
const echartsdiv = document.getElementById('chart-for-download') as HTMLElement
chartins = echarts.init(echartsdiv, undefined, {renderer: 'svg'})
console.log('renderToSVGString', chartins.renderToSVGString())
````
### Current Behavior
vscode error
> Property 'renderToSVGString' does not exist on type 'EChartsType'.
However, the definition of renderToSVGString can be found in echarts.d.ts
> renderToSVGString(opts?: {
useViewBox?: boolean;
}): string;
### Expected Behavior
hope it gets resolved
### Environment
_No response_
### 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] echarts-bot[bot] commented on issue #17615: [Bug] Property 'renderToSVGString' does not exist on type 'EChartsType'.
Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #17615:
URL: https://github.com/apache/echarts/issues/17615#issuecomment-1236513414
@han-ysys Please provide a demo for the issue either with [Official Editor](https://echarts.apache.org/examples/editor.html), [CodePen](https://codepen.io/Ovilia/pen/dyYWXWM), [CodeSandbox](https://codesandbox.io/s/echarts-basic-example-template-mpfz1s) or [JSFiddle](https://jsfiddle.net/plainheart/e46ozpqj/7/).
--
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] Ovilia commented on issue #17615: [Bug] Property 'renderToSVGString' does not exist on type 'EChartsType'.
Posted by GitBox <gi...@apache.org>.
Ovilia commented on issue #17615:
URL: https://github.com/apache/echarts/issues/17615#issuecomment-1236513346
I tested it with [test/ssr-animaiton-wave.htm](https://github.com/apache/echarts/blob/master/test/ssr-animaiton-wave.html) and it seems to be working. Please provide an online demo.
--
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] han-ysys closed issue #17615: [Bug] Property 'renderToSVGString' does not exist on type 'EChartsType'.
Posted by GitBox <gi...@apache.org>.
han-ysys closed issue #17615: [Bug] Property 'renderToSVGString' does not exist on type 'EChartsType'.
URL: https://github.com/apache/echarts/issues/17615
--
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] han-ysys commented on issue #17615: [Bug] Property 'renderToSVGString' does not exist on type 'EChartsType'.
Posted by GitBox <gi...@apache.org>.
han-ysys commented on issue #17615:
URL: https://github.com/apache/echarts/issues/17615#issuecomment-1236640318
The code itself works. It does give SVG strings. But IDE keeps whining about type errors.
After several tries with different IDE and typescript versions(4.1.6 and 4.7.3), somehow all reach an agreement. If you are interested, what I did is open the project with Webstorm, find no complaints about 'renderToSVGString', and then go back to VSCode. I noticed VScode was using TS 4.7.3 while Webstorm was using 4.1.6. So I switched it to 4.1.6. Everything goes fine now. The thing is if I switch it back to TS 4.7.3, it won't report any error.
It seemed to be just something wrong with my environment. Sorry to bother you all. Thank you!
--
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] han-ysys closed issue #17615: [Bug] Property 'renderToSVGString' does not exist on type 'EChartsType'.
Posted by GitBox <gi...@apache.org>.
han-ysys closed issue #17615: [Bug] Property 'renderToSVGString' does not exist on type 'EChartsType'.
URL: https://github.com/apache/echarts/issues/17615
--
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