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

MST: Tree visualization with Kaliningraph or Graphviz #449

Open
CommanderTvis opened this issue Jan 10, 2022 · 4 comments
Open

MST: Tree visualization with Kaliningraph or Graphviz #449

CommanderTvis opened this issue Jan 10, 2022 · 4 comments
Labels
feature A new feature request good first issue The issue awaits its hero. Contributions are welcome

Comments

@CommanderTvis
Copy link
Collaborator

That would quite beautiful in the context of Jupyter. By the way, this is already partially available because there is possible conversion: MST -> SFun -> Kaliningraph Graph -> Graphviz -> BufferedImage. However, direct conversion will look better.

@CommanderTvis CommanderTvis added the feature A new feature request label Jan 10, 2022
@altavir
Copy link
Member

altavir commented Jan 10, 2022

I was thinking about something like this myself. It would be nice. Marking it as up for grabs.

@breandan
Copy link
Contributor

breandan commented Jan 10, 2022

We recently added support for rendering to Viz.js directly, bypassing graphviz-java and Kweb. With Kotlin/JS, this was a lot simpler than I had originally anticipated. Now we just need to figure out how to package JS as part of a Jupyter notebook library (do we simply paste it inside like <script>$viz_js_code</script> or is there a better way?) and we should be able to support Kotlin/kotlin-jupyter#219.

@altavir
Copy link
Member

altavir commented Jan 11, 2022

@breandan there are three ways to do that. First, you can place your JS/CSS publically on the web (CDN for example) and add a script link. Second, you can place file locally and add a link to it. It will work only for stand-alone HTML or in server mode though, it won't work for Jupyter because of cross-origin restriction policy of Chrone. And the third way is to embedd the JS inside the page/notebook. It hsas some problems with notebook classic/datalore due to cell isolation, but works quite well with notebook lab.

The Jupyter API has a way to do either first or third way. See example here.

Also you can do embedding/local file generation yourself.

@breandan
Copy link
Contributor

Gotcha, I see it was documented here, guess I must have missed it. Since Kotlin/Jupyter supports MPP projects I'll give that a try and let you know how it goes. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature request good first issue The issue awaits its hero. Contributions are welcome
Projects
None yet
Development

No branches or pull requests

3 participants