This is an automated email from the ASF dual-hosted git repository.
wangzx pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/echarts-handbook.git
The following commit(s) were added to refs/heads/master by this push:
new 059dbde const -> let
059dbde is described below
commit 059dbde261c87d64d60bfe44c3461eccf795353b
Author: plainheart <[email protected]>
AuthorDate: Tue Feb 27 20:46:35 2024 +0800
const -> let
---
contents/en/basics/release-note/5-5-0.md | 2 +-
contents/en/how-to/cross-platform/server.md | 8 ++++----
contents/zh/basics/release-note/5-5-0.md | 2 +-
contents/zh/how-to/cross-platform/server.md | 4 ++--
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/contents/en/basics/release-note/5-5-0.md
b/contents/en/basics/release-note/5-5-0.md
index c8f427a..0c0357a 100644
--- a/contents/en/basics/release-note/5-5-0.md
+++ b/contents/en/basics/release-note/5-5-0.md
@@ -37,7 +37,7 @@ If you need to use this solution, the server-side code
remains the same, but you
const echarts = require('echarts');
// In SSR mode the first container parameter is not required
-const chart = echarts.init(null, null, {
+let chart = echarts.init(null, null, {
renderer: 'svg', // must use SVG rendering mode
ssr: true, // enable SSR
width: 400, // need to specify height and width
diff --git a/contents/en/how-to/cross-platform/server.md
b/contents/en/how-to/cross-platform/server.md
index 5a0018a..02f87c0 100644
--- a/contents/en/how-to/cross-platform/server.md
+++ b/contents/en/how-to/cross-platform/server.md
@@ -32,7 +32,7 @@ We introduced a new zero-dependency server-side string based
SVG rendering solut
const echarts = require('echarts');
// In SSR mode the first container parameter is not required
-const chart = echarts.init(null, null, {
+let chart = echarts.init(null, null, {
renderer: 'svg', // must use SVG rendering mode
ssr: true, // enable SSR
width: 400, // need to specify height and width
@@ -47,7 +47,7 @@ chart.setOption({
// Output a string
const svgStr = chart.renderToSVGString();
-// If chart is no longer useful, consider dispose it to release memory.
+// If chart is no longer useful, consider disposing it to release memory.
chart.dispose();
chart = null;
```
@@ -108,7 +108,7 @@ echarts.setCanvasCreator(() => {
const canvas = createCanvas(800, 600);
// ECharts can use the Canvas instance created by node-canvas as a container
directly
-const chart = echarts.init(canvas);
+let chart = echarts.init(canvas);
// setOption as normal
chart.setOption({
@@ -117,7 +117,7 @@ chart.setOption({
const buffer = renderChart().toBuffer('image/png');
-// If chart is no longer useful, consider dispose it to release memory.
+// If chart is no longer useful, consider disposing it to release memory.
chart.dispose();
chart = null;
diff --git a/contents/zh/basics/release-note/5-5-0.md
b/contents/zh/basics/release-note/5-5-0.md
index 142db31..2f603f0 100644
--- a/contents/zh/basics/release-note/5-5-0.md
+++ b/contents/zh/basics/release-note/5-5-0.md
@@ -37,7 +37,7 @@ Apache ECharts 功能强大,相应地,包体积也比较大。我们在之
const echarts = require('echarts');
// 在 SSR 模式下第一个参数不需要再传入 DOM 对象
-const chart = echarts.init(null, null, {
+let chart = echarts.init(null, null, {
renderer: 'svg', // 必须使用 SVG 模式
ssr: true, // 开启 SSR
width: 400, // 需要指明高和宽,如果是根据客户端容器大小动态的,该值需要从客户端得到
diff --git a/contents/zh/how-to/cross-platform/server.md
b/contents/zh/how-to/cross-platform/server.md
index 470788b..cc271b4 100644
--- a/contents/zh/how-to/cross-platform/server.md
+++ b/contents/zh/how-to/cross-platform/server.md
@@ -32,7 +32,7 @@
const echarts = require('echarts');
// 在 SSR 模式下第一个参数不需要再传入 DOM 对象
-const chart = echarts.init(null, null, {
+let chart = echarts.init(null, null, {
renderer: 'svg', // 必须使用 SVG 模式
ssr: true, // 开启 SSR
width: 400, // 需要指明高和宽
@@ -108,7 +108,7 @@ echarts.setCanvasCreator(() => {
const canvas = createCanvas(800, 600);
// ECharts 可以直接使用 node-canvas 创建的 Canvas 实例作为容器
-const chart = echarts.init(canvas);
+let chart = echarts.init(canvas);
// 像正常使用一样 setOption
chart.setOption({
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]