You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by jo...@apache.org on 2018/08/15 16:35:47 UTC

[incubator-superset] branch master updated: [title] Fix issue with non-string names in series title (#5433)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 4e3b2e7  [title] Fix issue with non-string names in series title (#5433)
4e3b2e7 is described below

commit 4e3b2e7cbc2a8a79aebb7f53e06758b0a0da0f9a
Author: John Bodley <45...@users.noreply.github.com>
AuthorDate: Wed Aug 15 09:35:44 2018 -0700

    [title] Fix issue with non-string names in series title (#5433)
---
 superset/viz.py | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/superset/viz.py b/superset/viz.py
index e50ee1b..c060e19 100644
--- a/superset/viz.py
+++ b/superset/viz.py
@@ -1527,11 +1527,9 @@ class DistributionBarViz(DistributionPieViz):
                 continue
             if isinstance(name, string_types):
                 series_title = name
-            elif len(metrics) > 1:
-                series_title = ', '.join(name)
             else:
-                l = [text_type(s) for s in name[1:]]  # noqa: E741
-                series_title = ', '.join(l)
+                offset = 0 if len(metrics) > 1 else 1
+                series_title = ', '.join([text_type(s) for s in name[offset:]])
             values = []
             for i, v in ys.items():
                 x = i