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/04/15 10:58:10 UTC

[echarts-examples] branch gh-pages updated: update option keywords

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

shenyi pushed a commit to branch gh-pages
in repository https://gitbox.apache.org/repos/asf/echarts-examples.git


The following commit(s) were added to refs/heads/gh-pages by this push:
     new 6fffa18  update option keywords
6fffa18 is described below

commit 6fffa18b193553e5ed154323b0bd6dcc48c849cd
Author: pissang <bm...@gmail.com>
AuthorDate: Thu Apr 15 18:56:06 2021 +0800

    update option keywords
---
 src/data/option-keywords.js |  6 ++++--
 src/editor/CodeAce.vue      | 12 ++++++------
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/src/data/option-keywords.js b/src/data/option-keywords.js
index 0d99391..3a2edfe 100644
--- a/src/data/option-keywords.js
+++ b/src/data/option-keywords.js
@@ -2,5 +2,7 @@
 // THIS FILE IS GENERATED, DON'T MODIFY */
 
 /* eslint-disable  */
-export const keywords = {"grid": 108210,"series": 1161721,"pie": 173151,"legend": 278319,"right": 12224,"tooltip": 188049,"xAxis": 374619,"bar": 182040,"label": 163527,"emphasis": 50000,"formatter": 62138,"line": 306801,"data": 232156,"left": 24464,"top": 18094,"scatter": 48954,"type": 92134,"yAxis": 238764,"axisLabel": 73604,"legendHoverLink": 14243,"textStyle": 129159,"hoverAnimation": 9062,"dataZoom": 90999,"nameLocation": 15800,"nameTextStyle": 30596,"nameGap": 14640,"singleAxis": 15 [...]
-export const fullKeywordsList = ["0","1","title","show","text","link","target","textStyle","color","fontStyle","fontWeight","fontFamily","fontSize","textAlign","textBaseline","subtext","sublink","subtarget","subtextStyle","padding","itemGap","zlevel","z","left","top","right","bottom","backgroundColor","borderColor","borderWidth","shadowBlur","shadowColor","shadowOffsetX","shadowOffsetY","legend","width","height","orient","align","itemWidth","itemHeight","formatter","selectedMode","inacti [...]
\ No newline at end of file
+export const keywords = [{"name":"color","count":1835},{"name":"shadowColor","count":1770},{"name":"shadowBlur","count":1770},{"name":"shadowOffsetX","count":1770},{"name":"shadowOffsetY","count":1770},{"name":"borderColor","count":1451},{"name":"borderWidth","count":1450},{"name":"width","count":1411},{"name":"borderType","count":1385},{"name":"borderDashOffset","count":1373},{"name":"height","count":1120},{"name":"backgroundColor","count":1111},{"name":"fontSize","count":1098},{"name": [...]
+
+// export const keywords = {"grid": 108210,"series": 1161721,"pie": 173151,"legend": 278319,"right": 12224,"tooltip": 188049,"xAxis": 374619,"bar": 182040,"label": 163527,"emphasis": 50000,"formatter": 62138,"line": 306801,"data": 232156,"left": 24464,"top": 18094,"scatter": 48954,"type": 92134,"yAxis": 238764,"axisLabel": 73604,"legendHoverLink": 14243,"textStyle": 129159,"hoverAnimation": 9062,"dataZoom": 90999,"nameLocation": 15800,"nameTextStyle": 30596,"nameGap": 14640,"singleAxis": [...]
+// export const fullKeywordsList = ["0","1","title","show","text","link","target","textStyle","color","fontStyle","fontWeight","fontFamily","fontSize","textAlign","textBaseline","subtext","sublink","subtarget","subtextStyle","padding","itemGap","zlevel","z","left","top","right","bottom","backgroundColor","borderColor","borderWidth","shadowBlur","shadowColor","shadowOffsetX","shadowOffsetY","legend","width","height","orient","align","itemWidth","itemHeight","formatter","selectedMode","ina [...]
\ No newline at end of file
diff --git a/src/editor/CodeAce.vue b/src/editor/CodeAce.vue
index ba51f76..ef2a34c 100644
--- a/src/editor/CodeAce.vue
+++ b/src/editor/CodeAce.vue
@@ -4,7 +4,7 @@
 
 <script>
 
-import {keywords, fullKeywordsList} from '../data/option-keywords';
+import {keywords} from '../data/option-keywords';
 import {loadScriptsAsync} from '../common/helper';
 import {store} from '../common/store';
 import {SCRIPT_URLS} from '../common/config';
@@ -18,14 +18,14 @@ function ensureACE() {
             const lnTools = ace.require('ace/ext/language_tools');
 
             const completions = [];
-            for (let key in keywords) {
+            keywords.forEach(keyword => {
                 completions.push({
-                    caption: key,
-                    value: key,
-                    score: keywords[key],
+                    caption: keyword.name,
+                    value: keyword.name,
+                    score: keyword.count,
                     metal: 'local'
                 });
-            }
+            });
 
             lnTools.addCompleter({
                 getCompletions: function (editor, session, pos, prefix, callback) {

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