8000 Fix rangebreaks overlapping and tick positions by archmoj · Pull Request #4831 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

Fix rangebreaks overlapping and tick positions #4831

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 22 commits into from
Jun 3, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
c28d0e5
centralize & refactor range expansions
archmoj Apr 6, 2020
1e63bfc
add rangebreaks tests with hourly and auto dticks
archmoj May 13, 2020
3baed24
revise tick positioning - fix dtick hourly - move tick0 outside the b…
archmoj May 13, 2020
4eab137
drop endpoint ticks that fall inside breaks
archmoj May 14, 2020
a7633c3
move last tick on rangebreaks to the start of break instead of removi…
archmoj May 15, 2020
d2d8e6e
revisit ticks on axes with rangebreaks
archmoj May 19, 2020
ca193eb
reject last tick that may include decimals
archmoj May 19, 2020
6b77b31
refactor - no need for else ifs in axes tickIncrement
archmoj May 19, 2020
ef14d60
add jasmine tests for axes with rangebreaks and set dtick
archmoj May 19, 2020
a0d4d0d
improve auto ticks on axes with rangebreaks
archmoj May 20, 2020
0fb92d4
attempt improving ticks on rangebreaks
archmoj Jun 1, 2020
5c8055b
fix issue 4879
archmoj Jun 1, 2020
0a782d8
invert if statement
archmoj Jun 2, 2020
6cd55b5
drop extra function for hour rangebreaks
archmoj Jun 2, 2020
db7d47d
drop extra logic for dayRatio
archmoj Jun 2, 2020
8c8c928
drop extra logic for dynamic oneDay
archmoj Jun 2, 2020
21f4284
drop extra logic for startHour
archmoj Jun 2, 2020
9e7b80e
drop extra logic for dayHours
archmoj Jun 2, 2020
22e5658
avoid too tick overlaps on x axes with rangebreaks and now only when …
archmoj Jun 2, 2020
b38688d
reverse loop order
archmoj Jun 2, 2020
c5cf45a
fixups to avoid single tick
archmoj Jun 2, 2020
9241578
reduce roughDTick by total length of breaks
archmoj Jun 3, 2020
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
reject last tick that may include decimals
  • Loading branch information
archmoj committed May 19, 2020
commit ca193ebe6b9ff8fc27789f23c38979529cf91ef7
2 changes: 2 additions & 0 deletions src/plots/cartesian/axes.js
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,8 @@ axes.calcTicks = function calcTicks(ax) {
var tickVal = tickVals[q];
if(ax.maskBreaks(tickVal.value) === BADNUM) {
tickVal.value = moveOutsideBreak(tickVal.value, ax);

if(ax._rl && tickVal.value === ax._rl[1]) continue;
}

var pos = ax.c2p(tickVal.value);
Expand Down
Binary file modified test/image/baselines/axes_breaks-dtick_auto.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/axes_breaks-dtick_hourly.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/axes_breaks-weekends-weeknights.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
0