Skip to content

Gridlines which would intersect inside tick labels should not be drawn #5502

Closed

Description

@nicolaskruchten

As discussed in the meeting, let's just call this a bug, and suppress any gridlines/ticks/ticklabels whose position is within the bounding box of any inside tick labels. Resolving this should resolve some cases of #5404

Activity

  1. nicolaskruchten commented on Mar 16, 2021

    @nicolaskruchten
    ContributorAuthor

    Some additional context for this issue:

    • the core idea is that nothing should occlude or interfere with the inside tick labels, so that means gridlines and zerolines. Note that axis base lines don't interfere with the labels or ticks, so they can stay
    • the secondary idea is that nothing distracting should be drawn within the same extent even if it doesn't intersect, so no tick labels or ticks should appear on the X axis if they would appear below the inside tick labels on the Y axis. This is pretty straightforward in non-period-positioned cases: hide the gridlines and their ticks and labels
    • One tricky edge case would be with Y labels on the inside right with X labels in period-positioning mode: it would be quite possible to get a gridline that does not intersect the inside labels but its ticklabel would be drawn underneath them. In this case we should keep the gridline but drop the label.
  2. nicolaskruchten commented on Mar 16, 2021

    @nicolaskruchten
    ContributorAuthor

    Addendum: for that final case, we should drop the label only if its centerline will intersect the y tick labels. That's more in keeping with the style guide in question.

  3. archmoj commented on Mar 17, 2021

    @archmoj
    Contributor

    I noticed showing data without zerolines could be misleading in most cases.

  4. nicolaskruchten commented on Mar 17, 2021

    @nicolaskruchten
    ContributorAuthor

    can you provide an example plz?

  5. archmoj commented on Mar 17, 2021

    @archmoj
    Contributor

    can you provide an example plz?

    For example:

    hideZeroLines

  6. nicolaskruchten commented on Mar 17, 2021

    @nicolaskruchten
    ContributorAuthor

    fair enough. That seems unlikely-enough to be the developer's intent that I'm OK with this behaviour.

  7. nicolaskruchten commented on Mar 17, 2021

    @nicolaskruchten
    ContributorAuthor

    I used the artifact from this branch in this pen https://codepen.io/nicolaskruchten/pen/BaLGYeW?editors=0010 (couldn't save because the URL is too long) and it seemed like the right-most ticklabel didn't disappear early enough as I panned. It seemed like it disappeared when its centerline hit the edge of the plot rather than the left edge of the inside ticklabel bounding boxes.

  8. archmoj commented on Apr 7, 2021

    @archmoj
    Contributor

    This is fixed by #5550.

  9. archmoj commented on Apr 7, 2021

    @archmoj
    Contributor

    This is fixed by #5550.

    Here is a codepen using master.

  10. nicolaskruchten commented on Apr 7, 2021

    @nicolaskruchten
    ContributorAuthor

    Thanks! Do you have a pen that demonstrates this one?

    • One tricky edge case would be with Y labels on the inside right with X labels in period-positioning mode: it would be quite possible to get a gridline that does not intersect the inside labels but its ticklabel would be drawn underneath them. In this case we should keep the gridline but drop the label.
  11. archmoj commented on Apr 7, 2021

    @archmoj
    Contributor

    Thanks! Do you have a pen that demonstrates this one?

    • One tricky edge case would be with Y labels on the inside right with X labels in period-positioning mode: it would be quite possible to get a gridline that does not intersect the inside labels but its ticklabel would be drawn underneath them. In this case we should keep the gridline but drop the label.

    Good call.
    Here is the codepen for the case of period.
    So it looks we need another PR to handle that period edge case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsomething broken

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions