Conversation
chore: update download links in announcement email template
Merge release to master
|
Thanks for your contribution! The pull request is marked to be Document changes are required in this PR. Please also make a PR to apache/echarts-doc for document changes and update the issue id in the PR description. When the doc PR is merged, the maintainers will remove the |
plainheart
reviewed
Oct 15, 2021
plainheart
reviewed
Oct 15, 2021
Member
plainheart
left a comment
There was a problem hiding this comment.
Found deprecated call for getRenderedCanvas
Line 821 in b14b885
Contributor
Author
|
@plainheart Fixed |
plainheart
approved these changes
Oct 15, 2021
|
Congratulations! Your PR has been merged. Thanks for your contribution! 👍 |
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brief Information
This pull request is in the type of:
What does this PR do?
zrender introduces a brand new SVG renderer to support pure server-side rendering without dependencies of JSDOM and node-canvas. See the PR ecomfe/zrender#836.
This PR updates the zrender to the latest nightly version to use this new SVG renderer and introduces a new SSR mode to support rendering to SVG string without JSDOM and node-canvas.
In this new mode, the render speed is faster because we don't have to simulate the dom environment, the generated SVG string is smaller because we can do more optimizations based on the vnode, and there are more features that can be supported like CSS animation.
Usage
Sceneraios
SSR can be used in the scene that needs the chart to be displayed as fast as possible. Just like the server-side rendering in the vue and react.
The generated SVG will use CSS animation to play the basic enter animation when displayed. But user interaction is not available(perhaps we can support hover highlight with CSS in further times). We need to create a chart and
setOptionon the container again to have more rich user interactions, which is so-called hydration in the frameworks supporting SSR. This step is not integrated in echarts, you need to manage it in your project, or let wrappers likevue-echartsdo it.Limitations
Animation
Because of the limitation of CSS animation, which is not as flexible as JS animation. Animation of some series will be disabled or changed. For example, pie charts will use a very basic scale animation.
Font
Because NodeJS doesn't have the ability to measure text. It's better to use the default font in the server to have a correct layout. If you wan't to use a different font, especially the font glyph is very different from the default font, use
echarts.setCanvasCreatorto letnode-canvasto measure the text is a better choice. Or use new addedecharts.setPlatformAPIfrom ecomfe/zrender#840Misc
Other changes
echarts.setPlatformAPIexposed directly from zrender. More detail of this method can be seen in feat: new setPlatformAPI method ecomfe/zrender#840getRenderedCanvasis replaced byrenderToCanvasto be more consistent with the newrenderToSVGStringAPI