You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by su...@apache.org on 2020/04/28 16:42:55 UTC

[incubator-echarts] branch next updated (08d6c47 -> 2708396)

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

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


    from 08d6c47  fix: incorrect commit ed73906f11fadec7b2f0af37fb0972a84d30bf5d
     new b338c22  fix: (1) move "auto outside stroke" back to zrender. Think that's reasonable to auto provide this strategy to user. (2) do not specify insideStroke directly, use zrender auto strategry, otherwise incorrect in emphasis.
     new 2708396  fix: tweak emphasis text position.

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/util/graphic.ts  | 15 +++++++--------
 test/hoverStyle.html | 11 ++++++++++-
 2 files changed, 17 insertions(+), 9 deletions(-)


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


[incubator-echarts] 01/02: fix: (1) move "auto outside stroke" back to zrender. Think that's reasonable to auto provide this strategy to user. (2) do not specify insideStroke directly, use zrender auto strategry, otherwise incorrect in emphasis.

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

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

commit b338c2235ed8091264554534b41e76fcdb63e338
Author: 100pah <su...@gmail.com>
AuthorDate: Tue Apr 28 17:58:29 2020 +0800

    fix: (1) move "auto outside stroke" back to zrender. Think that's reasonable to auto provide this strategy to user.
    (2) do not specify insideStroke directly, use zrender auto strategry, otherwise incorrect in emphasis.
---
 src/util/graphic.ts | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/util/graphic.ts b/src/util/graphic.ts
index 01b9b3f..69b435a 100644
--- a/src/util/graphic.ts
+++ b/src/util/graphic.ts
@@ -803,10 +803,7 @@ export function createTextConfig(
 
     // fill and auto is determined by the color of path fill if it's not specified by developers.
     textConfig.outsideFill = opt.autoColor || null;
-    textConfig.insideStroke = opt.autoColor || null;
-    // Set default stroke, which is useful when label is over other
-    // messy graphics (like lines) in background.
-    textConfig.outsideStroke = 'rgba(255, 255, 255, 0.9)';
+
     // if (!textStyle.fill) {
     //     textConfig.insideFill = 'auto';
     //     textConfig.outsideFill = opt.autoColor || null;


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


[incubator-echarts] 02/02: fix: tweak emphasis text position.

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

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

commit 270839676f5744ad72bf0c43138e38e3e9cd6f30
Author: 100pah <su...@gmail.com>
AuthorDate: Wed Apr 29 00:42:09 2020 +0800

    fix: tweak emphasis text position.
---
 src/util/graphic.ts  | 10 ++++++----
 test/hoverStyle.html | 11 ++++++++++-
 2 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/src/util/graphic.ts b/src/util/graphic.ts
index 69b435a..2875480 100644
--- a/src/util/graphic.ts
+++ b/src/util/graphic.ts
@@ -705,13 +705,15 @@ export function setLabelStyle<LDI>(
             targetEl.setTextConfig(createTextConfig(
                 normalStyle,
                 normalModel,
-                opt
+                opt,
+                false
             ));
             const targetElEmphasisState = targetEl.ensureState('emphasis');
             targetElEmphasisState.textConfig = createTextConfig(
                 emphasisState.style,
                 emphasisModel,
-                opt
+                opt,
+                true
             );
         }
 
@@ -765,8 +767,8 @@ export function createTextStyle(
 export function createTextConfig(
     textStyle: TextStyleProps,
     textStyleModel: Model,
-    opt?: TextCommonParams,
-    isEmphasis?: boolean
+    opt: TextCommonParams,
+    isEmphasis: boolean
 ) {
     const textConfig: ElementTextConfig = {};
     let labelPosition;
diff --git a/test/hoverStyle.html b/test/hoverStyle.html
index 4fd2b48..6a5bca7 100644
--- a/test/hoverStyle.html
+++ b/test/hoverStyle.html
@@ -368,7 +368,16 @@ under the License.
                         type: 'scatter',
                         symbolSize: 30,
                         data: [
-                            [12, 331], [55, 131], [55, 531]
+                            {
+                                value: [12, 331],
+                                label: {
+                                    show: true,
+                                    formatter: 'position top\neven hoverred',
+                                    fontSize: 20,
+                                    position: 'top'
+                                }
+                            },
+                            [55, 131], [55, 531]
                         ]
                     }, {
                         type: 'scatter',


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