-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
JSON output type #663
Comments
@syamajala have you tried using: https://docs.python.org/2/library/json.html ?
|
Thats what I ended up doing, but I found I have to call json.dumps with plotly.utils.JSONEncoder as the cls argument. I think it might be because I was using numpy arrays. It would be nice if plotly.offline.plot just had a json output type so i wouldn't have to do this stuff myself. I could just call plot(output_type='json') and get a string back. |
It's unlikely that we will add this option but community PRs are welcome. |
I've made the modifications. Do I have to run unit tests with both nose and tox? Or is nose by itself enough? EDIT: I created a pull request. |
Any hope for this issue or PR #704? I have a similar use case, but this issue looks forgotten. |
I'm currently using
|
This functionality will be added with the |
Done in #1188 |
Would it be possible to add a JSON output type to plotly.offline.plot which could generate just a JSON string for data and layout without the div and script tags? I'd like to be able to generate my plots in python and just send a plot to a browser over a websocket.
The text was updated successfully, but these errors were encountered: