Skip to content

Commit

Permalink
fix wrong SSR client hydrate target
Browse files Browse the repository at this point in the history
  • Loading branch information
plainheart committed May 8, 2024
1 parent cb0e2a5 commit 835cbd7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions contents/en/basics/release-note/5-5-0.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ The client adds the obtained SVG string to the container and binds the lightweig
<script>
const ssrClient = window['echarts-ssr-client'];
let isSeriesShown = {
const isSeriesShown = {
a: true,
b: true
};
Expand All @@ -83,7 +83,7 @@ function updateChart(svgStr) {
container.innerHTML = svgStr;
// Use lightweight runtime to give the chart interactive capabilities
ssrClient.hydrate(main, {
ssrClient.hydrate(container, {
on: {
click: (params) => {
if (params.ssrType === 'legend') {
Expand Down
4 changes: 2 additions & 2 deletions contents/en/how-to/cross-platform/server.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ Starting from version v5.5.0, if the chart only needs the following effects and
<script>
const ssrClient = window['echarts-ssr-client'];
let isSeriesShown = {
const isSeriesShown = {
a: true,
b: true
};
Expand All @@ -202,7 +202,7 @@ function updateChart(svgStr) {
container.innerHTML = svgStr;
// Use the lightweight runtime to give the chart interactive capabilities
ssrClient.hydrate(main, {
ssrClient.hydrate(container, {
on: {
click: (params) => {
if (params.ssrType === 'legend') {
Expand Down
4 changes: 2 additions & 2 deletions contents/zh/basics/release-note/5-5-0.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ res.end();
<script>
const ssrClient = window['echarts-ssr-client'];
let isSeriesShown = {
const isSeriesShown = {
a: true,
b: true
};
Expand All @@ -83,7 +83,7 @@ function updateChart(svgStr) {
container.innerHTML = svgStr;
// 使用轻量运行时赋予图表交互能力
ssrClient.hydrate(main, {
ssrClient.hydrate(container, {
on: {
click: (params) => {
if (params.ssrType === 'legend') {
Expand Down
4 changes: 2 additions & 2 deletions contents/zh/how-to/cross-platform/server.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ echarts.setPlatformAPI({
<script>
const ssrClient = window['echarts-ssr-client'];
let isSeriesShown = {
const isSeriesShown = {
a: true,
b: true
};
Expand All @@ -202,7 +202,7 @@ function updateChart(svgStr) {
container.innerHTML = svgStr;
// 使用轻量运行时赋予图表交互能力
ssrClient.hydrate(main, {
ssrClient.hydrate(container, {
on: {
click: (params) => {
if (params.ssrType === 'legend') {
Expand Down

0 comments on commit 835cbd7

Please sign in to comment.