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/03/18 14:41:03 UTC

[incubator-echarts] branch typescript updated (ede3ac4 -> 469259d)

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

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


    from ede3ac4  Merge branch 'release' into typescript
     new 2332594  ts: bug squash
     new 469259d  Merge from release. add missing merged file

The 2 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.


Summary of changes:
 src/chart/lines/LinesSeries.ts               |   2 +-
 src/chart/pie/PieView.ts                     |   6 +++---
 src/chart/sunburst/SunburstSeries.ts         |   2 +-
 src/component/timeline/SliderTimelineView.ts |  10 +++++-----
 src/component/visualMap/PiecewiseModel.ts    |   1 +
 src/coord/radar/Radar.ts                     |  17 +++++++----------
 test/asset/echarts-logo.png                  | Bin 0 -> 3410 bytes
 test/bar.html                                |   2 +-
 test/symbol.html                             |   2 +-
 9 files changed, 20 insertions(+), 22 deletions(-)
 create mode 100644 test/asset/echarts-logo.png


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


[incubator-echarts] 02/02: Merge from release. add missing merged file

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

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

commit 469259df22b746e84b7e47a44a41f0653acb71c3
Author: pissang <bm...@gmail.com>
AuthorDate: Wed Mar 18 22:40:11 2020 +0800

    Merge from release. add missing merged file
---
 src/coord/radar/Radar.ts | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/src/coord/radar/Radar.ts b/src/coord/radar/Radar.ts
index 2d6da96..14d40f7 100644
--- a/src/coord/radar/Radar.ts
+++ b/src/coord/radar/Radar.ts
@@ -204,7 +204,7 @@ class Radar implements CoordinateSystem, CoordinateSystemMaster {
                 );
             }
             else if (fixedMin != null) {
-                var max;
+                let max;
                 // User set min, expand extent on the other side
                 do {
                     max = fixedMin + interval * splitNumber;
@@ -217,7 +217,7 @@ class Radar implements CoordinateSystem, CoordinateSystemMaster {
                 } while (max < rawExtent[1] && isFinite(max) && isFinite(rawExtent[1]));
             }
             else if (fixedMax != null) {
-                var min;
+                let min;
                 // User set min, expand extent on the other side
                 do {
                     min = fixedMax - interval * splitNumber;
@@ -227,17 +227,14 @@ class Radar implements CoordinateSystem, CoordinateSystemMaster {
                 } while (min > rawExtent[0] && isFinite(min) && isFinite(rawExtent[0]));
             }
             else {
-                var nicedSplitNumber = scale.getTicks().length - 1;
+                const nicedSplitNumber = scale.getTicks().length - 1;
                 if (nicedSplitNumber > splitNumber) {
                     interval = increaseInterval(interval);
                 }
-                // PENDING
-                var center = Math.ceil((rawExtent[0] + rawExtent[1]) / 2 / interval) * interval;
-                var halfSplitNumber = Math.round(splitNumber / 2);
-                scale.setExtent(
-                    numberUtil.round(center - halfSplitNumber * interval),
-                    numberUtil.round(center + (splitNumber - halfSplitNumber) * interval)
-                );
+                // TODO
+                const max = Math.ceil(rawExtent[1] / interval) * interval;
+                const min = numberUtil.round(max - interval * splitNumber);
+                scale.setExtent(min, max);
                 scale.setInterval(interval);
             }
         });


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


[incubator-echarts] 01/02: ts: bug squash

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

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

commit 2332594292029c39d99842f4dae9c63130e5ed1b
Author: pissang <bm...@gmail.com>
AuthorDate: Wed Mar 18 22:28:01 2020 +0800

    ts: bug squash
---
 src/chart/lines/LinesSeries.ts               |   2 +-
 src/chart/pie/PieView.ts                     |   6 +++---
 src/chart/sunburst/SunburstSeries.ts         |   2 +-
 src/component/timeline/SliderTimelineView.ts |  10 +++++-----
 src/component/visualMap/PiecewiseModel.ts    |   1 +
 test/asset/echarts-logo.png                  | Bin 0 -> 3410 bytes
 test/bar.html                                |   2 +-
 test/symbol.html                             |   2 +-
 8 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/src/chart/lines/LinesSeries.ts b/src/chart/lines/LinesSeries.ts
index 2aa62b6..765fe55 100644
--- a/src/chart/lines/LinesSeries.ts
+++ b/src/chart/lines/LinesSeries.ts
@@ -149,7 +149,7 @@ class LinesSeriesModel extends SeriesModel<LinesSeriesOption> {
 
     static readonly dependencies = ['grid', 'polar', 'geo', 'calendar']
 
-    visualColorAccessPath: ['lineStyle', 'color']
+    visualColorAccessPath = ['lineStyle', 'color']
 
     private _flatCoords: ArrayLike<number>
     private _flatCoordsOffset: ArrayLike<number>
diff --git a/src/chart/pie/PieView.ts b/src/chart/pie/PieView.ts
index 955134b..0970a66 100644
--- a/src/chart/pie/PieView.ts
+++ b/src/chart/pie/PieView.ts
@@ -124,10 +124,10 @@ class PiePiece extends graphic.Group {
         var itemModel = data.getItemModel<PieDataItemOption>(idx);
         var layout = data.getItemLayout(idx) as graphic.Sector['shape'];
         var sectorShape = zrUtil.extend({
-            label: ''
+            label: null
         }, layout);
-        // @ts-ignore FIXME:TS label?
-        // sectorShape.label = null;
+        // Not animate label
+        sectorShape.label = null;
 
         var animationTypeUpdate = seriesModel.getShallow('animationTypeUpdate');
 
diff --git a/src/chart/sunburst/SunburstSeries.ts b/src/chart/sunburst/SunburstSeries.ts
index c03233a..aa159e7 100644
--- a/src/chart/sunburst/SunburstSeries.ts
+++ b/src/chart/sunburst/SunburstSeries.ts
@@ -187,7 +187,7 @@ class SunburstSeriesModel extends SeriesModel<SunburstSeriesOption> {
         return params;
     }
 
-    defaultOption: SunburstSeriesOption = {
+    static defaultOption: SunburstSeriesOption = {
         zlevel: 0,
         z: 2,
 
diff --git a/src/component/timeline/SliderTimelineView.ts b/src/component/timeline/SliderTimelineView.ts
index aae646c..33191cd 100644
--- a/src/component/timeline/SliderTimelineView.ts
+++ b/src/component/timeline/SliderTimelineView.ts
@@ -112,10 +112,6 @@ class SliderTimelineView extends TimelineView {
             var mainGroup = this._createGroup('_mainGroup');
             var labelGroup = this._createGroup('_labelGroup');
 
-            /**
-             * @private
-             * @type {module:echarts/component/timeline/TimelineAxis}
-             */
             var axis = this._axis = this._createAxis(layoutInfo, timelineModel);
 
             timelineModel.formatTooltip = function (dataIndex: number) {
@@ -169,6 +165,10 @@ class SliderTimelineView extends TimelineView {
                 vertical: {left: '-', right: '+'}
             } as const)[orient][labelPosOpt];
         }
+        else {
+            // is number
+            parsedLabelPos = labelPosOpt;
+        }
 
         var labelAlignMap = {
             horizontal: 'center',
@@ -284,7 +284,7 @@ class SliderTimelineView extends TimelineView {
 
         var labelPosOpt = layoutInfo.labelPosOpt;
 
-        if (isString(labelPosOpt)) { // '+' or '-'
+        if (labelPosOpt == null || isString(labelPosOpt)) { // '+' or '-'
             var mainBoundIdx = labelPosOpt === '+' ? 0 : 1;
             toBound(mainPosition, mainBound, viewBound, 1, mainBoundIdx);
             toBound(labelsPosition, labelBound, viewBound, 1, 1 - mainBoundIdx);
diff --git a/src/component/visualMap/PiecewiseModel.ts b/src/component/visualMap/PiecewiseModel.ts
index d0afc4d..da91dcd 100644
--- a/src/component/visualMap/PiecewiseModel.ts
+++ b/src/component/visualMap/PiecewiseModel.ts
@@ -140,6 +140,7 @@ class PiecewiseModel extends VisualMapModel<PiecewiseVisualMapOption> {
 
         var mode = this._mode = this._determineMode();
 
+        this._pieceList = [];
         resetMethods[this._mode].call(this, this._pieceList);
 
         this._resetSelected(newOption, isInit);
diff --git a/test/asset/echarts-logo.png b/test/asset/echarts-logo.png
new file mode 100644
index 0000000..09b3822
Binary files /dev/null and b/test/asset/echarts-logo.png differ
diff --git a/test/bar.html b/test/bar.html
index fbb3137..ad8923d 100644
--- a/test/bar.html
+++ b/test/bar.html
@@ -164,7 +164,7 @@ under the License.
                             myTool2: {
                                 show: true,
                                 title: '自定义扩展方法2',
-                                icon: 'image://http://echarts.baidu.com/images/favicon.png',
+                                icon: 'image://./asset/echarts-logo.png',
                                 onclick: function (){
                                     alert('myToolHandler2')
                                 }
diff --git a/test/symbol.html b/test/symbol.html
index e306b89..5290570 100644
--- a/test/symbol.html
+++ b/test/symbol.html
@@ -51,7 +51,7 @@ under the License.
                     'triangle',
                     'diamond',
                     'pin',
-                    'image://http://echarts.baidu.com/doc/asset/img/echarts-logo.png',
+                    'image://./asset/echarts-logo.png',
                     'path://M432.45,595.444c0,2.177-4.661,6.82-11.305,6.82c-6.475,0-11.306-4.567-11.306-6.82s4.852-6.812,11.306-6.812C427.841,588.632,432.452,593.191,432.45,595.444L432.45,595.444z M421.155,589.876c-3.009,0-5.448,2.495-5.448,5.572s2.439,5.572,5.448,5.572c3.01,0,5.449-2.495,5.449-5.572C426.604,592.371,424.165,589.876,421.155,589.876L421.155,589.876z M421.146,591.891c-1.916,0-3.47,1.589-3.47,3.549c0,1.959,1.554,3.548,3.47,3.548s3.469-1.589,3.469-3.548C424.614,593.479,423.06 [...]
                     'emptyPath://M432.45,595.444c0,2.177-4.661,6.82-11.305,6.82c-6.475,0-11.306-4.567-11.306-6.82s4.852-6.812,11.306-6.812C427.841,588.632,432.452,593.191,432.45,595.444L432.45,595.444z M421.155,589.876c-3.009,0-5.448,2.495-5.448,5.572s2.439,5.572,5.448,5.572c3.01,0,5.449-2.495,5.449-5.572C426.604,592.371,424.165,589.876,421.155,589.876L421.155,589.876z M421.146,591.891c-1.916,0-3.47,1.589-3.47,3.549c0,1.959,1.554,3.548,3.47,3.548s3.469-1.589,3.469-3.548C424.614,593.479,4 [...]
                 ];


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