- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.9k
          Implement ticklabelstep on 2D axes & colorbars
          #6088
        
          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
Changes from 1 commit
49362b8
              29ab444
              3b259ed
              2676d24
              87e3340
              272534c
              3734680
              3d46d98
              a72616a
              89a2d91
              e973258
              7587333
              ad2b9a0
              e91bd55
              43af54a
              be33ec3
              cd65497
              eed58e0
              a883124
              bea95b1
              25724fb
              40a5532
              bbb4064
              61598b8
              ee7628a
              d834bbb
              File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
|  | @@ -412,6 +412,16 @@ module.exports = { | |
| 'To set ticks every 4 years, set `dtick` to *M48*' | ||
| ].join(' ') | ||
| }, | ||
| ticklabeljump: { | ||
| valType: 'integer', | ||
| min: 0, | ||
| dflt: 0, | ||
| editType: 'ticks', | ||
| description: [ | ||
| 'Sets the step between ticklabels.', | ||
| 'Could be used to hide labels between every n-th ticks.' | ||
|          | ||
| ].join(' ') | ||
| }, | ||
| tickvals: { | ||
| valType: 'data_array', | ||
| editType: 'ticks', | ||
|  | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I'm understanding this correctly, this way we're always going to get the first label that appears in the range, then every nth after that. But what we really want is to always get the label corresponding to
tick0if that's within the range, otherwise start n ticks away fromtick0. An important consequence of this is that as you pan around on a graph the same label will remain displayed or not displayed as long as it's in range.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Certain filtering logic is now moved from
drawLabelstocalcTicksby 29ab444.Next I'd try to improve on that to keep the same labels around...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now addressed by 3b259ed.