Skip to content

Commit 1b5748f

Browse files
committed
hovertext fix
1 parent 7550011 commit 1b5748f

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/plots/cartesian/axes.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1830,13 +1830,13 @@ function formatMultiCategory(ax, out, hover) {
18301830
cats.forEach(function(text, index) {
18311831
text = String(text);
18321832
if(index < texts.length - 1) {
1833-
hoverText = hoverText + ' ' + text + ' - ';
1833+
hoverText = hoverText + text + ' - ';
18341834
} else {
1835-
hoverText = hoverText + ' ' + text;
1835+
hoverText = hoverText + text;
18361836
}
18371837
});
18381838

1839-
out.text = hoverText.trim();
1839+
out.text = hoverText;
18401840
} else {
18411841
// setup for secondary labels
18421842
out.text = texts[0];

test/jasmine/tests/axes_test.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3897,8 +3897,6 @@ describe('Test axes', function() {
38973897
x: [['1', '1', '2', '2'], ['a', 'b', 'a', 'b']]
38983898
}, 'x', 'multicategory');
38993899

3900-
console.log(out)
3901-
39023900
expect(out).toEqual([0, 1, 2, 3]);
39033901
expect(ax._categories).toEqual([['1', 'a'], ['1', 'b'], ['2', 'a'], ['2', 'b']]);
39043902
expect(ax._categoriesMap).toEqual({'1,a': 0, '1,b': 1, '2,a': 2, '2,b': 3});

0 commit comments

Comments
 (0)