Fix mass demo plot

This commit is contained in:
Alexander Nozik 2023-08-24 16:25:17 +03:00
parent 4c93b5c9b3
commit 0f610a5e19
2 changed files with 6 additions and 8 deletions

View File

@ -23,10 +23,7 @@ import space.kscience.magix.rsocket.rSocketWithTcp
import space.kscience.magix.rsocket.rSocketWithWebSockets
import space.kscience.magix.server.RSocketMagixFlowPlugin
import space.kscience.magix.server.startMagixServer
import space.kscience.plotly.Plotly
import space.kscience.plotly.bar
import space.kscience.plotly.layout
import space.kscience.plotly.plot
import space.kscience.plotly.*
import space.kscience.plotly.server.PlotlyUpdateMode
import space.kscience.plotly.server.serve
import space.kscience.plotly.server.show
@ -88,9 +85,10 @@ suspend fun main() {
updateMode = PlotlyUpdateMode.PUSH
updateInterval = 1000
page { container ->
plot(renderer = container) {
plot(renderer = container, config = PlotlyConfig { saveAsSvg() }) {
layout {
title = "Latest event"
// title = "Latest event"
xaxis.title = "Device number"
yaxis.title = "Maximum latency in ms"
}
@ -119,7 +117,7 @@ suspend fun main() {
latest.clear()
max.clear()
x.numbers = sorted.keys
y.numbers = sorted.values.map { it.inWholeMilliseconds / 1000.0 + 0.0001 }
y.numbers = sorted.values.map { it.inWholeMicroseconds / 1000.0 + 0.0001 }
}
}
}

View File

@ -12,7 +12,7 @@ description = """
dependencies {
api(projects.magix.magixApi)
api("org.slf4j:slf4j-api:2.0.6")
api("org.zeromq:jeromq:0.5.2")
api("org.zeromq:jeromq:0.5.3")
}
readme {