[title] Fix issue with non-string names in series title (#5433)

This commit is contained in:
John Bodley 2018-08-15 09:35:44 -07:00 committed by GitHub
parent c9bd5a6167
commit 4e3b2e7cbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View File

@ -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