[GitHub] [incubator-echarts] Ovilia commented on issue #12150: How to disable auto scale/transform in graph ?

2020-02-16 Thread GitBox
Ovilia commented on issue #12150: How to disable auto scale/transform in graph ?
URL: 
https://github.com/apache/incubator-echarts/issues/12150#issuecomment-586833617
 
 
   @kibbon 现在的情况是 scale和transform 自适应改为了什么?请提供一下完整的代码


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] [incubator-echarts] echarts-bot[bot] commented on issue #12150: How to disable auto scale/transform in graph ?

2020-02-16 Thread GitBox
echarts-bot[bot] commented on issue #12150: How to disable auto scale/transform 
in graph ?
URL: 
https://github.com/apache/incubator-echarts/issues/12150#issuecomment-586833696
 
 
   @kibbon Please provide a demo for the issue either with 
https://jsfiddle.net/ovilia/n6xc4df3/ or 
https://gallery.echartsjs.com/editor.html.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] [incubator-echarts] theshashiverma commented on issue #8785: How do I draw 100% stacked column/bar chart ?

2020-02-16 Thread GitBox
theshashiverma commented on issue #8785: How do I draw 100% stacked column/bar 
chart ? 
URL: 
https://github.com/apache/incubator-echarts/issues/8785#issuecomment-586816657
 
 
   @Ovilia 


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] [incubator-echarts] theshashiverma edited a comment on issue #8785: How do I draw 100% stacked column/bar chart ?

2020-02-16 Thread GitBox
theshashiverma edited a comment on issue #8785: How do I draw 100% stacked 
column/bar chart ? 
URL: 
https://github.com/apache/incubator-echarts/issues/8785#issuecomment-586812194
 
 
   @vadasambar hi, I have converted the data into a percentage, but still, it's 
not stretching
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] [incubator-echarts] theshashiverma commented on issue #8785: How do I draw 100% stacked column/bar chart ?

2020-02-16 Thread GitBox
theshashiverma commented on issue #8785: How do I draw 100% stacked column/bar 
chart ? 
URL: 
https://github.com/apache/incubator-echarts/issues/8785#issuecomment-586812194
 
 
   @vadasambar hi, how did you convert the data?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[incubator-echarts-bot] branch master updated: feat: pr label

2020-02-16 Thread ovilia
This is an automated email from the ASF dual-hosted git repository.

ovilia pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-echarts-bot.git


The following commit(s) were added to refs/heads/master by this push:
 new 27926db  feat: pr label
27926db is described below

commit 27926dba30a77a7a07bb7123f62bcb1992199514
Author: Ovilia 
AuthorDate: Mon Feb 17 11:47:52 2020 +0800

feat: pr label
---
 index.js| 27 ---
 src/text.js |  4 
 2 files changed, 24 insertions(+), 7 deletions(-)

diff --git a/index.js b/index.js
index fe0422a..2c51d00 100644
--- a/index.js
+++ b/index.js
@@ -1,5 +1,4 @@
 const Issue = require('./src/issue');
-const coreCommitters = require('./src/coreCommitters');
 const text = require('./src/text');
 
 module.exports = app => {
@@ -33,7 +32,6 @@ module.exports = app => {
 );
 };
 
-// console.log(context.payload);
 switch (context.payload.label.name) {
 case 'invalid':
 return Promise.all([commentIssue(context, 
text.NOT_USING_TEMPLATE), closeIssue(context)]);
@@ -44,6 +42,15 @@ module.exports = app => {
 case 'inactive':
 return Promise.all([commentIssue(context, 
text.INACTIVE_ISSUE), closeIssue(context)]);
 
+case 'missing-demo':
+return Promise.all([
+commentIssue(context, replaceAt(text.MISSING_DEMO)),
+getRemoveLabel(context, 'waiting-for: community'),
+context.github.issues.addLabels(context.issue({
+labels: ['waiting-for: author']
+}))
+]);
+
 // case 'waiting-for: author':
 // return commentIssue(context, 
replaceAt(text.ISSUE_TAGGED_WAITING_AUTHOR));
 
@@ -66,9 +73,9 @@ module.exports = app => {
 const isCommenterAuthor = commenter === 
context.payload.issue.user.login;
 let removeLabel;
 let addLabel;
-if (coreCommitters.isCoreCommitter(commenter) && !isCommenterAuthor) {
+if (isCommitter(context.payload.comment.author_association)) {
 // New comment from core committers
-removeLabel = getRemoveLabel(context, 'waiting-for: help');
+removeLabel = getRemoveLabel(context, 'waiting-for: community');
 }
 else if (isCommenterAuthor) {
 // New comment from issue author
@@ -80,8 +87,7 @@ module.exports = app => {
 return Promise.all([removeLabel, addLabel]);
 });
 
-// Pull Requests Not Tested Yet
-app.on(['pull_request.opened', 'pull_request.reopened'], async context => {
+app.on(['pull_request.opened'], async context => {
 const auth = context.payload.pull_request.author_association;
 const comment = context.github.issues.createComment(context.issue({
 body: isCommitter(auth) ? text.PR_OPENED_BY_COMMITTER : 
text.PR_OPENED
@@ -95,8 +101,15 @@ module.exports = app => {
 labels: labelList
 }));
 
+return Promise.all([comment, addLabel]);
+});
+
+app.on(['pull_request.synchronize'], async context => {
+const addLabel = context.github.issues.addLabels(context.issue({
+labels: ['PR: awaiting review']
+}));
 const removeLabel = getRemoveLabel(context, 'PR: revision needed');
-return Promise.all([comment, addLabel, removeLabel]);
+return Promise.all([addLabel, removeLabel]);
 });
 
 app.on(['pull_request.closed'], async context => {
diff --git a/src/text.js b/src/text.js
index ab01a9a..3d20b05 100644
--- a/src/text.js
+++ b/src/text.js
@@ -39,6 +39,9 @@ AT_ISSUE_AUTHOR Would you like to debug it by yourself? This 
is a quicker way to
 
 Please have a look at [How to debug 
ECharts](https://github.com/apache/incubator-echarts/blob/master/CONTRIBUTING.md#how-to-debug-echarts)
 if you'd like to give a try. 邏`;
 
+const MISSING_DEMO =
+`AT_ISSUE_AUTHOR Please provide a demo for the issue either with 
https://jsfiddle.net/ovilia/n6xc4df3/ or 
https://gallery.echartsjs.com/editor.html.`;
+
 const ISSUE_TAGGED_PRIORITY_HIGH =
 `This issue is labeled with \`priority: high\`, which means it's a 
frequently asked problem and we will fix it ASAP.`;
 
@@ -76,6 +79,7 @@ module.exports = {
 NOT_USING_TEMPLATE,
 ISSUE_CREATED,
 ISSUE_UPDATED,
+MISSING_DEMO,
 INACTIVE_ISSUE,
 PR_OPENED,
 LABEL_HOWTO,


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



[GitHub] [incubator-echarts] Ovilia commented on issue #12152: Is there any way to stack bars in the waterfall chart as in the below picture?

2020-02-16 Thread GitBox
Ovilia commented on issue #12152: Is there any way to stack bars in the 
waterfall chart as in the below picture?
URL: 
https://github.com/apache/incubator-echarts/issues/12152#issuecomment-586800719
 
 
   I made a demo for you: https://gallery.echartsjs.com/editor.html?c=xCKVqTIrT
   
   But the order of negative bars seems to be different from your design. I'm 
afraid you have to use custom series if you insist on that order. Here's the 
document for custom series: 
https://echarts.apache.org/en/tutorial.html#Custom%20Series


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[incubator-echarts] 05/09: mark ts-nocheck temporarily to not modified files.

2020-02-16 Thread sushuang
This is an automated email from the ASF dual-hosted git repository.

sushuang pushed a commit to branch typescript
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git

commit 6b991bee10b420d3ad32d5a254713cde07e8b86a
Author: 100pah 
AuthorDate: Sat Feb 15 11:40:25 2020 +0800

mark ts-nocheck temporarily to not modified files.
---
 src/action/createDataSelectAction.ts  | 2 ++
 src/action/geoRoam.ts | 2 ++
 src/action/roamHelper.ts  | 2 ++
 src/chart/bar.ts  | 2 ++
 src/chart/bar/BarSeries.ts| 2 ++
 src/chart/bar/BarView.ts  | 2 ++
 src/chart/bar/BaseBarSeries.ts| 2 ++
 src/chart/bar/PictorialBarSeries.ts   | 2 ++
 src/chart/bar/PictorialBarView.ts | 2 ++
 src/chart/bar/barItemStyle.ts | 2 ++
 src/chart/bar/helper.ts   | 2 ++
 src/chart/boxplot/BoxplotSeries.ts| 2 ++
 src/chart/boxplot/BoxplotView.ts  | 2 ++
 src/chart/boxplot/boxplotLayout.ts| 2 ++
 src/chart/boxplot/boxplotVisual.ts| 1 +
 src/chart/candlestick/CandlestickSeries.ts| 2 ++
 src/chart/candlestick/CandlestickView.ts  | 2 ++
 src/chart/candlestick/candlestickLayout.ts| 2 ++
 src/chart/candlestick/candlestickVisual.ts| 2 ++
 src/chart/candlestick/preprocessor.ts | 2 ++
 src/chart/chord/ChordSeries.ts| 2 ++
 src/chart/chord/ChordView.ts  | 2 ++
 src/chart/chord/Ribbon.ts | 2 ++
 src/chart/chord/chordCircularLayout.ts| 2 ++
 src/chart/effectScatter.ts| 2 ++
 src/chart/effectScatter/EffectScatterSeries.ts| 2 ++
 src/chart/effectScatter/EffectScatterView.ts  | 2 ++
 src/chart/funnel.ts   | 2 ++
 src/chart/funnel/FunnelSeries.ts  | 2 ++
 src/chart/funnel/FunnelView.ts| 2 ++
 src/chart/funnel/funnelLayout.ts  | 2 ++
 src/chart/gauge/GaugeSeries.ts| 2 ++
 src/chart/gauge/GaugeView.ts  | 2 ++
 src/chart/gauge/PointerPath.ts| 2 ++
 src/chart/graph.ts| 2 ++
 src/chart/graph/GraphSeries.ts| 2 ++
 src/chart/graph/GraphView.ts  | 2 ++
 src/chart/graph/adjustEdge.ts | 2 ++
 src/chart/graph/categoryFilter.ts | 1 +
 src/chart/graph/categoryVisual.ts | 1 +
 src/chart/graph/circularLayout.ts | 2 ++
 src/chart/graph/circularLayoutHelper.ts   | 2 ++
 src/chart/graph/createView.ts | 2 ++
 src/chart/graph/edgeVisual.ts | 1 +
 src/chart/graph/forceHelper.ts| 2 ++
 src/chart/graph/forceLayout.ts| 2 ++
 src/chart/graph/graphAction.ts| 2 ++
 src/chart/graph/graphHelper.ts| 2 ++
 src/chart/graph/simpleLayout.ts   | 2 ++
 src/chart/graph/simpleLayoutHelper.ts | 2 ++
 src/chart/heatmap/HeatmapLayer.ts | 2 ++
 src/chart/heatmap/HeatmapSeries.ts| 2 ++
 src/chart/heatmap/HeatmapView.ts  | 2 ++
 src/chart/helper/EffectLine.ts| 2 ++
 src/chart/helper/EffectPolyline.ts| 2 ++
 src/chart/helper/EffectSymbol.ts  | 2 ++
 src/chart/helper/LargeLineDraw.ts | 2 ++
 src/chart/helper/LargeSymbolDraw.ts   | 2 ++
 src/chart/helper/Line.ts  | 2 ++
 src/chart/helper/LineDraw.ts  | 2 ++
 src/chart/helper/LinePath.ts  | 2 ++
 src/chart/helper/Polyline.ts  | 2 ++
 src/chart/helper/Symbol.ts| 2 ++
 src/chart/helper/SymbolDraw.ts| 2 ++
 src/chart/helper/createClipPathFromCoordSys.ts| 3 +++
 src/chart/helper/createGraphFromNodeEdge.ts   | 2 ++
 src/chart/helper/createGraphFromNodeMatrix.ts | 2 ++
 src/chart/helper/createListSimply.ts  | 1 +
 src/chart/helper/focusNodeAdjacencyAction.ts  | 2 ++
 src/chart/helper/labelHelper.ts   | 2 ++
 src/chart/helper/treeHelper.ts| 2 ++
 src/chart/helper/whiskerBoxCommon.ts  | 1 +
 src/chart/line.ts | 2 ++
 src/chart/line/LineSeries.ts  | 2 ++
 src/chart/line/LineView.ts| 2 ++
 src/chart/line/helper.ts  | 2 ++
 src/chart/line/lineAnimationDiff.ts   | 2 ++
 src/chart/line/poly.ts| 2 ++
 src/chart/lines/LinesSeries.ts| 2 ++
 src/chart/lines/LinesView.ts  | 2 ++
 

[incubator-echarts] 03/09: remove npm product from git.

2020-02-16 Thread sushuang
This is an automated email from the ASF dual-hosted git repository.

sushuang pushed a commit to branch typescript
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git

commit c21d828cc5a08e4dc39ddc77a8aa839f571da516
Author: 100pah 
AuthorDate: Sat Feb 15 11:26:33 2020 +0800

remove npm product from git.
---
 index.common.js |  73 --
 index.js| 135 
 index.simple.js |  38 
 3 files changed, 246 deletions(-)

diff --git a/index.common.js b/index.common.js
deleted file mode 100644
index 28b776d..000
--- a/index.common.js
+++ /dev/null
@@ -1,73 +0,0 @@
-
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements.  See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership.  The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License.  You may obtain a copy of the License at
-*
-*   http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied.  See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*/
-
-var _echarts = require("./lib/echarts");
-
-(function () {
-  for (var key in _echarts) {
-if (_echarts == null || !_echarts.hasOwnProperty(key) || key === 'default' 
|| key === '__esModule') return;
-exports[key] = _echarts[key];
-  }
-})();
-
-var _export = require("./lib/export");
-
-(function () {
-  for (var key in _export) {
-if (_export == null || !_export.hasOwnProperty(key) || key === 'default' 
|| key === '__esModule') return;
-exports[key] = _export[key];
-  }
-})();
-
-require("./lib/component/dataset");
-
-require("./lib/chart/line");
-
-require("./lib/chart/bar");
-
-require("./lib/chart/pie");
-
-require("./lib/chart/scatter");
-
-require("./lib/component/graphic");
-
-require("./lib/component/tooltip");
-
-require("./lib/component/axisPointer");
-
-require("./lib/component/legendScroll");
-
-require("./lib/component/grid");
-
-require("./lib/component/title");
-
-require("./lib/component/markPoint");
-
-require("./lib/component/markLine");
-
-require("./lib/component/markArea");
-
-require("./lib/component/dataZoom");
-
-require("./lib/component/toolbox");
-
-require("zrender/lib/vml/vml");
-
-require("zrender/lib/svg/svg");
\ No newline at end of file
diff --git a/index.js b/index.js
deleted file mode 100644
index 842d8cd..000
--- a/index.js
+++ /dev/null
@@ -1,135 +0,0 @@
-
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements.  See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership.  The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License.  You may obtain a copy of the License at
-*
-*   http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied.  See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*/
-
-var _echarts = require("./lib/echarts");
-
-(function () {
-  for (var key in _echarts) {
-if (_echarts == null || !_echarts.hasOwnProperty(key) || key === 'default' 
|| key === '__esModule') return;
-exports[key] = _echarts[key];
-  }
-})();
-
-var _export = require("./lib/export");
-
-(function () {
-  for (var key in _export) {
-if (_export == null || !_export.hasOwnProperty(key) || key === 'default' 
|| key === '__esModule') return;
-exports[key] = _export[key];
-  }
-})();
-
-require("./lib/component/dataset");
-
-require("./lib/chart/line");
-
-require("./lib/chart/bar");
-
-require("./lib/chart/pie");
-
-require("./lib/chart/scatter");
-
-require("./lib/chart/radar");
-
-require("./lib/chart/map");
-
-require("./lib/chart/tree");
-
-require("./lib/chart/treemap");
-
-require("./lib/chart/graph");
-
-require("./lib/chart/gauge");
-
-require("./lib/chart/funnel");
-
-require("./lib/chart/parallel");
-
-require("./lib/chart/sankey");
-
-require("./lib/chart/boxplot");
-
-require("./lib/chart/candlestick");
-
-require("./lib/chart/effectScatter");
-
-require("./lib/chart/lines");
-
-require("./lib/chart/heatmap");
-
-require("./lib/chart/pictorialBar");
-
-require("./lib/chart/themeRiver");
-
-require("./lib/chart/sunburst");
-
-require("./lib/chart/custom");
-
-require("./lib/component/grid");
-

[incubator-echarts] 01/09: rename source code files from js to ts

2020-02-16 Thread sushuang
This is an automated email from the ASF dual-hosted git repository.

sushuang pushed a commit to branch typescript
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git

commit 6dc77e1468e6dc6df376d0b6a27d0c43be1e0416
Author: 100pah 
AuthorDate: Mon Feb 3 12:18:13 2020 +0800

rename source code files from js to ts
---
 echarts.all.js => echarts.all.ts  | 0
 echarts.blank.js => echarts.blank.ts  | 0
 echarts.common.js => echarts.common.ts| 0
 echarts.simple.js => echarts.simple.ts| 0
 extension-src/bmap/{BMapCoordSys.js => BMapCoordSys.ts}   | 0
 extension-src/bmap/{BMapModel.js => BMapModel.ts} | 0
 extension-src/bmap/{BMapView.js => BMapView.ts}   | 0
 extension-src/bmap/{bmap.js => bmap.ts}   | 0
 extension-src/dataTool/{gexf.js => gexf.ts}   | 0
 extension-src/dataTool/{index.js => index.ts} | 0
 extension-src/dataTool/{prepareBoxplotData.js => prepareBoxplotData.ts}   | 0
 src/{CoordinateSystem.js => CoordinateSystem.ts}  | 0
 src/{ExtensionAPI.js => ExtensionAPI.ts}  | 0
 src/action/{createDataSelectAction.js => createDataSelectAction.ts}   | 0
 src/action/{geoRoam.js => geoRoam.ts} | 0
 src/action/{roamHelper.js => roamHelper.ts}   | 0
 src/chart/{bar.js => bar.ts}  | 0
 src/chart/bar/{BarSeries.js => BarSeries.ts}  | 0
 src/chart/bar/{BarView.js => BarView.ts}  | 0
 src/chart/bar/{BaseBarSeries.js => BaseBarSeries.ts}  | 0
 src/chart/bar/{PictorialBarSeries.js => PictorialBarSeries.ts}| 0
 src/chart/bar/{PictorialBarView.js => PictorialBarView.ts}| 0
 src/chart/bar/{barItemStyle.js => barItemStyle.ts}| 0
 src/chart/bar/{helper.js => helper.ts}| 0
 src/chart/{boxplot.js => boxplot.ts}  | 0
 src/chart/boxplot/{BoxplotSeries.js => BoxplotSeries.ts}  | 0
 src/chart/boxplot/{BoxplotView.js => BoxplotView.ts}  | 0
 src/chart/boxplot/{boxplotLayout.js => boxplotLayout.ts}  | 0
 src/chart/boxplot/{boxplotVisual.js => boxplotVisual.ts}  | 0
 src/chart/{candlestick.js => candlestick.ts}  | 0
 src/chart/candlestick/{CandlestickSeries.js => CandlestickSeries.ts}  | 0
 src/chart/candlestick/{CandlestickView.js => CandlestickView.ts}  | 0
 src/chart/candlestick/{candlestickLayout.js => candlestickLayout.ts}  | 0
 src/chart/candlestick/{candlestickVisual.js => candlestickVisual.ts}  | 0
 src/chart/candlestick/{preprocessor.js => preprocessor.ts}| 0
 src/chart/{chord.js => chord.ts}  | 0
 src/chart/chord/{ChordSeries.js => ChordSeries.ts}| 0
 src/chart/chord/{ChordView.js => ChordView.ts}| 0
 src/chart/chord/{Ribbon.js => Ribbon.ts}  | 0
 src/chart/chord/{chordCircularLayout.js => chordCircularLayout.ts}| 0
 src/chart/{custom.js => custom.ts}| 0
 src/chart/{effectScatter.js => effectScatter.ts}  | 0
 .../effectScatter/{EffectScatterSeries.js => EffectScatterSeries.ts}  | 0
 src/chart/effectScatter/{EffectScatterView.js => EffectScatterView.ts}| 0
 src/chart/{funnel.js => funnel.ts}| 0
 src/chart/funnel/{FunnelSeries.js => FunnelSeries.ts} | 0
 src/chart/funnel/{FunnelView.js => FunnelView.ts} | 0
 src/chart/funnel/{funnelLayout.js => funnelLayout.ts} | 0
 src/chart/{gauge.js => gauge.ts}  | 0
 src/chart/gauge/{GaugeSeries.js => GaugeSeries.ts}| 0
 src/chart/gauge/{GaugeView.js => GaugeView.ts}| 0
 src/chart/gauge/{PointerPath.js => PointerPath.ts}| 0
 src/chart/{graph.js => graph.ts}  | 0
 src/chart/graph/{GraphSeries.js => GraphSeries.ts}| 0
 src/chart/graph/{GraphView.js => GraphView.ts}| 0
 src/chart/graph/{adjustEdge.js => adjustEdge.ts}  | 0
 src/chart/graph/{backwardCompat.js => backwardCompat.ts}  | 0
 src/chart/graph/{categoryFilter.js => categoryFilter.ts}  | 0
 src/chart/graph/{categoryVisual.js => categoryVisual.ts}  

[incubator-echarts] 02/09: make build tool support ts. And update dependencies.

2020-02-16 Thread sushuang
This is an automated email from the ASF dual-hosted git repository.

sushuang pushed a commit to branch typescript
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git

commit ba1639f01f5e12b7e5a3fc00543b8b92f9718035
Author: 100pah 
AuthorDate: Sat Feb 15 11:23:08 2020 +0800

make build tool support ts.
And update dependencies.
---
 .gitignore |4 +-
 build/build.js |  275 -
 build/config.js|  118 +-
 ...-plugin-ec-lang.js => ec-lang-rollup-plugin.js} |0
 build/pre-publish.js   |  342 +-
 ...ec-remove-dev.js => remove-dev-babel-plugin.js} |   44 +-
 ...c-remove-dev.js => remove-dev-rollup-plugin.js} |   14 +-
 ...ollup-plugin-ec-remove-dev.js => remove-dev.js} |   51 +-
 package-lock.json  | 1222 +++-
 package.json   |   20 +-
 tsconfig.json  |   24 +
 11 files changed, 1889 insertions(+), 225 deletions(-)

diff --git a/.gitignore b/.gitignore
index edf6813..4097609 100644
--- a/.gitignore
+++ b/.gitignore
@@ -173,7 +173,9 @@ map/tool
 map/raw
 theme/thumb
 /lib
+/esm
+pre-publish-tmp
 todo
 **/*.log
 *.sublime-workspace
-*.sublime-project
+*.sublime-project
\ No newline at end of file
diff --git a/build/build.js b/build/build.js
index bd252a2..1be3afd 100755
--- a/build/build.js
+++ b/build/build.js
@@ -21,15 +21,18 @@
 
 const fsExtra = require('fs-extra');
 const fs = require('fs');
-const {resolve} = require('path');
+const nodePath = require('path');
 const config = require('./config.js');
 const commander = require('commander');
-const {build, watch, color} = require('zrender/build/helper');
-const ecLangPlugin = require('./rollup-plugin-ec-lang');
+const chalk = require('chalk');
+const rollup = require('rollup');
+const ecLangPlugin = require('./ec-lang-rollup-plugin');
 const prePublish = require('./pre-publish');
-const recheckDEV = 
require('zrender/build/babel-plugin-transform-remove-dev').recheckDEV;
+const recheckDEV = require('./remove-dev').recheckDEV;
+const assert = require('assert');
 
-function run() {
+
+async function run() {
 
 /**
  * Tips for `commander`:
@@ -148,7 +151,7 @@ function run() {
 watch(config.createECharts(opt));
 }
 else if (isPrePublish) {
-prePublish();
+await prePublish();
 }
 else if (isRelease) {
 let configs = [];
@@ -180,21 +183,19 @@ function run() {
 config.createDataTool(true)
 );
 
-build(configs)
-.then(function () {
-checkCode(configForCheck);
-prePublish();
-}).catch(handleBuildError);
+await build(configs);
+
+checkBundleCode(configForCheck);
+
+await prePublish();
 }
 else {
 let cfg = config.createECharts(opt);
-build([cfg])
-.then(function () {
-if (opt.removeDev) {
-checkCode(cfg);
-}
-})
-.catch(handleBuildError);
+await build([cfg]);
+
+if (opt.removeDev) {
+checkBundleCode(cfg);
+}
 }
 }
 
@@ -207,18 +208,14 @@ function normalizeParams(opt) {
 }
 }
 
-function handleBuildError(err) {
-console.log(err);
-}
-
-function checkCode(singleConfig) {
+function checkBundleCode(singleConfig) {
 // Make sure __DEV__ is eliminated.
 let code = fs.readFileSync(singleConfig.output.file, {encoding: 'utf-8'});
 if (!code) {
 throw new Error(`${singleConfig.output.file} is empty`);
 }
 recheckDEV(code);
-console.log(color('fgGreen', 'dim')('Check code: correct.'));
+console.log(chalk.green.dim('Check code: correct.'));
 }
 
 function validateIO(input, output) {
@@ -249,7 +246,233 @@ function validateLang(lang, output) {
  * @return {string} Absolute path.
  */
 function getPath(relativePath) {
-return resolve(__dirname, '../', relativePath);
+return nodePath.resolve(__dirname, '../', relativePath);
+}
+
+/**
+ * @param {Array.} configs A list of rollup configs:
+ *  See: 
+ *  For example:
+ *  [
+ *  {
+ *  ...inputOptions,
+ *  output: [outputOptions],
+ *  watch: {chokidar, include, exclude}
+ *  },
+ *  ...
+ *  ]
+ */
+async function build(configs) {
+
+ensureZRenderCode.prepare();
+
+for (let singleConfig of configs) {
+console.log(
+chalk.cyan.dim('\nBundles '),
+chalk.cyan(singleConfig.input),
+chalk.cyan.dim('=>'),
+chalk.cyan(singleConfig.output.file),
+chalk.cyan.dim(' ...')
+);
+
+console.time('rollup build');
+const bundle = await rollup.rollup(singleConfig);
+console.timeEnd('rollup build');
+
+await 

[incubator-echarts] 08/09: fix TS semantic error.

2020-02-16 Thread sushuang
This is an automated email from the ASF dual-hosted git repository.

sushuang pushed a commit to branch typescript
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git

commit e9a2af6a22490ff2ead7291e784cbb79908ed6cc
Author: 100pah 
AuthorDate: Mon Feb 17 01:38:58 2020 +0800

fix TS semantic error.
---
 src/util/model.ts | 20 +---
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/src/util/model.ts b/src/util/model.ts
index 7f7d33c..ccac59b 100644
--- a/src/util/model.ts
+++ b/src/util/model.ts
@@ -613,18 +613,16 @@ export function getTooltipRenderMode(renderModeOption: 
TooltipRenderMode | 'auto
 
 /**
  * Group a list by key.
- *
- * @param {Array} array
- * @param {Function} getKey
- *param {*} Array item
- *return {string} key
- * @return {Object} Result
- *{Array}: keys,
- *{module:zrender/core/util/HashMap} buckets: {key -> Array}
  */
-export function groupData(array, getKey) {
-var buckets = zrUtil.createHashMap();
-var keys = [];
+export function groupData(
+array: T[],
+getKey: (item: T) => string // return key
+): {
+keys: string[],
+buckets: zrUtil.HashMap // hasmap key: the key returned by `getKey`.
+} {
+var buckets = zrUtil.createHashMap();
+var keys = [] as string[];
 
 zrUtil.each(array, function (item) {
 var key = getKey(item);


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



[incubator-echarts] 09/09: migrate PieSeries and PieView as an example.

2020-02-16 Thread sushuang
This is an automated email from the ASF dual-hosted git repository.

sushuang pushed a commit to branch typescript
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git

commit 4ee8ee674c5563eafda559d5cdbb8cfbfb75e8bf
Author: 100pah 
AuthorDate: Mon Feb 17 05:27:13 2020 +0800

migrate PieSeries and PieView as an example.
---
 src/chart/helper/createListSimply.ts|  15 +-
 src/chart/map/MapSeries.ts  |   4 +-
 src/chart/pie/PieSeries.ts  |  75 +++--
 src/chart/pie/PieView.ts| 490 +---
 src/component/helper/selectableMixin.ts |  77 +++--
 src/coord/geo/GeoModel.ts   |   4 +-
 src/data/List.ts|  12 +-
 src/data/helper/createDimensions.ts |  41 ++-
 src/data/helper/dimensionHelper.ts  |  12 +-
 src/echarts.ts  |  10 +-
 src/model/Component.ts  |  12 +-
 src/model/Global.ts |   2 +-
 src/model/Model.ts  |  10 +-
 src/model/Series.ts |  14 +-
 src/model/mixin/colorPalette.ts |   4 +-
 src/model/mixin/dataFormat.ts   |  36 +--
 src/model/mixin/itemStyle.ts|  20 +-
 src/model/mixin/lineStyle.ts|  20 +-
 src/model/mixin/makeStyleMapper.ts  |   2 +-
 src/util/clazz.ts   |  27 +-
 src/util/graphic.ts |   8 +-
 src/util/model.ts   |   4 +-
 src/util/types.ts   |  49 +++-
 src/view/Chart.ts   |   7 +-
 src/view/Component.ts   |   1 +
 src/visual/LegendVisualProvider.ts  |   1 -
 26 files changed, 538 insertions(+), 419 deletions(-)

diff --git a/src/chart/helper/createListSimply.ts 
b/src/chart/helper/createListSimply.ts
index c3f7be2..92c6612 100644
--- a/src/chart/helper/createListSimply.ts
+++ b/src/chart/helper/createListSimply.ts
@@ -19,9 +19,10 @@
 
 // @ts-nocheck
 
-import createDimensions from '../../data/helper/createDimensions';
+import createDimensions, {CreateDimensionsParams} from 
'../../data/helper/createDimensions';
 import List from '../../data/List';
 import {extend, isArray} from 'zrender/src/core/util';
+import SeriesModel from '../../model/Series';
 
 /**
  * [Usage]:
@@ -32,14 +33,12 @@ import {extend, isArray} from 'zrender/src/core/util';
  * coordDimensions: ['value'],
  * dimensionsCount: 5
  * });
- *
- * @param {module:echarts/model/Series} seriesModel
- * @param {Object|Array.} opt opt or coordDimensions
- *The options in opt, see `echarts/data/helper/createDimensions`
- * @param {Array.} [nameList]
- * @return {module:echarts/data/List}
  */
-export default function (seriesModel, opt, nameList) {
+export default function (
+seriesModel: SeriesModel,
+opt: CreateDimensionsParams | CreateDimensionsParams['coordDimensions'],
+nameList?: string[]
+): List {
 opt = isArray(opt) && {coordDimensions: opt} || extend({}, opt);
 
 var source = seriesModel.getSource();
diff --git a/src/chart/map/MapSeries.ts b/src/chart/map/MapSeries.ts
index 6bc864b..a1f4b8c 100644
--- a/src/chart/map/MapSeries.ts
+++ b/src/chart/map/MapSeries.ts
@@ -23,7 +23,7 @@ import * as zrUtil from 'zrender/src/core/util';
 import createListSimply from '../helper/createListSimply';
 import SeriesModel from '../../model/Series';
 import {encodeHTML, addCommas} from '../../util/format';
-import dataSelectableMixin from '../../component/helper/selectableMixin';
+import {DataSelectableMixin} from '../../component/helper/selectableMixin';
 import {retrieveRawAttr} from '../../data/helper/dataProvider';
 import geoSourceManager from '../../coord/geo/geoSourceManager';
 import {makeSeriesEncodeForNameBased} from '../../data/helper/sourceHelper';
@@ -263,6 +263,6 @@ var MapSeries = SeriesModel.extend({
 
 });
 
-zrUtil.mixin(MapSeries, dataSelectableMixin);
+zrUtil.mixin(MapSeries, DataSelectableMixin.prototype);
 
 export default MapSeries;
\ No newline at end of file
diff --git a/src/chart/pie/PieSeries.ts b/src/chart/pie/PieSeries.ts
index 1a1697b..8d44523 100644
--- a/src/chart/pie/PieSeries.ts
+++ b/src/chart/pie/PieSeries.ts
@@ -17,26 +17,32 @@
 * under the License.
 */
 
-// @ts-nocheck
-
-import * as echarts from '../../echarts';
 import createListSimply from '../helper/createListSimply';
 import * as zrUtil from 'zrender/src/core/util';
 import * as modelUtil from '../../util/model';
 import {getPercentWithPrecision} from '../../util/number';
-import dataSelectableMixin from '../../component/helper/selectableMixin';
+import {DataSelectableMixin, SelectableTarget} from 
'../../component/helper/selectableMixin';
 import {retrieveRawAttr} from '../../data/helper/dataProvider';
 import {makeSeriesEncodeForNameBased} from '../../data/helper/sourceHelper';
 import LegendVisualProvider from '../../visual/LegendVisualProvider';
+import SeriesModel from '../../model/Series';
+import { SeriesOption, 

[incubator-echarts] branch typescript created (now 4ee8ee6)

2020-02-16 Thread sushuang
This is an automated email from the ASF dual-hosted git repository.

sushuang pushed a change to branch typescript
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git.


  at 4ee8ee6  migrate PieSeries and PieView as an example.

This branch includes the following new commits:

 new 6dc77e1  rename source code files from js to ts
 new ba1639f  make build tool support ts. And update dependencies.
 new c21d828  remove npm product from git.
 new a829cd9  ignore npm and esm product.
 new 6b991be  mark ts-nocheck temporarily to not modified files.
 new 3229e88  Migrate to TS -- Part I (some of the basic class and utils) 
Note: lots of the common type are put in `src/util/types.ts`.
 new 36cfe77  tweak build and eslint
 new e9a2af6  fix TS semantic error.
 new 4ee8ee6  migrate PieSeries and PieView as an example.

The 9 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-unsubscr...@echarts.apache.org
For additional commands, e-mail: commits-h...@echarts.apache.org



[incubator-echarts] 07/09: tweak build and eslint

2020-02-16 Thread sushuang
This is an automated email from the ASF dual-hosted git repository.

sushuang pushed a commit to branch typescript
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git

commit 36cfe7773de5b6225debbedb9d174b938bd470a1
Author: 100pah 
AuthorDate: Mon Feb 17 01:32:48 2020 +0800

tweak build and eslint
---
 build/build.js | 13 ++---
 src/.eslintrc.yaml |  6 ++
 2 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/build/build.js b/build/build.js
index 1be3afd..12f3f82 100755
--- a/build/build.js
+++ b/build/build.js
@@ -392,7 +392,7 @@ var ensureZRenderCode = (function () {
 && fs.lstatSync(nodeModulesZr).isDirectory()
 ) {
 console.log(chalk.blue(`rm -rf dir: ${nodeModulesZr}`));
-// ensure save.
+// ensure save for rm -rf.
 assert(nodeModulesZr.includes('node_modules') && 
nodeModulesZr.includes('zrender'));
 fsExtra.removeSync(nodeModulesZr);
 }
@@ -436,9 +436,10 @@ var ensureZRenderCode = (function () {
 
 clear: function () {
 // Calling guard
-assert(stats === 'prepared');
+if (stats === 'cleared') {
+return;
+}
 stats = 'cleared';
-
 doClear();
 }
 }
@@ -450,11 +451,7 @@ async function main() {
 await run();
 }
 catch (err) {
-
-ensureZRenderCode.clear();
-
 console.log(chalk.red('BUILD ERROR!'));
-
 // rollup parse error.
 if (err) {
 if (err.loc) {
@@ -472,6 +469,8 @@ async function main() {
 err.plugin != null && console.warn(chalk.red(`plugin: 
${err.plugin}`));
 }
 // console.log(err);
+
+ensureZRenderCode.clear();
 }
 }
 
diff --git a/src/.eslintrc.yaml b/src/.eslintrc.yaml
index 76be321..136f443 100644
--- a/src/.eslintrc.yaml
+++ b/src/.eslintrc.yaml
@@ -1,7 +1,5 @@
-parserOptions:
-# If using ES Module, ecmaVersion have to be set as `2015`.
-ecmaVersion: 2015
-sourceType: "module"
+parser: "@typescript-eslint/parser"
+plugins: ["@typescript-eslint"]
 env:
 browser: true
 node: true


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



[incubator-echarts] 04/09: ignore npm and esm product.

2020-02-16 Thread sushuang
This is an automated email from the ASF dual-hosted git repository.

sushuang pushed a commit to branch typescript
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git

commit a829cd992c7b9f748aba75504ec294cc303ef51d
Author: 100pah 
AuthorDate: Sat Feb 15 11:28:54 2020 +0800

ignore npm and esm product.
---
 .gitignore | 15 ---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/.gitignore b/.gitignore
index 4097609..320e95b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -172,10 +172,19 @@ node_modules
 map/tool
 map/raw
 theme/thumb
-/lib
-/esm
 pre-publish-tmp
 todo
 **/*.log
 *.sublime-workspace
-*.sublime-project
\ No newline at end of file
+*.sublime-project
+
+/esm
+/echarts.all.js
+/echarts.simple.js
+/echarts.common.js
+/echarts.blank.js
+/lib
+/index.js
+/index.simple.js
+/index.common.js
+/index.blank.js
\ No newline at end of file


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



[GitHub] [incubator-echarts] susiwen8 commented on a change in pull request #12155: Fix geo don't show again when show once set false

2020-02-16 Thread GitBox
susiwen8 commented on a change in pull request #12155: Fix geo don't show again 
when show once set false
URL: 
https://github.com/apache/incubator-echarts/pull/12155#discussion_r379911544
 
 

 ##
 File path: src/component/geo/GeoView.js
 ##
 @@ -39,12 +39,17 @@ export default echarts.extendComponentView({
 return;
 }
 
-var mapDraw = this._mapDraw;
 if (geoModel.get('show')) {
-mapDraw.draw(geoModel, ecModel, api, this, payload);
+if (this._mapDraw.hasDraw) {
+this._mapDraw.group.show();
+}
+else {
+this._mapDraw.draw(geoModel, ecModel, api, this, payload);
 
 Review comment:
   Oh yeah, That make sense, because it was removed, so we need to create a new 
one


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] [incubator-echarts] susiwen8 commented on a change in pull request #12155: Fix geo don't show again when show once set false

2020-02-16 Thread GitBox
susiwen8 commented on a change in pull request #12155: Fix geo don't show again 
when show once set false
URL: 
https://github.com/apache/incubator-echarts/pull/12155#discussion_r379911325
 
 

 ##
 File path: src/component/geo/GeoView.js
 ##
 @@ -39,12 +39,17 @@ export default echarts.extendComponentView({
 return;
 }
 
-var mapDraw = this._mapDraw;
 if (geoModel.get('show')) {
-mapDraw.draw(geoModel, ecModel, api, this, payload);
+if (this._mapDraw.hasDraw) {
+this._mapDraw.group.show();
+}
+else {
+this._mapDraw.draw(geoModel, ecModel, api, this, payload);
 
 Review comment:
   That means we should call `new MapDraw` on every update?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] [incubator-echarts] Miller547719886 commented on issue #3205: 使用dataZoom缩放时,markPoint会被挤到一边而不隐藏

2020-02-16 Thread GitBox
Miller547719886 commented on issue #3205: 使用dataZoom缩放时,markPoint会被挤到一边而不隐藏
URL: 
https://github.com/apache/incubator-echarts/issues/3205#issuecomment-586707304
 
 
   想请问这个问题解决了吗?
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] [incubator-echarts] Miller547719886 commented on issue #3205: 使用dataZoom缩放时,markPoint会被挤到一边而不隐藏

2020-02-16 Thread GitBox
Miller547719886 commented on issue #3205: 使用dataZoom缩放时,markPoint会被挤到一边而不隐藏
URL: 
https://github.com/apache/incubator-echarts/issues/3205#issuecomment-586707294
 
 
   想请问这个问题解决了吗?
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] [incubator-echarts] Miller547719886 commented on issue #3205: 使用dataZoom缩放时,markPoint会被挤到一边而不隐藏

2020-02-16 Thread GitBox
Miller547719886 commented on issue #3205: 使用dataZoom缩放时,markPoint会被挤到一边而不隐藏
URL: 
https://github.com/apache/incubator-echarts/issues/3205#issuecomment-586707292
 
 
   想请问这个问题解决了吗?
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] [incubator-echarts] 100pah commented on a change in pull request #12147: Fix: minOpen is true will drop a piece

2020-02-16 Thread GitBox
100pah commented on a change in pull request #12147: Fix: minOpen is true will 
drop a piece
URL: 
https://github.com/apache/incubator-echarts/pull/12147#discussion_r379893617
 
 

 ##
 File path: src/component/visualMap/PiecewiseModel.js
 ##
 @@ -402,7 +402,7 @@ var resetMethods = {
 
 if (thisOption.minOpen) {
 pieceList.push({
-index: index++,
+index: index,
 
 Review comment:
   Also consider
   (1) @pissang mentioned: when the split number is `5`, the final pieces 
should better be `5`.
   (2) The potential bug that the `piece.index` forget to change after 
`reformIntervals(pieceList)` called.
   
   I think the code to resolve this issue could be:
   
   ```js
   splitNumber: function () {
   var thisOption = this.option;
   var pieceList = this._pieceList;
   var precision = Math.min(thisOption.precision, 20);
   var dataExtent = this.getExtent();
   var splitNumber = thisOption.splitNumber;
   splitNumber = Math.max(parseInt(splitNumber, 10), 1);
   thisOption.splitNumber = splitNumber;
   +   var closedIntervalCount = splitNumber - (+thisOption.minOpen) - 
(+thisOption.maxOpen);
   
   -   var splitStep = (dataExtent[1] - dataExtent[0]) / splitNumber;
   +   var splitStep = (dataExtent[1] - dataExtent[0]) / 
closedIntervalCount;
   // Precision auto-adaption
   while (+splitStep.toFixed(precision) !== splitStep && precision < 5) 
{
   precision++;
   }
   thisOption.precision = precision;
   splitStep = +splitStep.toFixed(precision);
   
   -   var index = 0;
   
   if (thisOption.minOpen) {
   pieceList.push({
   -   index++,
   interval: [-Infinity, dataExtent[0]],
   close: [0, 0]
   });
   }
   
   for (
   -   var curr = dataExtent[0], len = index + splitNumber;
   -   index < len;
   -   curr += splitStep
   +   var index = 0, curr = dataExtent[0];
   +   index < closedIntervalCount;
   +   curr += splitStep, index++
   ) {
   var max = index === splitNumber - 1 ? dataExtent[1] : (curr + 
splitStep);
   
   pieceList.push({
   -   index: index++,
   interval: [curr, max],
   close: [1, 1]
   });
   }
   
   if (thisOption.maxOpen) {
   pieceList.push({
   -   index: index++,
   interval: [dataExtent[1], Infinity],
   close: [0, 0]
   });
   }
   
   reformIntervals(pieceList);
   
   -   zrUtil.each(pieceList, function (piece) {
   +   zrUtil.each(pieceList, function (piece, index) {
   +   piece.index = index;
   piece.text = this.formatValueText(piece.interval);
   }, this);
   },
   
   ```


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] [incubator-echarts] 100pah commented on a change in pull request #12147: Fix: minOpen is true will drop a piece

2020-02-16 Thread GitBox
100pah commented on a change in pull request #12147: Fix: minOpen is true will 
drop a piece
URL: 
https://github.com/apache/incubator-echarts/pull/12147#discussion_r379892312
 
 

 ##
 File path: src/component/visualMap/PiecewiseModel.js
 ##
 @@ -402,7 +402,7 @@ var resetMethods = {
 
 if (thisOption.minOpen) {
 pieceList.push({
-index: index++,
+index: index,
 
 Review comment:
   Only remove `++` is not correct. Because after `++` removed, the first piece 
and the second piece has the same `index`.
   That cause when click on the first piece, both the first piece and the 
second pieces are highlighted/downplayed.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] [incubator-echarts] 100pah commented on a change in pull request #12147: Fix: minOpen is true will drop a piece

2020-02-16 Thread GitBox
100pah commented on a change in pull request #12147: Fix: minOpen is true will 
drop a piece
URL: 
https://github.com/apache/incubator-echarts/pull/12147#discussion_r379893617
 
 

 ##
 File path: src/component/visualMap/PiecewiseModel.js
 ##
 @@ -402,7 +402,7 @@ var resetMethods = {
 
 if (thisOption.minOpen) {
 pieceList.push({
-index: index++,
+index: index,
 
 Review comment:
   Also consider
   (1) @pissang mentioned: when the split number is `5`, the final pieces 
should better be `5`.
   (2) The potential but that the `piece.index` forget to change after 
`reformIntervals(pieceList)` called.
   
   I think the code to solve this issue could be:
   
   ```js
   splitNumber: function () {
   var thisOption = this.option;
   var pieceList = this._pieceList;
   var precision = Math.min(thisOption.precision, 20);
   var dataExtent = this.getExtent();
   var splitNumber = thisOption.splitNumber;
   splitNumber = Math.max(parseInt(splitNumber, 10), 1);
   thisOption.splitNumber = splitNumber;
   +   var closedIntervalCount = splitNumber - (+thisOption.minOpen) - 
(+thisOption.maxOpen);
   
   -   var splitStep = (dataExtent[1] - dataExtent[0]) / splitNumber;
   +   var splitStep = (dataExtent[1] - dataExtent[0]) / 
closedIntervalCount;
   // Precision auto-adaption
   while (+splitStep.toFixed(precision) !== splitStep && precision < 5) 
{
   precision++;
   }
   thisOption.precision = precision;
   splitStep = +splitStep.toFixed(precision);
   
   -   var index = 0;
   
   if (thisOption.minOpen) {
   pieceList.push({
   -   index++,
   interval: [-Infinity, dataExtent[0]],
   close: [0, 0]
   });
   }
   
   for (
   -   var curr = dataExtent[0], len = index + splitNumber;
   -   index < len;
   -   curr += splitStep
   +   var index = 0, curr = dataExtent[0];
   +   index < closedIntervalCount;
   +   curr += splitStep, index++
   ) {
   var max = index === splitNumber - 1 ? dataExtent[1] : (curr + 
splitStep);
   
   pieceList.push({
   -   index: index++,
   interval: [curr, max],
   close: [1, 1]
   });
   }
   
   if (thisOption.maxOpen) {
   pieceList.push({
   -   index: index++,
   interval: [dataExtent[1], Infinity],
   close: [0, 0]
   });
   }
   
   reformIntervals(pieceList);
   
   -   zrUtil.each(pieceList, function (piece) {
   +   zrUtil.each(pieceList, function (piece, index) {
   +   piece.index = index;
   piece.text = this.formatValueText(piece.interval);
   }, this);
   },
   
   ```


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] [incubator-echarts] pissang edited a comment on issue #12147: Fix: minOpen is true will drop a piece

2020-02-16 Thread GitBox
pissang edited a comment on issue #12147: Fix: minOpen is true will drop a piece
URL: 
https://github.com/apache/incubator-echarts/pull/12147#issuecomment-586684733
 
 
   In this way, the `splitNumber` is not 6 instead of 5. I'm not sure it's 
correct by design. @100pah Please have a look at this.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] [incubator-echarts] pissang commented on issue #12147: Fix: minOpen is true will drop a piece

2020-02-16 Thread GitBox
pissang commented on issue #12147: Fix: minOpen is true will drop a piece
URL: 
https://github.com/apache/incubator-echarts/pull/12147#issuecomment-586684733
 
 
   In this way, the `splitNumber` is not 6 instead of 5 . I'm not sure it's by 
design. @100pah Please have a look at this.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] [incubator-echarts] pissang removed a comment on issue #12147: Fix: minOpen is true will drop a piece

2020-02-16 Thread GitBox
pissang removed a comment on issue #12147: Fix: minOpen is true will drop a 
piece
URL: 
https://github.com/apache/incubator-echarts/pull/12147#issuecomment-586684474
 
 
   LGTM


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] [incubator-echarts] pissang commented on issue #12147: Fix: minOpen is true will drop a piece

2020-02-16 Thread GitBox
pissang commented on issue #12147: Fix: minOpen is true will drop a piece
URL: 
https://github.com/apache/incubator-echarts/pull/12147#issuecomment-586684474
 
 
   LGTM


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] [incubator-echarts] pissang commented on a change in pull request #12155: Fix geo don't show again when show once set false

2020-02-16 Thread GitBox
pissang commented on a change in pull request #12155: Fix geo don't show again 
when show once set false
URL: 
https://github.com/apache/incubator-echarts/pull/12155#discussion_r379887395
 
 

 ##
 File path: src/component/geo/GeoView.js
 ##
 @@ -39,12 +39,17 @@ export default echarts.extendComponentView({
 return;
 }
 
-var mapDraw = this._mapDraw;
 if (geoModel.get('show')) {
-mapDraw.draw(geoModel, ecModel, api, this, payload);
+if (this._mapDraw.hasDraw) {
+this._mapDraw.group.show();
+}
+else {
+this._mapDraw.draw(geoModel, ecModel, api, this, payload);
 
 Review comment:
   We need to call the `draw` every time to update the map. In this way, it's 
only called the first time.
   
   We can fix this issue by adding the groups back every time in the code 
https://github.com/apache/incubator-echarts/blob/master/src/component/helper/MapDraw.js#L152
 . Now it is only been added on init.
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] [incubator-echarts] pissang commented on issue #12156: fix 11799 add new option 'nameProperty' in map series option

2020-02-16 Thread GitBox
pissang commented on issue #12156: fix 11799 add new option 'nameProperty' in 
map series option
URL: 
https://github.com/apache/incubator-echarts/pull/12156#issuecomment-586683491
 
 
   LGTM


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] [incubator-echarts] pissang merged pull request #12156: fix 11799 add new option 'nameProperty' in map series option

2020-02-16 Thread GitBox
pissang merged pull request #12156: fix 11799 add new option 'nameProperty' in 
map series option
URL: https://github.com/apache/incubator-echarts/pull/12156
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] [incubator-echarts] echarts-bot[bot] commented on issue #12156: fix 11799 add new option 'nameProperty' in map series option

2020-02-16 Thread GitBox
echarts-bot[bot] commented on issue #12156: fix 11799 add new option 
'nameProperty' in map series option
URL: 
https://github.com/apache/incubator-echarts/pull/12156#issuecomment-586683510
 
 
   Congratulations! Your PR has been merged. Thanks for your contribution! 


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[incubator-echarts] branch master updated: fix 11799 add new option 'nameProperty' in map series option to denote key in geoJSON

2020-02-16 Thread shenyi
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/incubator-echarts.git


The following commit(s) were added to refs/heads/master by this push:
 new 055dea0  fix 11799 add new option 'nameProperty' in map series option 
to denote key in geoJSON
 new da128eb  Merge pull request #12156 from alex2wong/fix-11799
055dea0 is described below

commit 055dea04bd641e8d1216073c6be5dbb68750c858
Author: alex2wong 
AuthorDate: Sun Feb 16 16:48:50 2020 +0800

fix 11799 add new option 'nameProperty' in map series option to denote key 
in geoJSON
---
 src/chart/map/MapSeries.js|   5 +-
 src/coord/geo/geoJSONLoader.js|   5 +-
 src/coord/geo/geoSourceManager.js |   5 +-
 src/coord/geo/parseGeoJson.js |   5 +-
 test/map-nameProperty.html| 252 ++
 5 files changed, 264 insertions(+), 8 deletions(-)

diff --git a/src/chart/map/MapSeries.js b/src/chart/map/MapSeries.js
index 606928b..f0a0a6c 100644
--- a/src/chart/map/MapSeries.js
+++ b/src/chart/map/MapSeries.js
@@ -66,7 +66,7 @@ var MapSeries = SeriesModel.extend({
 });
 }
 
-var geoSource = geoSourceManager.load(this.getMapType(), 
this.option.nameMap);
+var geoSource = geoSourceManager.load(this.getMapType(), 
this.option.nameMap, this.option.nameProperty);
 zrUtil.each(geoSource.regions, function (region) {
 var name = region.name;
 if (!dataNameMap.get(name)) {
@@ -256,7 +256,8 @@ var MapSeries = SeriesModel.extend({
 itemStyle: {
 areaColor: 'rgba(255,215,0,0.8)'
 }
-}
+},
+nameProperty: 'name'
 }
 
 });
diff --git a/src/coord/geo/geoJSONLoader.js b/src/coord/geo/geoJSONLoader.js
index 381c1f9..5caaa91 100644
--- a/src/coord/geo/geoJSONLoader.js
+++ b/src/coord/geo/geoJSONLoader.js
@@ -34,9 +34,10 @@ export default {
 /**
  * @param {string} mapName
  * @param {Object} mapRecord {specialAreas, geoJSON}
+ * @param {string} nameProperty
  * @return {Object} {regions, boundingRect}
  */
-load: function (mapName, mapRecord) {
+load: function (mapName, mapRecord, nameProperty) {
 
 var parsed = inner(mapRecord).parsed;
 
@@ -50,7 +51,7 @@ export default {
 
 // https://jsperf.com/try-catch-performance-overhead
 try {
-regions = geoJSON ? parseGeoJson(geoJSON) : [];
+regions = geoJSON ? parseGeoJson(geoJSON, nameProperty) : [];
 }
 catch (e) {
 throw new Error('Invalid geoJson format\n' + e.message);
diff --git a/src/coord/geo/geoSourceManager.js 
b/src/coord/geo/geoSourceManager.js
index 0de59c1..4fadc4f 100644
--- a/src/coord/geo/geoSourceManager.js
+++ b/src/coord/geo/geoSourceManager.js
@@ -34,9 +34,10 @@ export default {
 /**
  * @param {string} mapName
  * @param {Object} nameMap
+ * @param {string} nameProperty
  * @return {Object} source {regions, regionsMap, nameCoordMap, 
boundingRect}
  */
-load: function (mapName, nameMap) {
+load: function (mapName, nameMap, nameProperty) {
 var regions = [];
 var regionsMap = createHashMap();
 var nameCoordMap = createHashMap();
@@ -44,7 +45,7 @@ export default {
 var mapRecords = retrieveMap(mapName);
 
 each(mapRecords, function (record) {
-var singleSource = loaders[record.type].load(mapName, record);
+var singleSource = loaders[record.type].load(mapName, record, 
nameProperty);
 
 each(singleSource.regions, function (region) {
 var regionName = region.name;
diff --git a/src/coord/geo/parseGeoJson.js b/src/coord/geo/parseGeoJson.js
index 3f91a27..f2348f8 100644
--- a/src/coord/geo/parseGeoJson.js
+++ b/src/coord/geo/parseGeoJson.js
@@ -96,9 +96,10 @@ function decodePolygon(coordinate, encodeOffsets, 
encodeScale) {
 /**
  * @alias module:echarts/coord/geo/parseGeoJson
  * @param {Object} geoJson
+ * @param {string} nameProperty
  * @return {module:zrender/container/Group}
  */
-export default function (geoJson) {
+export default function (geoJson, nameProperty) {
 
 decode(geoJson);
 
@@ -136,7 +137,7 @@ export default function (geoJson) {
 }
 
 var region = new Region(
-properties.name,
+properties[nameProperty],
 geometries,
 properties.cp
 );
diff --git a/test/map-nameProperty.html b/test/map-nameProperty.html
new file mode 100644
index 000..8951fc2
--- /dev/null
+++ b/test/map-nameProperty.html
@@ -0,0 +1,252 @@
+
+
+
+
+
+
+
+
+
+
+
+
+html, body, #main {
+width: 100%;
+height: 100%;
+margin: 0;
+}
+
+
+
+
+require([
+'echarts'
+ 

[GitHub] [incubator-echarts] echarts-bot[bot] commented on issue #12156: fix 11799 add new option 'nameProperty' in map series option

2020-02-16 Thread GitBox
echarts-bot[bot] commented on issue #12156: fix 11799 add new option 
'nameProperty' in map series option
URL: 
https://github.com/apache/incubator-echarts/pull/12156#issuecomment-586683223
 
 
   Thanks for your contribution!
   The community will review it ASAP. In the meanwhile, please checkout [the 
coding standard](https://echarts.apache.org/en/coding-standard.html) and Wiki 
about [How to make a pull 
request](https://github.com/apache/incubator-echarts/wiki/How-to-make-a-pull-request).
   
   The pull request is marked to be `PR: author is committer` because you are a 
committer of this project.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] [incubator-echarts] alex2wong opened a new pull request #12156: fix 11799 add new option 'nameProperty' in map series option

2020-02-16 Thread GitBox
alex2wong opened a new pull request #12156: fix 11799 add new option 
'nameProperty' in map series option
URL: https://github.com/apache/incubator-echarts/pull/12156
 
 
   
   
   
   
   ## Brief Information
   
   This pull request is in the type of:
   
   - [x] bug fixing
   - [x] new feature
   - [ ] others
   
   
   
   ### What does this PR do?
   
   
   add new option 'nameProperty' in map series option to denote key in geoJSON 
data
   
   
   ### Fixed issues
   
   
   bug  https://github.com/apache/incubator-echarts/issues/11799
   
   ## Details
   
   ### Before: What was the problem?
   
   
   In original version, geojson properties must have a property: "name". Now 
you can customize it.
   
   
   
   
   
   ### After: How is it fixed in this PR?
   
   
   
   add a new option in map series
   
   
   
   
   
   ## Usage
   
   ### Are there any API changes?
   
   - [x] The API has been changed.
   
   
   ```
   {
   name: 'USA PopEstimates',
   type: 'map',
   map: 'USA',
   nameProperty: 'NAME', // new option to denote 
key in geoJSON, default is 'name',
   data: []
   }
   ```
   
   ### Related test cases or examples to use the new APIs
   
   test/map-nameProperty.html
   
   ## Others
   
   ### Merging options
   
   - [ ] Please squash the commits into a single one when merge.
   
   ### Other information
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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