You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by sh...@apache.org on 2021/06/02 16:13:40 UTC

[echarts-handbook] branch master updated: use live syntax

This is an automated email from the ASF dual-hosted git repository.

shenyi 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 42f0239  use live syntax
42f0239 is described below

commit 42f023968211fe2159e0ae2104f87514dc0681c7
Author: pissang <bm...@gmail.com>
AuthorDate: Thu Jun 3 00:13:26 2021 +0800

    use live syntax
---
 .../zh/application/chart-types/line/area-line.md     |  4 ++--
 .../zh/application/chart-types/line/basic-line.md    | 20 ++++++++++----------
 .../zh/application/chart-types/line/smooth-line.md   |  4 ++--
 .../zh/application/chart-types/line/stacked-line.md  | 10 ++++------
 .../zh/application/chart-types/line/step-line.md     |  4 ++--
 contents/zh/best-practice/design/color-enhance.md    |  4 ++--
 6 files changed, 22 insertions(+), 24 deletions(-)

diff --git a/contents/zh/application/chart-types/line/area-line.md b/contents/zh/application/chart-types/line/area-line.md
index fa8421f..41b73b1 100644
--- a/contents/zh/application/chart-types/line/area-line.md
+++ b/contents/zh/application/chart-types/line/area-line.md
@@ -2,7 +2,7 @@
 
 区域面积折线图将折线到坐标轴的空间设置背景色,用区域面积表达数据。相比普通的折线图,区域面积折线图的视觉效果更加饱满丰富,在系列不多的场景下尤其适用。
 
-<md-live>
+```js [live]
 option = {
     xAxis: {
         data: ['A', 'B', 'C', 'D', 'E']
@@ -21,6 +21,6 @@ option = {
         }
     }]
 };
-</md-live>
+```
 
 通过 [`areaStyle`](${optionPath}series-line.areaStyle) 设置折线图的填充区域样式,将其设为为 `{}` 表示使用默认样式,即使用系列的颜色以半透明的方式填充区域。如果想指定特定的样式,可以通过设置 `areaStyle` 下的配置项覆盖,如第二个系列将填充区域的颜色设为不透明度为 0.5 的黄色。
diff --git a/contents/zh/application/chart-types/line/basic-line.md b/contents/zh/application/chart-types/line/basic-line.md
index 7f24b51..9d4abb5 100644
--- a/contents/zh/application/chart-types/line/basic-line.md
+++ b/contents/zh/application/chart-types/line/basic-line.md
@@ -6,7 +6,7 @@
 
 如果我们想建立一个横坐标是类目型(category)、纵坐标是数值型(value)的折线图,我们可以使用这样的方式:
 
-<md-live>
+```js [live]
 option = {
     xAxis: {
         type: 'category',
@@ -20,7 +20,7 @@ option = {
         type: 'line'
     }]
 };
-</md-live>
+```
 
 在这个例子中,我们通过 `xAxis` 将横坐标设为类目型,并指定了对应的值;通过 `type` 将 `yAxis` 的类型设定为数值型。在 `series` 中,我们将系列类型设为 `line`,并且通过 `data` 指定了折线图三个点的取值。这样,就能得到一个最简单的折线图了。
 
@@ -31,7 +31,7 @@ option = {
 
 如果我们希望折线图在横坐标和纵坐标上都是连续的,即在笛卡尔坐标系中,应该如何实现呢?答案也很简单,只要把 `series` 的 `data` 每个数据用一个包含两个元素的数组表示就行了。
 
-<md-live>
+```js [live]
 option = {
     xAxis: {},
     yAxis: {},
@@ -40,7 +40,7 @@ option = {
         type: 'line'
     }]
 };
-</md-live>
+```
 
 
 ## 折线图样式设置
@@ -49,7 +49,7 @@ option = {
 
 折线图中折线的样式可以通过 `lineStyle` 设置。可以为其指定颜色、线宽、折线类型、阴影、不透明度等等,具体的可以参考配置项手册 [`series.lineStyle`](${optionPath}series-line.lineStyle) 了解。这里,我们以设置颜色(color)、线宽(width)和折线类型(type)为例说明。
 
-<md-live>
+```js [live]
 option = {
     xAxis: {
         data: ['A', 'B', 'C', 'D', 'E']
@@ -67,7 +67,7 @@ option = {
         }
     }]
 };
-</md-live>
+```
 
 这里设置折线宽度时,数据点描边的宽度是不会跟着改变的,而应该在数据点的配置项中另外设置。
 
@@ -80,7 +80,7 @@ option = {
 
 在系列中,这数据点的标签通过 [`series.label`](${optionPath}series-line.label) 属性指定。如果将 `label` 下的 `show` 指定为`true`,则表示该数值默认时就显示;如果为 `false`,而 [`series.emphasis.label.show`](${optionPath}series-line.emphasis.label.show) 为 `true`,则表示只有在鼠标移动到该数据时,才显示数值。
 
-<md-live>
+```js [live]
 option = {
     xAxis: {
         data: ['A', 'B', 'C', 'D', 'E']
@@ -98,7 +98,7 @@ option = {
         }
     }]
 };
-</md-live>
+```
 
 
 ## 空数据
@@ -107,7 +107,7 @@ option = {
 
 在 ECharts 中,我们使用字符串 `'-'` 表示空数据,这对其他系列的数据也是适用的。
 
-<md-live>
+```js [live]
 option = {
     xAxis: {
         data: ['A', 'B', 'C', 'D', 'E']
@@ -118,6 +118,6 @@ option = {
         type: 'line'
     }]
 };
-</md-live>
+```
 
 > 注意区别这个例子中,“空”数据与取值为 0 的数据。
diff --git a/contents/zh/application/chart-types/line/smooth-line.md b/contents/zh/application/chart-types/line/smooth-line.md
index c29f6cc..47d70d7 100644
--- a/contents/zh/application/chart-types/line/smooth-line.md
+++ b/contents/zh/application/chart-types/line/smooth-line.md
@@ -2,7 +2,7 @@
 
 平滑曲线图也是折线图的一种变形,这种更柔和的样式也是一种不错的视觉选择。使用时,只需要将折线图系列的 `smooth` 属性设置为 `true` 即可。
 
-<md-live>
+```js [live]
 option = {
     xAxis: {
         data: ['A', 'B', 'C', 'D', 'E']
@@ -14,4 +14,4 @@ option = {
         smooth: true
     }]
 };
-</md-live>
+```
diff --git a/contents/zh/application/chart-types/line/stacked-line.md b/contents/zh/application/chart-types/line/stacked-line.md
index 843f45f..9176c91 100644
--- a/contents/zh/application/chart-types/line/stacked-line.md
+++ b/contents/zh/application/chart-types/line/stacked-line.md
@@ -2,8 +2,7 @@
 
 与[堆叠柱状图](./zh/application_chart-types_bar_stacked-bar)类似,堆叠折线图也是用系列的 `stack` 设置哪些系列堆叠在一起。
 
-<!-- embed -->
-<md-live>
+```js [live]
 option = {
     xAxis: {
         data: ['A', 'B', 'C', 'D', 'E']
@@ -19,12 +18,11 @@ option = {
         stack: 'x'
     }]
 };
-</md-live>
+```
 
 但是不同的是,如果不加说明的话,我们很难判断出这是一个堆叠折线图,还是一个普通的折线图。所以,对于堆叠折线图而言,一般建议使用区域填充色以表明堆叠的情况。
 
-<!-- embed -->
-<md-live>
+```js [live]
 option = {
     xAxis: {
         data: ['A', 'B', 'C', 'D', 'E']
@@ -42,4 +40,4 @@ option = {
         areaStyle: {}
     }]
 };
-</md-live>
+```
diff --git a/contents/zh/application/chart-types/line/step-line.md b/contents/zh/application/chart-types/line/step-line.md
index ad73928..5ef3164 100644
--- a/contents/zh/application/chart-types/line/step-line.md
+++ b/contents/zh/application/chart-types/line/step-line.md
@@ -4,7 +4,7 @@
 
 在 ECharts 中,系列的 `step` 属性用来表征阶梯线图的连接类型,它共有三种取值:`'start'`、`'middle'` 和 `'end'`,分别表示在当前点,当前点与下个点的中间点,下个点拐弯。
 
-<md-live>
+```js [live]
 option = {
     xAxis: {
         type: 'category',
@@ -32,6 +32,6 @@ option = {
         data: [450, 432, 401, 454, 590, 530, 510]
     }]
 };
-</md-live>
+```
 
 > 请注意这个例子中不同的 `step` 取值对应的数据点和连线的区别。
diff --git a/contents/zh/best-practice/design/color-enhance.md b/contents/zh/best-practice/design/color-enhance.md
index 135d054..c366859 100644
--- a/contents/zh/best-practice/design/color-enhance.md
+++ b/contents/zh/best-practice/design/color-enhance.md
@@ -30,7 +30,7 @@
 
 视觉效果应该尽可能容易地解释,因此请尝试找到与观众的先入为主和文化联想相匹配的配色方案。如下示例中展示了猕猴桃、香蕉、橙子、草莓四种水果的销售数据,分别选择了与水果本身一致的颜色绿色、黄色、橙色、红色。这样,我们在辨别和记忆每个柱状所对应的水果时就轻而易举了。
 
-<md-live editor-height="400px">
+```js [live]
 option = {
     color: ["#6E9D4E", "#EDDB4F","#F7923A", "#F14747" ],
     title: {
@@ -84,7 +84,7 @@ option = {
         data: [110, 190, 90, 100]
     }]
 };
-</md-live>
+```
 
 ## 图表颜色要吻合常识
 

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org