Skip to content
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

Plotly 3.2.0 troubles with Pandas Series date time display #1160

Closed
VelizarVESSELINOV opened this issue Sep 6, 2018 · 4 comments
Closed
Labels
bug something broken
Milestone

Comments

@VelizarVESSELINOV
Copy link

Migrated to the latest version of Plotly and have troubles to display date time data in a Scatter plot.
Using the same Python code passing Pandas DateTime columns:
3.1.1. give us the following output:

"x": ["2015-09-05 14:30:00", ...

3.2.0 give us:

"x": [1441463400000000000, ...
@jonmmease
Copy link
Contributor

Thanks for reporting this @VelizarVESSELINOV ,

Looks like an oversight from #1149

@jonmmease jonmmease added the bug something broken label Sep 6, 2018
jonmmease added a commit that referenced this issue Sep 7, 2018
 1) Preserve numeric numpy types as is in validator out, even if that
    numeric type is not supported as JavaScript TypedArray
 2) Update widget serializer to check numeric numpy arrays for whether
    they are compatible with TypedArrays. If not, serialize as list.
 3) Call to_pydatetime() on pandas datetime series/index values
    when passed to copy_to_readonly_numpy_array. This returns numpy
    array of datetimes (which we already know how to serialize)

Fixes datetime issue in #1160
Fixes FigureWidget issue in #1155
@jonmmease jonmmease added this to the v3.2.1 milestone Sep 8, 2018
jonmmease added a commit that referenced this issue Sep 8, 2018
* Fix error when setting compound or compound array property to `None`

* Pandas datetime and numpy numeric array fixes

 1) Preserve numeric numpy types as is in validator out, even if that
    numeric type is not supported as JavaScript TypedArray
 2) Update widget serializer to check numeric numpy arrays for whether
    they are compatible with TypedArrays. If not, serialize as list.
 3) Call to_pydatetime() on pandas datetime series/index values
    when passed to copy_to_readonly_numpy_array. This returns numpy
    array of datetimes (which we already know how to serialize)

Fixes datetime issue in #1160
Fixes FigureWidget issue in #1155
@jonmmease
Copy link
Contributor

Fixed in #1163 and will be released next week as part of 3.2.1. I'm hoping to publish a release candidate of 3.2.1 on Monday, and it would be great if you could give it a try 🙂 Thanks again for the report!

@jonmmease
Copy link
Contributor

3.2.1rc1 is available. If you have time to confirm the issue is fixed for you that would great. Instructions at https://github.com/plotly/plotly.py/tree/release_3.2.1.

@pe224
Copy link

pe224 commented Sep 14, 2018

Can confirm that timestamps are correctly displayed again in 3.2.1rc1.
Thanks for your work and the fast fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

No branches or pull requests

3 participants