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

chart.serve() ignores data transformers #1537

Closed
jakevdp opened this issue May 28, 2019 · 2 comments · Fixed by #1538
Closed

chart.serve() ignores data transformers #1537

jakevdp opened this issue May 28, 2019 · 2 comments · Fixed by #1538

Comments

@jakevdp
Copy link
Collaborator

jakevdp commented May 28, 2019

import altair as alt

alt.data_transformers.enable('data_server')

from vega_datasets import data
cars = data.cars()

chart = alt.Chart(cars).mark_point().encode(
    x='Horsepower',
    y='Miles_per_Gallon',
    color='Origin',
).interactive()

chart.serve()

Examining the HTML from the above chart, we see that the data is not transformed.

@jakevdp
Copy link
Collaborator Author

jakevdp commented May 28, 2019

Turns out we need

chart.serve(override_data_transformer=False)

This default option is meant to disable MaxRowsError in the common case... perhaps there's a less obtrusive way to do that?

@jakevdp
Copy link
Collaborator Author

jakevdp commented May 28, 2019

I think given the intent of the keyword, we should introduce something like alt.data_transformers.set_max_rows(None) and use that function instead.

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

Successfully merging a pull request may close this issue.

1 participant