plotlykt-server
Module Contents
alltypes
Module Contents
io.ktor.application.Application
Module Contents
fun
Application
.
plotlyModule
(
route
:
String
=
DEFAULT_PAGE
)
:
PlotlyServer
io.ktor.server.engine.ApplicationEngine
Module Contents
fun
ApplicationEngine
.
close
(
)
:
Unit
fun
ApplicationEngine
.
show
(
)
:
Unit
class
JupyterPlotlyServer
:
PlotlyRenderer
Module Contents
JupyterPlotlyServer
(
port
:
Int
=
8882
,
updateInterval
:
Long
=
50
,
parentScope
:
CoroutineScope
=
GlobalScope
)
val
parentScope
:
CoroutineScope
val
port
:
Int
fun
renderFragment
(
fragment
:
PlotlyFragment
)
:
String
fun
renderPage
(
page
:
PlotlyPage
)
:
String
fun
FlowContent
.
renderPlot
(
plot
:
Plot
,
plotId
:
String
,
config
:
PlotlyConfig
)
:
Plot
fun
renderPlot
(
plot
:
Plot
)
:
String
suspend
fun
start
(
)
:
Unit
fun
start
(
port
:
Int
=
8882
,
updateInterval
:
Long
=
50
)
:
HtmlFragment
fun
stop
(
)
:
Unit
fun
stop
(
)
:
HtmlFragment
val
updateInterval
:
Long
kscience.plotly.Plot
Module Contents
fun
Plot
.
collectUpdates
(
plotId
:
String
,
scope
:
CoroutineScope
,
updateInterval
:
Long
)
:
Flow
<
Update
>
kscience.plotly.Plotly
Module Contents
fun
Plotly
.
serve
(
scope
:
CoroutineScope
=
GlobalScope
,
host
:
String
=
"localhost"
,
port
:
Int
=
7777
,
block
:
PlotlyServer
.
(
)
->
Unit
)
:
ApplicationEngine
class
MetaChangeCollector
Module Contents
MetaChangeCollector
(
)
suspend
fun
collect
(
name
:
Name
,
newItem
:
MetaItem
<
*
>
?
)
:
Unit
suspend
fun
read
(
)
:
Meta
class
PlotlyServer
:
Configurable
Module Contents
val
config
:
Config
const
val
DEFAULT_PAGE
:
String
var
embedData
:
Boolean
val
globalHeaders
:
ArrayList
<
HtmlFragment
>
fun
header
(
block
:
TagConsumer
<
*
>
.
(
)
->
Unit
)
:
Unit
fun
page
(
plotlyFragment
:
PlotlyFragment
,
route
:
String
=
DEFAULT_PAGE
,
title
:
String
=
"Plotly server page '$route'"
,
headers
:
List
<
HtmlFragment
>
=
emptyList()
)
:
Unit
fun
page
(
route
:
String
=
DEFAULT_PAGE
,
title
:
String
=
"Plotly server page '$route'"
,
headers
:
List
<
HtmlFragment
>
=
emptyList()
,
content
:
FlowContent
.
(
renderer
:
PlotlyRenderer
)
->
Unit
)
:
Unit
val
UPDATE_INTERVAL_KEY
:
Name
val
UPDATE_MODE_KEY
:
Name
var
updateInterval
:
Long
var
updateMode
:
PlotlyUpdateMode
enum
class
PlotlyUpdateMode
Module Contents
NONE
PULL
PUSH
sealed
class
Update
Module Contents
val
id
:
String
class
Layout
:
Update
Module Contents
Layout
(
id
:
String
,
content
:
Meta
)
val
content
:
Meta
fun
toJson
(
)
:
JsonObject
abstract
fun
toJson
(
)
:
JsonObject
class
Trace
:
Update
Module Contents
Trace
(
id
:
String
,
trace
:
Int
,
content
:
Meta
)
val
content
:
Meta
fun
toJson
(
)
:
JsonObject
val
trace
:
Int
package
kscience.plotly.server
Module Contents
io.ktor.application.Application
Module Contents
fun
Application
.
plotlyModule
(
route
:
String
=
DEFAULT_PAGE
)
:
PlotlyServer
io.ktor.server.engine.ApplicationEngine
Module Contents
fun
ApplicationEngine
.
close
(
)
:
Unit
fun
ApplicationEngine
.
show
(
)
:
Unit
class
JupyterPlotlyServer
:
PlotlyRenderer
Module Contents
JupyterPlotlyServer
(
port
:
Int
=
8882
,
updateInterval
:
Long
=
50
,
parentScope
:
CoroutineScope
=
GlobalScope
)
val
parentScope
:
CoroutineScope
val
port
:
Int
fun
renderFragment
(
fragment
:
PlotlyFragment
)
:
String
fun
renderPage
(
page
:
PlotlyPage
)
:
String
fun
FlowContent
.
renderPlot
(
plot
:
Plot
,
plotId
:
String
,
config
:
PlotlyConfig
)
:
Plot
fun
renderPlot
(
plot
:
Plot
)
:
String
suspend
fun
start
(
)
:
Unit
fun
start
(
port
:
Int
=
8882
,
updateInterval
:
Long
=
50
)
:
HtmlFragment
fun
stop
(
)
:
Unit
fun
stop
(
)
:
HtmlFragment
val
updateInterval
:
Long
kscience.plotly.Plot
Module Contents
fun
Plot
.
collectUpdates
(
plotId
:
String
,
scope
:
CoroutineScope
,
updateInterval
:
Long
)
:
Flow
<
Update
>
kscience.plotly.Plotly
Module Contents
fun
Plotly
.
serve
(
scope
:
CoroutineScope
=
GlobalScope
,
host
:
String
=
"localhost"
,
port
:
Int
=
7777
,
block
:
PlotlyServer
.
(
)
->
Unit
)
:
ApplicationEngine
class
MetaChangeCollector
Module Contents
MetaChangeCollector
(
)
suspend
fun
collect
(
name
:
Name
,
newItem
:
MetaItem
<
*
>
?
)
:
Unit
suspend
fun
read
(
)
:
Meta
class
PlotlyServer
:
Configurable
Module Contents
val
config
:
Config
const
val
DEFAULT_PAGE
:
String
var
embedData
:
Boolean
val
globalHeaders
:
ArrayList
<
HtmlFragment
>
fun
header
(
block
:
TagConsumer
<
*
>
.
(
)
->
Unit
)
:
Unit
fun
page
(
plotlyFragment
:
PlotlyFragment
,
route
:
String
=
DEFAULT_PAGE
,
title
:
String
=
"Plotly server page '$route'"
,
headers
:
List
<
HtmlFragment
>
=
emptyList()
)
:
Unit
fun
page
(
route
:
String
=
DEFAULT_PAGE
,
title
:
String
=
"Plotly server page '$route'"
,
headers
:
List
<
HtmlFragment
>
=
emptyList()
,
content
:
FlowContent
.
(
renderer
:
PlotlyRenderer
)
->
Unit
)
:
Unit
val
UPDATE_INTERVAL_KEY
:
Name
val
UPDATE_MODE_KEY
:
Name
var
updateInterval
:
Long
var
updateMode
:
PlotlyUpdateMode
enum
class
PlotlyUpdateMode
Module Contents
NONE
PULL
PUSH
fun
PlotlyServer
.
pullUpdates
(
interval
:
Long
=
1000
)
:
PlotlyServer
fun
PlotlyServer
.
pushUpdates
(
interval
:
Long
=
100
)
:
PlotlyServer
sealed
class
Update
Module Contents
val
id
:
String
class
Layout
:
Update
Module Contents
Layout
(
id
:
String
,
content
:
Meta
)
val
content
:
Meta
fun
toJson
(
)
:
JsonObject
abstract
fun
toJson
(
)
:
JsonObject
class
Trace
:
Update
Module Contents
Trace
(
id
:
String
,
trace
:
Int
,
content
:
Meta
)
val
content
:
Meta
fun
toJson
(
)
:
JsonObject
val
trace
:
Int