-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Rangeslider allow zoom on oppaxis #2364
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
519e1a7
044e633
f335258
707f432
6a7f652
fc4f082
92c6550
b30167c
91caff1
3dd91b5
00fd1d7
5e0486a
32488f1
bc2a40a
d3b6071
b496641
149ef70
54d8b58
dd48914
a8a3ee5
0ae2831
8764e4d
a17d3a8
e85e3d0
0dd8562
3929be6
e2ad33d
df85f35
fe83e07
3b6b81a
9de4e3e
f2819c8
df96a13
9c66f81
f092c44
041ce3d
23c8401
73560f6
c556f8c
43f15a7
ccb6091
6a88b24
95b8c10
4f54f62
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 |
---|---|---|
|
@@ -391,7 +391,7 @@ axes.saveRangeInitial = function(gd, overwrite) { | |
} | ||
// store the initial range for the rangeslider if we zoom on oppaxis | ||
if((isNew && ax.fixedrange === false) || (overwrite && hasChanged)) { | ||
ax._rangeBeforeZoom = ax.range.slice(); | ||
ax._rangesliderInitialRange = ax.range.slice(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, one issue with this: That seems to me to mean that we need a real attribute for the range of each y axis on the rangeslider, and perhaps even an attribute for whether to autorange that y axis on the range slider - it would be cool if the y axis could be told to autorange in the range slider even if you start out zoomed in on the main plot, wouldn't it? BTW I came to this realization as I was thinking "what tests should we have for this feature", noting that a big part of this is drawing code so it should have an image test, but then realizing as it stands we can't make an image test because we have no mechanism to force There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right, I didn't think about that. |
||
} | ||
} | ||
|
||
|
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 probably a little to verbose for our needs. Attribute names rarely have more than two words smashed together.
The best option that comes to my mind is
xaxis.rangeslider.fixedanchor: false || true
, butanchor
is used already elsewhere to declare a different thing.Looking for opinions from @alexcjohnson @cldougl and @chriddyp
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.
Yeah, I find it also too verbose but I prefered to use a clear name until we have a better proposal (since anchor is already used).
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.
given that the range slider is always an x axis, we could use something like
fixedyrange
- and if we ever make a y axis range slider it can get afixedxrange
attribute.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.
It does makes sense, I was not quite sure rangeslider was for x-axis only.