Skip to content

Commit

Permalink
fix(tooltip): Correct on toggling data series (#253)
Browse files Browse the repository at this point in the history
Side effect on implementing the new axis.x.tick.tooltip option

Fix #240
Close #253
  • Loading branch information
netil committed Jan 25, 2018
1 parent 862a41d commit e7d1b19
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions spec/internals/axis-spec.js
Expand Up @@ -490,6 +490,9 @@ describe("AXIS", function() {
ticks.each(function(d, i) {
expect(d3.select(this).select("title").text()).to.be.equal(categories[i]);
});

// check when toggling displaying data series
expect(() => chart.hide("data1")).to.not.throw();
});
});

Expand Down
2 changes: 1 addition & 1 deletion src/axis/bb.axis.js
Expand Up @@ -399,7 +399,7 @@ export default function(params = {}) {
}

// Append <title> for tooltip display
params.tickTitle && textUpdate.append("title")
params.tickTitle && textUpdate.append && textUpdate.append("title")
.each(function(index) {
d3Select(this).text(params.tickTitle[index]);
});
Expand Down

0 comments on commit e7d1b19

Please sign in to comment.