Hi moon, Tried your hint with no luck :-( Thanks anyway
regards Bala On 18 March 2016 at 22:26, moon soo Lee <m...@apache.org> wrote: > Hi, > > Could you try pass context to z.run() ? > > z.angularWatch("routeSelected", (before, after, context) => { > z.run(8, context) > } > > Thanks, > moon > > On Fri, Mar 18, 2016 at 4:22 AM Balachandar R.A. <balachandar...@gmail.com> > wrote: > >> Hello, >> >> Thanks for discussing this issue. Yes, I would like to run a angular >> paragraph from another angular paragraph. Now, I have explored a bit about >> angularWatch and looked very promising. I have more or less achieved what I >> wanted to. But still it is not 100%. >> >> I have this piece of code in one of my spark paragraph. This is para 6. >> >> >> >> >> ..... >> >> z.angularBind("routeSelected", 0); >> >> z.angularUnwatch("routeSelected"); >> >> z.angularWatch("routeSelected", (before, after) => { >> >> // trigger re-rendering of cytoscape graphs >> >> z.run(8) // re-render cytoscape density graph >> >> } >> >> ) >> >> ..... >> >> ...... >> >> >> >> The routeSelected variable will be modified by para 7 which is angular >> based using the below code >> >> ... >> >> scope.routeSelected = scope.routeSelected + 1 >> >> .... >> >> >> >> >> >> Since the variable routeSelected is under watch, I expected para 8 will >> run. But, the para 8 did not run automatically. To my surprise, it is run >> when I click anywhere in the para 8, 7 6. It is very strange. Any clue >> about this behavior? >> >> >> >> regards >> >> Bala >> >> >> >> On 18 March 2016 at 10:40, Corneau Damien <cornead...@gmail.com> wrote: >> >>> Do you need to run a paragraph from the %angular paragraph? >>> From what you described before, you wanted to do z.run() from spark. >>> >>> If you need to run from %angular, you can try this PR: >>> https://github.com/apache/incubator-zeppelin/pull/742 >>> >>> On Fri, Mar 18, 2016 at 1:55 PM, Balachandar R.A. < >>> balachandar...@gmail.com> wrote: >>> >>>> Hi >>>> >>>> Thanks for the hint. But z.run() is not working inside %angular >>>> paragraph in my notebook. Any idea? >>>> >>>> Regards >>>> Bala >>>> On 17-Mar-2016 11:39 pm, "moon soo Lee" <m...@apache.org> wrote: >>>> >>>>> Hi Bala, >>>>> >>>>> z.run() accept both integer index of paragraph (starts from 0) [1] or >>>>> paragraph id [2]. >>>>> >>>>> So you can do something like >>>>> >>>>> %spark >>>>> (2 to 5).foreach{ idx => z.run(idx) } >>>>> >>>>> or >>>>> >>>>> %spark >>>>> import collection.JavaConversions._ >>>>> z.listParagraphs.foreach(paragraphId=> z.run(paragraphId)) >>>>> >>>>> Hope this helps. >>>>> >>>>> Thanks, >>>>> moon >>>>> >>>>> [1] >>>>> https://github.com/apache/incubator-zeppelin/blob/branch-0.5.6/spark/src/main/java/org/apache/zeppelin/spark/ZeppelinContext.java#L398 >>>>> [2] >>>>> https://github.com/apache/incubator-zeppelin/blob/branch-0.5.6/spark/src/main/java/org/apache/zeppelin/spark/ZeppelinContext.java#L370 >>>>> >>>>> >>>>> >>>>> On Thu, Mar 17, 2016 at 2:55 AM Balachandar R.A. < >>>>> balachandar...@gmail.com> wrote: >>>>> >>>>>> Hello >>>>>> >>>>>> Can we use z.run() to run a set of paragraphs? In my notebook, I have >>>>>> spark and angular paragraphs and I would fire running of, lets say, 5 >>>>>> paragraphs, preferably, simultaneously. These paragraphs launch various >>>>>> visualization widgets (bar charts, leaflet map, and cytoscape network >>>>>> graphs). So, paragraph A creates a necessary data structures from which >>>>>> these visualizations can be created, and run all the other paragraphs. >>>>>> Please let me know how can I achieve this? >>>>>> >>>>>> regards >>>>>> Bala >>>>>> >>>>> >>> >>