Skip to content

Improve positioning of rangebreaks #4698

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 11 commits into from
Mar 28, 2020
Prev Previous commit
Next Next commit
move b0 out
  • Loading branch information
archmoj committed Mar 27, 2020
commit 07caa6caca676ca93c17b3e6297939a96b18b11c
8 changes: 4 additions & 4 deletions src/plots/cartesian/set_convert.js
Original file line number Diff line number Diff line change
Expand Up @@ -742,8 +742,8 @@ module.exports = function setConvert(ax, fullLayout) {
bndDelta = (b1 >= b0 ? b1 - b0 : (b1 + 7) - b0) * ONEDAY;
step = 7 * ONEDAY;

t = r0 - (
(r0Date.getUTCDay() - b0) * ONEDAY +
t = r0 + b0 * ONEDAY - (
r0Date.getUTCDay() * ONEDAY +
r0Date.getUTCHours() * ONEHOUR +
r0Date.getUTCMinutes() * ONEMIN +
r0Date.getUTCSeconds() * ONESEC +
Expand All @@ -756,8 +756,8 @@ module.exports = function setConvert(ax, fullLayout) {
bndDelta = (b1 >= b0 ? b1 - b0 : (b1 + 24) - b0) * ONEHOUR;
step = ONEDAY;

t = r0 - (
(r0Date.getUTCHours() - b0) * ONEHOUR +
t = r0 + b0 * ONEHOUR - (
r0Date.getUTCHours() * ONEHOUR +
r0Date.getUTCMinutes() * ONEMIN +
r0Date.getUTCSeconds() * ONESEC +
r0Date.getUTCMilliseconds()
Expand Down