8000 Make hover spikes work when no tick labels are present by etpinard · Pull Request #1980 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

Make hover spikes work when no tick labels are present #1980

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Sep 5, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
split cases of early returns in drawLabels
- when label position is undefined, don't (re)-calc its bounding box
  as that could override previous 'correct' calculations
  (e.g. when overlaying axes are present)
- add dummy bounding box value whenever showticklabels is false
  • Loading branch information
etpinard committed Sep 5, 2017
commit 874b1ba4d2a53ea4580a851e36ee4e542a80ad4c
8 changes: 7 additions & 1 deletion src/plots/cartesian/axes.js
Original file line number Diff line number Diff line change
Expand Up @@ -1825,7 +1825,13 @@ axes.doTicks = function(gd, axid, skipTitle) {
// tick labels - for now just the main labels.
// TODO: mirror labels, esp for subplots
var tickLabels = container.selectAll('g.' + tcls).data(vals, datafn);
if(!ax.showticklabels || !isNumeric(position)) {

if(!isNumeric(position)) {
tickLabels.remove();
drawAxTitle();
return;
}
if(!ax.showticklabels) {
tickLabels.remove();
drawAxTitle();
calcBoundingBox();
Expand Down
0