Skip to content

Commit 86813a4

Browse files
authoredJun 3, 2020
Switch lets-plot API version to 0.0.17-SNAPSHOT (#80)
* Switch lets-plot API version to 0.0.17-SNAPSHOT - support for environment variable "LETS_PLOT_HTML_ISOLATED_FRAME" (Datalore integration) - `isolatedFrame` parameter. Usage: `%use lets-plot(isolatedFrame=true)` - LetsPlot.getInfo()
1 parent 6e0d7d9 commit 86813a4

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed
 

‎libraries/lets-plot.json

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
{
22
"properties": {
3-
"library_version": "1.4.2",
4-
"api_version": "0.0.14-SNAPSHOT"
3+
"libraryVersion": "1.4.2",
4+
"apiVersion": "0.0.17-SNAPSHOT",
5+
"isolatedFrame": ""
56
},
67
"link": "https://github.com/JetBrains/lets-plot-kotlin",
78
"repositories": [
89
"https://jetbrains.bintray.com/lets-plot-maven"
910
],
1011
"dependencies": [
11-
"org.jetbrains.lets-plot:lets-plot-kotlin-api:$api_version"
12+
"org.jetbrains.lets-plot:lets-plot-kotlin-api:$apiVersion"
1213
],
1314
"imports": [
1415
"jetbrains.letsPlot.*",
@@ -17,16 +18,15 @@
1718
],
1819
"init": [
1920
"import jetbrains.letsPlot.LetsPlot",
20-
"import jetbrains.letsPlot.notebook.jupyter.KotlinJupyterFrontendContext",
21-
"// Setup lets-plot frontend context",
22-
"LetsPlot.frontendContext = KotlinJupyterFrontendContext {DISPLAY(HTML(it))}",
23-
"LetsPlot.libraryVersion = \"$library_version\"",
24-
"LetsPlot.apiVersion = \"$api_version\"",
21+
"import jetbrains.letsPlot.frontend.NotebookFrontendContext",
22+
"val isolatedFrameParam = if(\"$isolatedFrame\".isNotEmpty()) \"$isolatedFrame\".toBoolean() else null",
23+
"val frontendContext = LetsPlot.setupNotebook(\"$libraryVersion\", isolatedFrameParam) {DISPLAY(HTML(it))}",
24+
"LetsPlot.apiVersion = \"$apiVersion\"",
2525
"// Load library JS",
26-
"DISPLAY(HTML(KotlinJupyterFrontendContext.getConfigureHtml(\"$library_version\")))"
26+
"DISPLAY(HTML(frontendContext.getConfigureHtml()))"
2727
],
2828
"renderers": {
29-
"jetbrains.letsPlot.intern.Plot": "HTML(KotlinJupyterFrontendContext.getHtml($it))",
30-
"jetbrains.letsPlot.GGBunch": "HTML(KotlinJupyterFrontendContext.getHtml($it))"
29+
"jetbrains.letsPlot.intern.Plot": "HTML(frontendContext.getHtml($it))",
30+
"jetbrains.letsPlot.GGBunch": "HTML(frontendContext.getHtml($it))"
3131
}
3232
}

0 commit comments

Comments
 (0)
Please sign in to comment.