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/05/19 06:45:39 UTC

[echarts] branch fix-label created (now ea7c1c2)

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

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


      at ea7c1c2  fix(label): ensure the label of the temporary symbol is in front of line and area polygon. - resolves #14541 - resolves #14735

This branch includes the following new commits:

     new ea7c1c2  fix(label): ensure the label of the temporary symbol is in front of line and area polygon. - resolves #14541 - resolves #14735

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] 01/01: fix(label): ensure the label of the temporary symbol is in front of line and area polygon. - resolves #14541 - resolves #14735

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

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

commit ea7c1c26dec0b73fe89b1f967bf02b138f3bf8be
Author: plainheart <yh...@all-my-life.cn>
AuthorDate: Wed May 19 14:42:27 2021 +0800

    fix(label): ensure the label of the temporary symbol is in front of line and area polygon.
    - resolves #14541
    - resolves #14735
---
 src/chart/line/LineView.ts | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/chart/line/LineView.ts b/src/chart/line/LineView.ts
index 84b8fde..d14424b 100644
--- a/src/chart/line/LineView.ts
+++ b/src/chart/line/LineView.ts
@@ -833,17 +833,20 @@ class LineView extends ChartView {
                 if (this._clipShapeForSymbol && !this._clipShapeForSymbol.contain(x, y)) {
                     return;
                 }
+                const zlevel = seriesModel.get('zlevel');
+                const z = seriesModel.get('z');
                 symbol = new SymbolClz(data, dataIndex);
                 symbol.x = x;
                 symbol.y = y;
-                symbol.setZ(
-                    seriesModel.get('zlevel'),
-                    seriesModel.get('z')
-                );
+                symbol.setZ(zlevel, z);
 
-                // ensure label text of the temporal symbol is on the top of line and area polygon
+                // ensure label text of the temporary symbol is in front of line and area polygon
                 const symbolLabel = symbol.getSymbolPath().getTextContent();
-                symbolLabel && (symbolLabel.z2 = this._polyline.z2 + 1);
+                if (symbolLabel) {
+                    symbolLabel.zlevel = zlevel;
+                    symbolLabel.z = z;
+                    symbolLabel.z2 = this._polyline.z2 + 1;
+                }
 
                 (symbol as SymbolExtended).__temp = true;
                 data.setItemGraphicEl(dataIndex, symbol);

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