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/27 11:19:04 UTC

[incubator-echarts] branch next updated (1637e79 -> a555834)

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

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


    from 1637e79  ts: tweak const lint rule
     new aec616e  fix z and zlevel in textContent
     new a555834  refact: fix truncate and breadcrumb text in treemap.

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/treemap/Breadcrumb.ts  | 16 ++++++++++++----
 src/chart/treemap/TreemapView.ts |  5 +++++
 src/echarts.ts                   |  4 ++--
 3 files changed, 19 insertions(+), 6 deletions(-)


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


[incubator-echarts] 02/02: refact: fix truncate and breadcrumb text in treemap.

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

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

commit a555834a7ff17815ad9de3acd5bb86fb2e5822b1
Author: pissang <bm...@gmail.com>
AuthorDate: Fri Mar 27 19:18:18 2020 +0800

    refact: fix truncate and breadcrumb text in treemap.
---
 src/chart/treemap/Breadcrumb.ts  | 16 ++++++++++++----
 src/chart/treemap/TreemapView.ts |  5 +++++
 2 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/src/chart/treemap/Breadcrumb.ts b/src/chart/treemap/Breadcrumb.ts
index 94f7715..6d8d5f5 100644
--- a/src/chart/treemap/Breadcrumb.ts
+++ b/src/chart/treemap/Breadcrumb.ts
@@ -165,15 +165,23 @@ class Breadcrumb {
                 style: defaults(
                     normalStyleModel.getItemStyle(),
                     {
-                        lineJoin: 'bevel',
-                        text: text,
-                        textFill: textStyleModel.getTextColor(),
-                        textFont: textStyleModel.getFont()
+                        lineJoin: 'bevel'
                     }
                 ),
+                textContent: new graphic.Text({
+                    style: {
+                        text,
+                        fill: textStyleModel.getTextColor(),
+                        font: textStyleModel.getFont()
+                    }
+                }),
+                textConfig: {
+                    position: 'inside'
+                },
                 z: 10,
                 onclick: curry(onSelect, itemNode)
             });
+
             this.group.add(el);
 
             packEventData(el, seriesModel, itemNode);
diff --git a/src/chart/treemap/TreemapView.ts b/src/chart/treemap/TreemapView.ts
index 77c8f86..e94ffad 100644
--- a/src/chart/treemap/TreemapView.ts
+++ b/src/chart/treemap/TreemapView.ts
@@ -966,6 +966,11 @@ function renderNode(
             }
         );
 
+        const textEl = rectEl.getTextContent();
+        textEl.style.overflow = 'truncate';
+        textEl.style.truncateMinChar = 2;
+        textEl.style.width = width;
+
         // TODOTODO
         // upperLabelRect && (normalStyle.textRect = clone(upperLabelRect));
 


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


[incubator-echarts] 01/02: fix z and zlevel in textContent

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

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

commit aec616ed2a91e2399b4aef5ff589855aa67e328b
Author: pissang <bm...@gmail.com>
AuthorDate: Fri Mar 27 19:10:29 2020 +0800

    fix z and zlevel in textContent
---
 src/echarts.ts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/echarts.ts b/src/echarts.ts
index a5754e0..679d646 100644
--- a/src/echarts.ts
+++ b/src/echarts.ts
@@ -1714,8 +1714,8 @@ class ECharts extends Eventful {
 
                     const textContent = el.getTextContent();
                     if (textContent) {
-                        textContent.z = z;
-                        textContent.zlevel = zlevel;
+                        textContent.z = el.z;
+                        textContent.zlevel = el.zlevel;
                         // lift z2 of text content
                         textContent.z2 = el.z2 + 1;
                     }


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