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

legend shows additional information not in data set #1086

Closed
Alcampopiano opened this issue Aug 13, 2018 · 6 comments
Closed

legend shows additional information not in data set #1086

Alcampopiano opened this issue Aug 13, 2018 · 6 comments

Comments

@Alcampopiano
Copy link

Alcampopiano commented Aug 13, 2018

Hi all,

Why does 2011 show up in the legend if there are no records for 2011 in the DataFrame?

Perhaps I am missing something simple...

weather = data.seattle_weather()

alt.Chart(weather).mark_line().encode(
    x='month(date):N',
    y='max(wind)',
    color='year(date):N'
)

visualization 14

@jakevdp
Copy link
Collaborator

jakevdp commented Aug 13, 2018

This is due to an issue with timezones that has been fixed in the master (See #1027 and #1053).

In short, the input is being treated as UTC, but rendered in your local time, so there is a timezone correction that shifts 2012-01-01T00:00 back into the year 2011.

I'm currently writing documentation to summarize how to deal with this kind of issue (PR shortly), and it will be part of the 2.2 release that should come in the next couple days.

@Alcampopiano
Copy link
Author

There is always a logical explanation! Thanks Jake.

Is the 2.2 version leveraging vega-lite 3?

@jakevdp
Copy link
Collaborator

jakevdp commented Aug 13, 2018

No, we're still catching up with VL 2.6

We'll plan to support VL 3 in the 2.3 release.

@jakevdp
Copy link
Collaborator

jakevdp commented Aug 13, 2018

(Vega-Lite 3 is still only a release candidate at this point)

@Alcampopiano
Copy link
Author

Okay great. Thanks very much.

@jakevdp
Copy link
Collaborator

jakevdp commented Aug 13, 2018

timezone doc update is here: #1087

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

No branches or pull requests

2 participants