-
Notifications
You must be signed in to change notification settings - Fork 19.7k
New issue
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
fix(ssr): fix label doesn't show in line series when ssr
is enabled
#18032
Conversation
Thanks for your contribution! The pull request is marked to be |
@@ -644,7 +644,7 @@ class LineView extends ChartView { | |||
|
|||
const lineGroup = this._lineGroup; | |||
|
|||
const hasAnimation = seriesModel.get('animation'); | |||
const hasAnimation = !ecModel.ssr && seriesModel.isAnimationEnabled(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seriesModel.isAnimationEnabled
should have considerd ecModel.ssr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But it requires env.node
. https://github.com/apache/echarts/blob/master/src/model/Series.ts#L469
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Understand, we tried to fix the issue by disabling the animation in SSR mode.
Congratulations! Your PR has been merged. Thanks for your contribution! 👍 |
服务端nodeJs渲染图片,折线图数值未显示。 依赖: 测试数据: |
一样 字体在SVG中渲染了 但是fill-opacity被设置为0 |
@wcccode 你这种使用 canvas 绘制的情况,还需要禁用动画。设置 |
我发现为什么了 1.设置ssr=true 2.调用renderSvg()方法而不是使用JSDom调用outerHTML |
嗯,如果用 SVG 渲染,直接使用 chart.renderToSVGString() 即可,也不需要显式设置 animation: false。也可以参考这篇教程。SVG 的 SSR 是默认支持高亮和动画的,不想用也可以手动禁用。 |
Brief Information
This pull request is in the type of:
What does this PR do?
line
series whenssr
is enabled.seriesDalay
->seriesDelay
Fixed issues
Comparison
Document Info
One of the following should be checked.
Misc
ZRender Changes
Related test cases or examples to use the new APIs
N.A.
Others
Merging options
Other information