0

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)
Klue
  • 1,317
  • 5
  • 22
  • 43
  • why the tag 'spark-streaming' ? I don't see relation. – maasg May 02 '16 at 17:01
  • @maasg: you are right, the relation is not explain in this question. but the idea is to use `lineStreaming` with spark steaming data. – Klue May 03 '16 at 08:12

0 Answers0