Skip to content
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

Mirrored axes have a huge bounding box #2434

Closed
nicolaskruchten opened this issue Mar 2, 2018 · 1 comment · Fixed by #4165
Closed

Mirrored axes have a huge bounding box #2434

nicolaskruchten opened this issue Mar 2, 2018 · 1 comment · Fixed by #4165
Assignees
Labels
bug something broken

Comments

@nicolaskruchten
Copy link
Contributor

setting mirror: 'allticks' on an axis results in a giant bounding box for the axis, which causes problems with the new automargin flag on axes, and the positioning of the rangeslider. You can see this problem in action by setting automargin on any of the axes here (once we release 1.35.0) https://codepen.io/nicolaskruchten/pen/WMWvVz

This is due to the fact that the mirrored axis is drawn with the same path as the 'main' axis where the ticklabels are. It would make some sense to draw that secondary axis in a different element, so that the bounding box of the main axis is independent of the mirror attribute.

@etpinard etpinard added the bug something broken label Mar 2, 2018
@alexcjohnson
Copy link
Collaborator

Really what we need to do is get rid of the getBoundingClientRect calls there altogether. This causes all sorts of problems, see #1988

@etpinard etpinard self-assigned this Aug 20, 2019
etpinard added a commit that referenced this issue Sep 4, 2019
... by registering a mirror-specific push-margin id.
    Note that to handle the 'all' and 'allticks', we use
    ax._counterDomain(Min|Max) added previously.
etpinard added a commit that referenced this issue Sep 4, 2019
... by registering a mirror-specific push-margin id.

- Note that to handle the 'all' and 'allticks', we use
  ax._counterDomain(Min|Max) added previously.
- both automargin-mirror* baselines are now correct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants