Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add initial web-renderer for rendering charts created with javascript
Some visualization libraries like vega output html/javascript code which must be run in order to render the visualization. Emacs will eventually be able to handle this through xwidgets, but in the meantime it's nice to have at least an image of the visualization in the org-mode frontend. To accomplish this, we can introduce a web-renderer backend that uses headless chrome or firefox in order to render the visualization, takes a screenshot, and then crops the screenshot in order to get the final visualization as a png. Currently, the backend is not hooked up to the org-client. It also takes a naive approach, assuming html input and a Chrome installation on macOS. It also creates an output file in order to demonstrate the intermediate results. Try running `cd web-renderer && cat test_chart.html | npm start` The image manipulation could also use some work. The image is trimmed very close and could use some margins.
- Loading branch information