I want to visualize some streaming data using local Lightning server. I created a simple Scala test, which created a line chart that I can access at http://localhost:3000
. The problem is that when I use viz.append(newdata)
in order to update the existing line chart, this new data is not sent to the server and the graphic remains the same. If, however, I do lgn.lineStreaming(Array(Array(1.0))
, then the new line chart is created.
So, what's the problem with updating the streaming line chart in Lightning?
import org.viz.lightning._
var viz: Visualization = _
//...
val lgn = Lightning(host="http://localhost:3000")
lgn.createSession("streamingtest")
// initialization
val series = Array.fill(1)(Array.fill(1)(r.nextInt(1)))
viz = lgn.lineStreaming(series)
// ...
// adding new data (THIS DATA IS NOT SENT TO THE SERVER)
val newdata: Map[String, Any] = Map("1" -> 1.0)
viz.append(newdata)