Hi Tomas, I updated the Gist to include the Spark side of the example. Basically this is using Zeppelin’s Angular display system, more info here: http://zeppelin.incubator.apache.org/docs/displaysystem/angular.html
The key parts are in Spark calling “z.angularBind” (line 26 in the Gist) which sends the data to the Angular frontend and in the JavaScript setting up an Angular watcher that listens to notifications of changes to that data (line 20). The rest is a bunch of JavaScript to dynamically insert and initialize the map (or chart) onto the page. The reason there’s so much code there is to handle the cases where the Zeppelin paragraph is re-run because ALL that HTML & JavaScript will be re-executed so it needs to be done in a manner that won’t reinitialize the map and ensure it properly cleans up after itself. So my recommendation is to use code similar to lines 37+ for dynamically inserting and initializing a custom JavaScript library. Let me know if you have more questions. Thanks, Silvio From: Tomas Hudik <xhu...@gmail.com<mailto:xhu...@gmail.com>> Reply-To: "users@zeppelin.incubator.apache.org<mailto:users@zeppelin.incubator.apache.org>" <users@zeppelin.incubator.apache.org<mailto:users@zeppelin.incubator.apache.org>> Date: Thursday, November 12, 2015 at 1:55 AM To: "users@zeppelin.incubator.apache.org<mailto:users@zeppelin.incubator.apache.org>" <users@zeppelin.incubator.apache.org<mailto:users@zeppelin.incubator.apache.org>> Subject: Re: Real time chart in Zeppelin? Hi Silvio, is there any simple way how to test/run it? Some step-by-step guide for those without javascripts skillet. thanks, Tomas On Wed, Nov 11, 2015 at 6:10 PM, Silvio Fiorito <silvio.fior...@granturing.com<mailto:silvio.fior...@granturing.com>> wrote: Hi Roger, Here’s an example I made using Angular and Leaflet updating based on a Spark Streaming app https://gist.github.com/granturing/a09aed4a302a7367be92 Same concept could be used for any other client side JavaScript (d3, etc.) Thanks, Silvio From: Roger Hui <hkroger...@gmail.com<mailto:hkroger...@gmail.com>> Reply-To: "users@zeppelin.incubator.apache.org<mailto:users@zeppelin.incubator.apache.org>" <users@zeppelin.incubator.apache.org<mailto:users@zeppelin.incubator.apache.org>> Date: Tuesday, November 10, 2015 at 11:14 PM To: "users@zeppelin.incubator.apache.org<mailto:users@zeppelin.incubator.apache.org>" <users@zeppelin.incubator.apache.org<mailto:users@zeppelin.incubator.apache.org>> Subject: Real time chart in Zeppelin? Hi, Is there any example that I can display real time chart over Zeppelin? Also, on the rendering side, how could I import my own d3 scripts or svg graphs to reflect the data changes in real time? Thanks, Roger