[ 
https://issues.apache.org/jira/browse/TOREE-258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15147736#comment-15147736
 ] 

Gino Bustelo commented on TOREE-258:
------------------------------------

Note that Toree supports a %%html and %%javascript magic. All magics can also 
be invoked programmatically. So, for example, you can do the following

------CELL--------
kernel.magics.javascript("alert('foo')")
---------------------

------CELL--------
kernel.magics.html("<h1>Hello World</h1>")
---------------------

With the programatic approach you can build the HTML/Javascript and return it 
at the end of the cell. Now... that is the main limitation with this approach 
and its that the call to `kernel.magics.html` or `kernel.magics.javascript` 
need to take place at the end of the cell. Multiples of them in one cell will 
not work. Last one wins.

See if the approach above works for you. I'll still leave this issue opened 
because it is been in my TODO to open an issue to support something similar to 
Jupyter's display module.
https://ipython.org/ipython-doc/3/api/generated/IPython.display.html

The link here might be outdated, but gets to the point. From Toree's 
perspective, these should be methods hanging off the `kernel` object.

Examples:

kenel.display(Object to display)

Object to display = String, HTML, JavaScript, Image

> Support display_html for inline visualization
> ---------------------------------------------
>
>                 Key: TOREE-258
>                 URL: https://issues.apache.org/jira/browse/TOREE-258
>             Project: TOREE
>          Issue Type: New Feature
>         Environment: Using Jupter 4.1, Toree commit (846292233c)
>            Reporter: Gurvinder
>
> To enable inline visualization from visualization server as Lightning 
> (https://github.com/lightning-viz/lightning) using scala client 
> (https://github.com/lightning-viz/lightning-scala) it require a way or method 
> to insert html data 
> (https://github.com/lightning-viz/lightning-scala/blob/jupyter/src/main/scala/org/viz/lightning/Visualization.scala)
>  to current notebook and it appears as this functionality is currently 
> missing from Toree. It would be good to have an option for inline 
> visualization when toree is being used with Jupyter notebooks.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to