You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@echarts.apache.org by GitBox <gi...@apache.org> on 2018/11/17 14:19:40 UTC

[GitHub] 100pah closed pull request #9385: Solve the problem of formatter displaying object

100pah closed pull request #9385: Solve the problem of formatter displaying object
URL: https://github.com/apache/incubator-echarts/pull/9385
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/src/util/format.js b/src/util/format.js
index 0f0581bd3..2d2cfa4b1 100644
--- a/src/util/format.js
+++ b/src/util/format.js
@@ -103,6 +103,9 @@ export function formatTpl(tpl, paramsList, encode) {
     for (var seriesIdx = 0; seriesIdx < seriesLen; seriesIdx++) {
         for (var k = 0; k < $vars.length; k++) {
             var val = paramsList[seriesIdx][$vars[k]];
+            if (zrUtil.isObject(val)) {
+                val = val[$vars[k]];
+            }
             tpl = tpl.replace(
                 wrapVar(TPL_VAR_ALIAS[k], seriesIdx),
                 encode ? encodeHTML(val) : val


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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