fsprojects / IfSharp

F# for Jupyter Notebooks
Other
440 stars 71 forks source link

[WIP] add example with global javascript import #224

Closed aprooks closed 5 years ago

aprooks commented 5 years ago

Added an example of using Util.LoadGlobalJavaScript to work with js libs, which won't work otherwise.

Also, please notice that when using this approach whole JS library is embedded in notebook and both Github and nbviewer fail to render cells with this import

cgravill commented 5 years ago

Could you include the lines here as an example please? The full sized notebook is awkward for discussions.

aprooks commented 5 years ago

this section is added right below D3 sample. Nothing else is changed.

image

cgravill commented 5 years ago

Is this still current given discussion on https://github.com/fsprojects/IfSharp/issues/223#issuecomment-502253569

I can see your solution being useful in some kind of advanced documentation. I similarly have some helpers that seem a bit involved for the main feature notebook but solves issues people might have.

aprooks commented 5 years ago

No, these are only docs involving usage of Util.LoadGlobalJavascript. Not sure about advanced usage, but not being able to render some JS libs was almost the first issue I've stumbled upon when I tried to use IFsharp. Especially given I'm using it from docker and mac, and Angara and other plotting libs did not work for me.

Feel free to close though if you feel like it does not belong to main notebook.

cgravill commented 5 years ago

Curious, Angara and XPlot both work for me on Mac but I'm not using Docker so perhaps there's an issue in there.

I'll go ahead and merge. There might need to be a future split of documents but for now the feature notebook is the place for everything to go in. Thanks for sharing.