Skip to content

Commit

Permalink
Update Vega-lite mime type and add text/plain fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
gnestor committed Apr 20, 2017
1 parent 9bab895 commit 4afda77
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion altair/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,10 @@ def configure_facet_scale(self, *args, **kwargs):
def _ipython_display_(self):
from IPython.display import display
spec = self.to_dict()
data = {'application/vnd.vegalite+json': spec}
data = {
'application/vnd.vegalite.v1+json': spec,
'text/plain': '<altair.VegaLite object>'
}
display(data, raw=True)

def display(self):
Expand Down

0 comments on commit 4afda77

Please sign in to comment.