visionforge/demo/playground/notebooks/dynamic-demo.ipynb

1.7 KiB

In [ ]:
@file:DependsOn("../build/libs/playground-0.3.0-dev-4-all.jar")
In [ ]:
vf.startServer()
In [ ]:
import kotlinx.coroutines.*
import kotlin.random.Random

Plotly.plot{
    scatter{
        x(1,2,3)
        y(1,2,3)
        if(vf.isServerRunning()){
            vf.launch{
                while(isActive){
                    delay(500)
                    y(Random.nextDouble(), Random.nextDouble(), Random.nextDouble())
                }
            }
        }
    }
}
In [ ]:
vf.stopServer()
In [ ]: