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/07/22 06:07:04 UTC

[incubator-echarts] branch optimize-style updated: fix(treemap): truncate text when exceeds height

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

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


The following commit(s) were added to refs/heads/optimize-style by this push:
     new 26ca0b5  fix(treemap): truncate text when exceeds height
26ca0b5 is described below

commit 26ca0b5b02d0a5009293570b60338bbdafd2bced
Author: pissang <bm...@gmail.com>
AuthorDate: Wed Jul 22 14:06:42 2020 +0800

    fix(treemap): truncate text when exceeds height
---
 src/chart/treemap/TreemapView.ts | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/chart/treemap/TreemapView.ts b/src/chart/treemap/TreemapView.ts
index 4162527..1601e01 100644
--- a/src/chart/treemap/TreemapView.ts
+++ b/src/chart/treemap/TreemapView.ts
@@ -985,6 +985,8 @@ function renderNode(
         const textStyle = textEl.style;
         textStyle.truncateMinChar = 2;
         textStyle.width = width;
+        textStyle.height = height;
+        textStyle.lineOverflow = 'truncate';
 
         addDrillDownIcon(textStyle, upperLabelRect, thisLayout);
         const textEmphasisState = textEl.getState('emphasis');


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