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

allow custom formatter when using the hover tool #7647

Closed
scaine1 opened this Issue Mar 18, 2018 · 5 comments

Comments

Projects
None yet
2 participants
@scaine1

scaine1 commented Mar 18, 2018

Background
The python library geoviews (http://geoviews.org/) uses bokeh as a backend when interactive plotting geographical data is required.
Typically data on a latitude/longitude grid is converted to a Web Mercator projection and displayed using bokeh.

The Issue
When using the hover tool on data transformed in to Web Mercator format, the user is shown the transformed values for latitude/longitude rather than the original latitude/longitude values.
Attached is an image that shows this issue

geoviews_hover

There have some discussions on how to solve this issue at pyviz/geoviews#100 and it seems the consensus would be that the nicest way to solve the problem would be if a custom formatter could be applied to the hover tool.
This would allow the Web Mercator transformed data could be transformed back to latitude/longitude values when displayed by the hover tool.

As this feature does not already exist I expect that it may be a niche issue relating to geoviews, however would adding a custom formatter to the hover tool be something you would be willing to consider?

@bryevdv

This comment has been minimized.

Member

bryevdv commented Mar 19, 2018

@scaine1 I think my immediate preference would be to :

  • add a generic CustomJSFormatter that is similar to several other "CustomJS" type models elswhere in Bokeh.

  • Add an example that demonstrates how to use it to format mercator values

  • Holoviews and other high level tools can use it to provide "built in" support at that level

@scaine1

This comment has been minimized.

scaine1 commented Mar 19, 2018

sounds ideal to me!

@bryevdv

This comment has been minimized.

Member

bryevdv commented Mar 19, 2018

@scaine1 Are you interested in working up this feature as a contribution? (Just asking, I could not tell if that's what you meant above by willing to consider)

@scaine1

This comment has been minimized.

scaine1 commented Mar 19, 2018

Unfortunately at this point I think it is beyond my abilities.
When I said ".. willing to consider .." I meant would the bokeh team be willing to consider adding this feature for me and other geoviews users. Sorry for not being clear.
Having said that, if you don't have anyone to work on it I could potentially dedicate some time over the next couple of months to learn how bokeh works and come up with a solution.

@bryevdv

This comment has been minimized.

Member

bryevdv commented Mar 19, 2018

@scaine1 no worries I just wanted to clarify. I think this is useful enough that I will probably try to get to it sooner rather than later, but if you are looking to get involved with a project don't let that stop you, there's plenty of other issues :)

@bryevdv bryevdv added this to the 0.12.16 milestone Mar 22, 2018

@bryevdv bryevdv closed this in #7674 May 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment