Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Fixed bokeh FuncTickFormater #1010
As described in #885 in bokeh 0.12.3 the signature of python FuncTickFormatters was changed in a way that is inconsistent with formatters in holoviews. This PR adds a utility that compiles the python formatter with pyscript directly and then patches the generated JS code so the arg are made available in the namespace rather than being passed to the function. It's not exactly pretty but I don't see a way around it. I've also added some unit tests.
changed the title
Fixed FuncTickFormater with py2js_tickformatter util and tests
Dec 10, 2016
I've never been entirely happy with the
Just as a shot in the dark, is there any chance AST tricks could be applied to the python function before passing it to
As I know you are aware, this isn't a nice approach and I'm afraid I don't have any better suggestions right now. Having a working tick formatter for bokeh is more important than avoiding one nasty function and on that basis, I'll now merge.
Dec 11, 2016
Agreed, definitely not pretty.
Looked into this briefly but found no nice approach that actually worked, especially across python versions.