-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Axis labels could be applied in the hovering popup #3317
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 9 commits
61f61b0
fa82506
7955cba
6230dd5
bcefabb
4ee4fa2
7495533
703eaaf
b73403a
fd8cb47
202c210
61ca8ce
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 |
---|---|---|
|
@@ -56,7 +56,10 @@ module.exports = function handleAxisDefaults(containerIn, containerOut, coerce, | |
|
||
handleCategoryOrderDefaults(containerIn, containerOut, coerce, options); | ||
|
||
if(axType !== 'category' && !options.noHover) coerce('hoverformat'); | ||
if(axType !== 'category' && !options.noHover) { | ||
coerce('hoverformat'); | ||
coerce('hovertitle'); | ||
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. Could we give this a default value? By implementing something like: coerce('hovertitle', options.dfltHoverTitle); Each |
||
} | ||
|
||
if(!visible) return containerOut; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -593,6 +593,15 @@ module.exports = { | |
'*%H~%M~%S.%2f* would display *09~15~23.46*' | ||
].join(' ') | ||
}, | ||
hovertitle: { | ||
valType: 'string', | ||
dflt: '', | ||
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. Remove this line. The |
||
role: 'info', | ||
editType: 'none', | ||
description: [ | ||
'Sets axis title(s) to be displayed in the hovering popup' | ||
].join(' ') | ||
}, | ||
// lines and grids | ||
showline: { | ||
valType: 'boolean', | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,28 +2,59 @@ | |
"data": [ | ||
{ | ||
"type": "heatmap", | ||
"x": [0, 1, 2], | ||
"y": [0, 1, 2], | ||
"x": [0, 1, 2, 3, 4], | ||
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. Why did you patch this mock? 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. This was a new mock added quite recently. I thought we could expand a bit to allow interactivelytesting |
||
"y": [0, 1, 2, 3, 4], | ||
"z": [ | ||
[0, 1, 0], | ||
[1, 0, 1], | ||
[0, 1, 0] | ||
[0, 1, 0, 1, 0], | ||
[1, 0.25, 0.75, 0.25, 1], | ||
[0, 0.75, 0.25, 0.75, 0], | ||
[1, 0.25, 0.75, 0.25, 1], | ||
[0, 1, 0, 1, 0] | ||
] | ||
}, | ||
{ | ||
"type": "surface", | ||
"x": [0, 1, 2], | ||
"y": [0, 1, 2], | ||
"x": [0, 1, 2, 3, 4], | ||
"y": [0, 1, 2, 3, 4], | ||
"z": [ | ||
[0, 1, 0], | ||
[1, 0, 1], | ||
[0, 1, 0] | ||
[0, 1, 0, 1, 0], | ||
[1, 0.25, 0.75, 0.25, 1], | ||
[0, 0.75, 0.25, 0.75, 0], | ||
[1, 0.25, 0.75, 0.25, 1], | ||
[0, 1, 0, 1, 0] | ||
] | ||
} | ||
], | ||
"layout": { | ||
"title": "Surface 3d plot on top of 2d heatmap!", | ||
"width": 600, | ||
"height": 400 | ||
"height": 400, | ||
"scene": { | ||
"xaxis": { | ||
"hovertitle": "lon", | ||
"title": { | ||
"text": "Longitude" | ||
} | ||
}, | ||
"yaxis": { | ||
"hovertitle": "lat", | ||
"title": { | ||
"text": "Latitude" | ||
} | ||
}, | ||
"zaxis": { | ||
"hovertitle": "alt", | ||
"title": { | ||
"text": "Altitude" | ||
} | ||
}, | ||
"camera": { | ||
"eye": { | ||
"x": 2, | ||
"y": 2, | ||
"z": 2 | ||
} | ||
} | ||
} | ||
} | ||
} |
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.
Nop. Please don't include version-specific logic. Write code for
v1.x
, we'll patch this up in av2
branch when we get there.