Skip to content

Commit

Permalink
Fxing bug in label generation for multiple groupbys (apache#3594)
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianmenges authored and michellethomas committed May 23, 2018
1 parent 9ddfcfe commit 7b02a4c
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions superset/assets/visualizations/nvd3_vis.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,16 @@ function getMaxLabelSize(container, axisClass) {
/* eslint-disable camelcase */
function formatLabel(column, verbose_map) {
let label;
if (verbose_map) {
if (Array.isArray(column) && column.length) {
label = verbose_map[column[0]];
if (column.length > 1) {
label += `, ${column.slice(1).join(', ')}`;
}
} else {
label = verbose_map[column];
if (Array.isArray(column) && column.length) {
label = verbose_map[column[0]] || column[0];
if (column.length > 1) {
label += ', ';
}
label += column.slice(1).join(', ');
} else {
label = verbose_map[column] || column;
}
return label || column;
return label;
}
/* eslint-enable camelcase */

Expand Down

0 comments on commit 7b02a4c

Please sign in to comment.