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

Add adapter property to AjaxDataSource #8321

Merged
merged 3 commits into from Oct 13, 2018

Conversation

Projects
None yet
2 participants
@bryevdv
Copy link
Member

bryevdv commented Oct 12, 2018

This small PR adds an adapter property to AjaxDataSource that accepts a customJS that will convert any arbitrary JSON response into Bokeh CDS data format. The ajax_source.py is updated and simplified to demonstrate this new fearture.

@bryevdv

This comment has been minimized.

Copy link
Member Author

bryevdv commented Oct 12, 2018

cc @bokeh/dev Although this change makes AjaxDataSource vastly more useful, it only required a small, isolated batch of work. I think things should be uncontroversial, and I'd like to merge this tonight, but any quick comments are welcome.

If provided, this callback is executes imediately after the JSON data is
received, but before apprending or replacing data in the data source. The
CustomJS callback will receiece the AjaxDataSource as ``cb_obj`` and will

This comment has been minimized.

@canavandl

canavandl Oct 12, 2018

Contributor

"receiece" (sp)

A JavaScript callback to adapt raw JSON responses to Bokeh ColumnDataSource
format.
If provided, this callback is executes imediately after the JSON data is

This comment has been minimized.

@canavandl

canavandl Oct 12, 2018

Contributor

"imediately" (sp)

@canavandl
Copy link
Contributor

canavandl left a comment

A couple of small spelling issues, but otherwise LGTM

bryevdv added some commits Oct 12, 2018

@bryevdv bryevdv merged commit a1bf4e6 into master Oct 13, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@bryevdv bryevdv deleted the bryanv/ajax_customjs branch Oct 13, 2018

xavArtley pushed a commit to xavArtley/bokeh that referenced this pull request Oct 15, 2018

Add adapter property to AjaxDataSource (bokeh#8321)
* Add adapter property to AjaxDataSource

* small fixes

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