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 2020/06/29 02:53:08 UTC

[incubator-echarts-doc] branch live-example updated: example: make font local.

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

shenyi pushed a commit to branch live-example
in repository https://gitbox.apache.org/repos/asf/incubator-echarts-doc.git


The following commit(s) were added to refs/heads/live-example by this push:
     new 6c161e4  example: make font local.
6c161e4 is described below

commit 6c161e4262e0051ff2fc0d733a8909e85859b4ae
Author: pissang <bm...@gmail.com>
AuthorDate: Mon Jun 29 10:52:54 2020 +0800

    example: make font local.
---
 src/App.vue                           |   9 ++++++++-
 src/asset/SourceCodePro-Regular.woff  | Bin 0 -> 89796 bytes
 src/asset/SourceCodePro-Regular.woff2 | Bin 0 -> 62136 bytes
 src/components/DocContentItemCard.vue |   2 +-
 src/components/DocNav.vue             |   2 +-
 src/components/LiveExample.vue        |   3 ++-
 src/style/mixin.scss                  |   4 ++--
 zh/option/series/bar.md               |  32 ++++++++++++++------------------
 zh/option/series/gauge.md             |   4 ++--
 zh/option/series/pie.md               |  15 +++++++--------
 10 files changed, 37 insertions(+), 34 deletions(-)

diff --git a/src/App.vue b/src/App.vue
index 4edf29d..72dcb8c 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -71,7 +71,7 @@ export default {
 <style lang="scss">
 
 // @import url('https://fonts.googleapis.com/css?family=Montserrat&display=swap');
-@import url('https://fonts.googleapis.com/css?family=Source+Code+Pro&display=swap');
+// @import url('https://fonts.googleapis.com/css?family=Source+Code+Pro&display=swap');
 
 @font-face {
   font-family: 'iconfont';
@@ -84,6 +84,13 @@ export default {
   font-style: normal;
   font-display: block;
 }
+@font-face {
+  font-family: 'Source Code Pro';
+  font-style: normal;
+  font-weight: 400;
+  font-display: swap;
+  src: url('./asset/SourceCodePro-Regular.woff') format('woff');
+}
 
 .ec-doc {
     // font-family: "Helvetica Neue", "Segoe UI", Arial, "PingFang SC", STHeiti, "Microsoft Yahei", sans-serif;
diff --git a/src/asset/SourceCodePro-Regular.woff b/src/asset/SourceCodePro-Regular.woff
new file mode 100644
index 0000000..4c18af4
Binary files /dev/null and b/src/asset/SourceCodePro-Regular.woff differ
diff --git a/src/asset/SourceCodePro-Regular.woff2 b/src/asset/SourceCodePro-Regular.woff2
new file mode 100644
index 0000000..d613ba2
Binary files /dev/null and b/src/asset/SourceCodePro-Regular.woff2 differ
diff --git a/src/components/DocContentItemCard.vue b/src/components/DocContentItemCard.vue
index 505621e..e2bfbbb 100644
--- a/src/components/DocContentItemCard.vue
+++ b/src/components/DocContentItemCard.vue
@@ -249,7 +249,7 @@ $hierarchy-guider-color: #C592A0;
         padding: 0;
 
         // font-family: Montserrat, sans-serif;
-        font-family: Monaco, 'Source Code Pro', monospace;
+        font-family: 'Source Code Pro', monospace;
 
         &>* {
             vertical-align: bottom;
diff --git a/src/components/DocNav.vue b/src/components/DocNav.vue
index dfdfc7d..35f50d1 100644
--- a/src/components/DocNav.vue
+++ b/src/components/DocNav.vue
@@ -277,7 +277,7 @@ export default {
     }
 
     .doc-nav-item {
-        font-family: Monaco,'Source Code Pro', monospace;
+        font-family: 'Source Code Pro', monospace;
         font-size: 13px;
         white-space: nowrap;
 
diff --git a/src/components/LiveExample.vue b/src/components/LiveExample.vue
index 85dde0a..02fbec5 100644
--- a/src/components/LiveExample.vue
+++ b/src/components/LiveExample.vue
@@ -393,7 +393,8 @@ export default {
                 .CodeMirror-scroll {
                     padding: 15px;
                 }
-                // font-family: Monaco, 'Source Code Pro', monospace;
+                font-family: 'Source Code Pro', monospace;
+                font-size: 13px;
 
                 ::-webkit-scrollbar-thumb {
                     width: 8px;
diff --git a/src/style/mixin.scss b/src/style/mixin.scss
index 5836cdd..4cdd957 100644
--- a/src/style/mixin.scss
+++ b/src/style/mixin.scss
@@ -63,7 +63,7 @@
     }
 
     code *, code {
-        font-family: Monaco, 'Source Code Pro', 'Courier New', monospace;
+        font-family: 'Source Code Pro', 'Courier New', monospace;
     }
 
     ol {
@@ -80,6 +80,6 @@
     }
 
     a {
-        font-family: Monaco,'Source Code Pro', STHeiti, "Microsoft Yahei", "WenQuanYi Micro Hei", sans-serif;
+        font-family: 'Source Code Pro', STHeiti, "Microsoft Yahei", "WenQuanYi Micro Hei", sans-serif;
     }
 }
diff --git a/zh/option/series/bar.md b/zh/option/series/bar.md
index d1b169f..1fc2066 100644
--- a/zh/option/series/bar.md
+++ b/zh/option/series/bar.md
@@ -10,17 +10,15 @@
 <ExampleBaseOption name="cartesian-bar" title="直角坐标系上的柱状图">
 const option = {
     tooltip: {},
-    legend: {
-        data:['销量']
-    },
+    legend: {},
     xAxis: {
-        data: ["衬衫","羊毛衫","雪纺衫","裤子","高跟鞋","袜子"]
+        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
     },
     yAxis: {},
     series: [{
-        name: '销量',
+        name: 'Sale',
         type: 'bar',
-        data: [5, 20, 36, 10, 10, 20]
+        data: [5, 20, 36, 10, 10, 20, 4]
     }]
 };
 </ExampleBaseOption>
@@ -32,26 +30,24 @@ const option = {
     },
     radiusAxis: {
         type: 'category',
-        data: ["衬衫","羊毛衫","雪纺衫","裤子","高跟鞋","袜子"],
+        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
         z: 10
     },
     polar: {},
     series: [{
-        name: '销量',
+        name: 'Sale',
         type: 'bar',
-        data: [5, 20, 36, 10, 10, 20],
+        data: [5, 20, 36, 10, 10, 20, 4],
         coordinateSystem: 'polar'
     }],
-    legend: {
-        data: ['销量']
-    },
+    legend: {},
 };
 </ExampleBaseOption>
 
 <ExampleBaseOption name="cartesian-bar-multiple-series" title="直角坐标系上的多系列柱状图">
 option = {
     legend: {
-        data: ['直接访问', '联盟广告', '搜索引擎']
+        data: ['Food', 'Cloth', 'Book']
     },
     grid: {
         left: '3%',
@@ -61,24 +57,24 @@ option = {
     },
     xAxis: {
         type: 'category',
-        data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
+        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
     },
     yAxis: {
         type: 'value'
     },
     series: [
         {
-            name: '直接访问',
+            name: 'Food',
             type: 'bar',
             data: [320, 302, 301, 334, 390, 330, 320]
         },
         {
-            name: '视频广告',
+            name: 'Cloth',
             type: 'bar',
             data: [150, 212, 201, 154, 190, 330, 410]
         },
         {
-            name: '搜索引擎',
+            name: 'Book',
             type: 'bar',
             data: [820, 832, 901, 934, 1290, 1330, 1320]
         }
@@ -135,7 +131,7 @@ option = {
 ## showBackground(boolean) = false
 {{ use: partial-version(version = "4.7.0") }}
 
-<ExampleUIControlBoolean />
+<ExampleUIControlBoolean clean="true" />
 
 是否显示柱条的背景色。通过 [backgroundStyle](~series-bar.backgroundStyle) 配置背景样式。
 
diff --git a/zh/option/series/gauge.md b/zh/option/series/gauge.md
index 5914105..455e873 100644
--- a/zh/option/series/gauge.md
+++ b/zh/option/series/gauge.md
@@ -12,10 +12,10 @@
 const option = {
     series: [
         {
-            name: '业务指标',
+            name: 'Indicator',
             type: 'gauge',
             detail: {formatter: '{value}%'},
-            data: [{value: 50, name: '完成率'}]
+            data: [{value: 50, name: 'Percent'}]
         }
     ]
 };
diff --git a/zh/option/series/pie.md b/zh/option/series/pie.md
index 405d0b6..5310713 100644
--- a/zh/option/series/pie.md
+++ b/zh/option/series/pie.md
@@ -22,18 +22,17 @@ const option = {
     legend: {
         orient: 'vertical',
         left: 'left',
-        data: ['直接访问', '邮件营销', '联盟广告', '视频广告', '搜索引擎']
+        data: ['Apple', 'Grapes', 'Pineapples', 'Oranges', 'Bananas']
     },
     series: [
         {
-            name: '访问来源',
             type: 'pie',
             data: [
-                {value: 335, name: '直接访问'},
-                {value: 310, name: '邮件营销'},
-                {value: 234, name: '联盟广告'},
-                {value: 135, name: '视频广告'},
-                {value: 1548, name: '搜索引擎'}
+                {value: 335, name: 'Apple'},
+                {value: 310, name: 'Grapes'},
+                {value: 234, name: 'Pineapples'},
+                {value: 135, name: 'Oranges'},
+                {value: 1548, name: 'Bananas'}
             ]
         }
     ]
@@ -76,7 +75,7 @@ const option = {
 
 ## clockwise(boolean) = true
 
-<ExampleUIControlBoolean />
+<ExampleUIControlBoolean default="true" />
 
 饼图的扇区是否是顺时针排布。
 


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