You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by ov...@apache.org on 2019/05/22 09:06:51 UTC

[incubator-echarts] 01/02: Label color support function

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

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

commit 0afe271b83ea93c2314198b2a4ef29db5af5a822
Author: susiwen <su...@gmail.com>
AuthorDate: Thu May 16 20:13:03 2019 +0800

    Label color support function
---
 src/util/graphic.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/util/graphic.js b/src/util/graphic.js
index b8c2373..c17192a 100644
--- a/src/util/graphic.js
+++ b/src/util/graphic.js
@@ -653,6 +653,10 @@ export function setLabelStyle(
         setTextStyle(emphasisStyle, emphasisModel, emphasisSpecified, opt, true);
     }
 
+    if (typeof normalModel.get('color') === 'function') {
+        normalStyle.textFill = normalModel.get('color')(labelDataIndex);
+    }
+
     normalStyle.text = normalStyleText;
     emphasisStyle.text = emphasisStyleText;
 }


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