-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Cartesian dropline support #1461
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
d9fab15
5d39b53
be47533
17d815c
162068e
762b54a
d680bd4
2433d4c
75da2fe
7953488
55b17b2
b9f6ab1
7fe4363
34a1562
8c7ac76
6e243de
c036bf7
08371c2
69dc781
37b77fe
710d2d6
e509fa7
75121d2
bd11567
3a9aa58
052417b
a3a0a4f
f7b467e
7aa4359
5925049
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -138,7 +138,7 @@ function getButtonGroups(gd, buttonsToRemove, buttonsToAdd) { | |
addGroup(['hoverClosestGl2d']); | ||
} | ||
else if(hasCartesian) { | ||
addGroup(['hoverClosestCartesian', 'hoverCompareCartesian']); | ||
addGroup(['toggleSpikelines', 'hoverClosestCartesian', 'hoverCompareCartesian']); | ||
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. 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. My reasoning was to put it beside 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. Good point. I'm ok leaving it there. |
||
} | ||
else if(hasPie) { | ||
addGroup(['hoverClosestPie']); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -151,9 +151,12 @@ Plotly.plot = function(gd, data, layout, config) { | |
makePlotFramework(gd); | ||
} | ||
|
||
// save initial axis range once per graph | ||
if(graphWasEmpty) Plotly.Axes.saveRangeInitial(gd); | ||
|
||
if(graphWasEmpty) { | ||
// save initial axis range once per graph | ||
Plotly.Axes.saveRangeInitial(gd); | ||
// save initial show spikes once per graph | ||
Plotly.Axes.saveShowSpikeInitial(gd); | ||
} | ||
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. |
||
|
||
// prepare the data and find the autorange | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -244,9 +244,9 @@ module.exports = { | |
role: 'style', | ||
description: 'Determines whether or not the tick labels are drawn.' | ||
}, | ||
showspikes: { | ||
showspike: { | ||
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. in 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. Alright, I can change this back. I was thinking of the plural in terms of the axes, not the data points. |
||
valType: 'boolean', | ||
dflt: true, | ||
dflt: false, | ||
role: 'style', | ||
description: [ | ||
'Determines whether or not spikes (aka droplines) are drawn for this axis.', | ||
|
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 (and
fullLayout._cartesianSpikesEnabled
) reads to me like a boolean, and it seems like that would simplify some of the logic too.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.
I agree, this would be better as a boolean, and is how I had it originally. I wound up changing it to take advantage of the modebar logic which sets the
active
class. Because theval
on the button is passed through adata-val
attr on the dom, and the is a strict equality check at https://github.com/plotly/plotly.js/blob/master/src/components/modebar/modebar.js#L211 I found I couldn't use a boolean. Open to suggestions that let me keep this as a boolean, but get to use the state display on the modebar.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.
Ah, makes sense. Sure, lets leave it as a string then. Thanks for pointing me back to this.