plotlykt-server / scientifik.plotly.server / PlotlyServer

PlotlyServer

class PlotlyServer : Configurable

Properties

config

val config: Config

embedData

var embedData: Boolean

globalHeaders

a list of headers that should be applied to all pages

val globalHeaders: ArrayList<HtmlFragment>

updateInterval

var updateInterval: Long

updateMode

var updateMode: PlotlyUpdateMode

Functions

header

fun header(block: TagConsumer<*>.() -> Unit): Unit

page

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.(container: PlotlyContainer) -> Unit): Unit

Companion Object Properties

DEFAULT_PAGE

const val DEFAULT_PAGE: String

UPDATE_INTERVAL_KEY

val UPDATE_INTERVAL_KEY: Name

UPDATE_MODE_KEY

val UPDATE_MODE_KEY: Name

Extension Functions

pullUpdates

Configure client to request regular updates from server. Pull updates are more expensive than push updates since they contain the full plot data and server can't decide what to send.

fun PlotlyServer.pullUpdates(interval: Long = 1000): PlotlyServer

pushUpdates

Configure server to start sending updates in push mode. Does not affect loaded pages

fun PlotlyServer.pushUpdates(interval: Long = 100): PlotlyServer