You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by wa...@apache.org on 2021/04/21 09:20:27 UTC

[echarts-examples] branch fix-gl-bmap created (now 8946be9)

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

wangzx pushed a change to branch fix-gl-bmap
in repository https://gitbox.apache.org/repos/asf/echarts-examples.git.


      at 8946be9  fix(gl): 1) fix some examples depends on bmap can't work. 2) fix chart panel has no right and bottom padding. 3) update BMap API version to v3.0, which is also compatible with v2.0.

This branch includes the following new commits:

     new 8946be9  fix(gl): 1) fix some examples depends on bmap can't work. 2) fix chart panel has no right and bottom padding. 3) update BMap API version to v3.0, which is also compatible with v2.0.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


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


[echarts-examples] 01/01: fix(gl): 1) fix some examples depends on bmap can't work. 2) fix chart panel has no right and bottom padding. 3) update BMap API version to v3.0, which is also compatible with v2.0.

Posted by wa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

wangzx pushed a commit to branch fix-gl-bmap
in repository https://gitbox.apache.org/repos/asf/echarts-examples.git

commit 8946be94bf966ea8785e2cbcb5a60388329c2a78
Author: plainheart <yh...@all-my-life.cn>
AuthorDate: Wed Apr 21 17:13:20 2021 +0800

    fix(gl): 1) fix some examples depends on bmap can't work.
    2) fix chart panel has no right and bottom padding.
    3) update BMap API version to v3.0, which is also compatible with v2.0.
---
 src/data/chart-list-data-gl.js |  8 ++++++--
 src/editor/Preview.vue         | 13 ++++++++++---
 2 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/src/data/chart-list-data-gl.js b/src/data/chart-list-data-gl.js
index dfa4912..0e42313 100644
--- a/src/data/chart-list-data-gl.js
+++ b/src/data/chart-list-data-gl.js
@@ -129,7 +129,9 @@ export default [
       "flowGL"
     ],
     "id": "global-wind-visualization",
-    "tags": [],
+    "tags": [
+      "bmap"
+    ],
     "title": "Global wind visualization",
     "titleCN": "Global wind visualization",
     "difficulty": 10
@@ -139,7 +141,9 @@ export default [
       "flowGL"
     ],
     "id": "global-wind-visualization-2",
-    "tags": [],
+    "tags": [
+      "bmap"
+    ],
     "title": "Global Wind Visualization 2",
     "titleCN": "Global Wind Visualization 2",
     "difficulty": 10
diff --git a/src/editor/Preview.vue b/src/editor/Preview.vue
index 7363ce8..7903283 100644
--- a/src/editor/Preview.vue
+++ b/src/editor/Preview.vue
@@ -4,7 +4,9 @@
         class="right-panel"
         id="chart-panel"
         :style="{background: backgroundColor}"
-    ></div>
+    >
+        <div class="chart-container"></div>
+    </div>
     <div id="tool-panel">
         <div class="left-panel">
             <el-switch
@@ -109,7 +111,7 @@ export function ensureECharts() {
             SCRIPT_URLS.echartsStatMinJS,
             ...URL_PARAMS.gl ? [SCRIPT_URLS.echartsGLMinJS] : [],
             ...hasBmap ? [
-                'https://api.map.baidu.com/getscript?v=2.0&ak=KOmVjPVUAey1G2E8zNhPiuQ6QiEmAwZu&services=&t=20200327103013',
+                'https://api.map.baidu.com/getscript?v=3.0&ak=KOmVjPVUAey1G2E8zNhPiuQ6QiEmAwZu&services=&t=20200327103013',
                 SCRIPT_URLS.echartsDir + '/dist/extension/bmap.js'
             ] : []
         ]).then(() => {
@@ -147,7 +149,7 @@ function run() {
     }
 
     try {
-        const updateTime = this.sandbox.run(this.$el.querySelector('#chart-panel'), store);
+        const updateTime = this.sandbox.run(this.$el.querySelector('.chart-container'), store);
 
         log(this.$t('editor.chartOK') + updateTime + 'ms');
 
@@ -322,6 +324,11 @@ export default {
             border: 1px solid red!important;
         }
     }
+
+    .chart-container {
+        position: relative;
+        height: 100%;
+    }
 }
 
 .render-config-container {

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