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

feat(vega): implement transform for vega #1113

Merged
merged 5 commits into from
Nov 1, 2016
Merged

Conversation

rgbkrk
Copy link
Member

@rgbkrk rgbkrk commented Oct 31, 2016

This enables the ability to use vega and vega-lite, either through Altair, ipyvega, or generally with the right vega(-lite) mimetype (application/vnd.vega+json and application/vnd.vegalite+json).

screen shot 2016-10-30 at 10 25 25 pm

Items to follow up with:

  • Handling height and width
  • Dealing with the external links (shown above)
  • Tests!

/cc @ellisonbg

@codecov-io
Copy link

codecov-io commented Oct 31, 2016

Current coverage is 88.23% (diff: 100%)

Merging #1113 into master will increase coverage by 0.18%

@@             master      #1113   diff @@
==========================================
  Files            56         57     +1   
  Lines          1431       1453    +22   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits           1260       1282    +22   
  Misses          171        171          
  Partials          0          0          

Powered by Codecov. Last update 50bb758...a75b8a9

@rgbkrk rgbkrk changed the title [WIP] feat(vega): implement transform for vega feat(vega): implement transform for vega Nov 1, 2016
@rgbkrk
Copy link
Member Author

rgbkrk commented Nov 1, 2016

screen shot 2016-10-31 at 4 54 13 pm

@rgbkrk
Copy link
Member Author

rgbkrk commented Nov 1, 2016

screen shot 2016-10-31 at 10 33 39 pm

Altair's declarative syntax makes this all just too easy. ❤️ it.

@rgbkrk
Copy link
Member Author

rgbkrk commented Nov 1, 2016

Note: until ipyvega exports the vega mimetypes used above, folks have to wrap altair objects with the little vegify function I wrote:

import IPython.display
def vegify(spec):
    IPython.display.display({
        'application/vnd.vegalite+json': spec.to_dict()
    }, raw=True)

v = vegify

@captainsafia
Copy link
Member

Looks good!

@rgbkrk rgbkrk deleted the vega branch November 1, 2016 17:48
@lgeiger
Copy link
Member

lgeiger commented Nov 1, 2016

Webpack throws the following error on my machine:

ERROR in ./app/~/vega-scenegraph/src/util/canvas.js
Module not found: Error: Cannot resolve module 'canvas' in /Users/lukasgeiger/code/nteract/app/node_modules/vega-scenegraph/src/util
 @ ./app/~/vega-scenegraph/src/util/canvas.js 11:17-34

ERROR in ./app/~/vega-scenegraph/src/util/ImageLoader.js
Module not found: Error: Cannot resolve module 'canvas' in /Users/lukasgeiger/code/nteract/app/node_modules/vega-scenegraph/src/util
 @ ./app/~/vega-scenegraph/src/util/ImageLoader.js 51:19-36

@rgbkrk
Copy link
Member Author

rgbkrk commented Nov 1, 2016

Does it finish building for you though? I can add an escape for that, as we have native browser canvas as soon as it's in the Browser Window.

@lgeiger
Copy link
Member

lgeiger commented Nov 1, 2016

Yes it builds fine

@lock
Copy link

lock bot commented Apr 3, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked and limited conversation to collaborators Apr 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants