Re: Using scala variables in html

2015-07-22 Thread Wood, Dean Jr (GE Oil & Gas)
That is what I am trying. When I package it and it is simply loading a .html file with all the data in, it will plot. If I package the jar which uses variables to input the data, it only prints the html to screen and doesn't plot. I'm currently without my computer as I fried the logic board but

Re: Using scala variables in html

2015-07-21 Thread Corneau Damien
You could package your code as a jar and use it with %deb On Tue, Jul 21, 2015 at 7:45 PM, Wood, Dean Jr (GE Oil & Gas) < dean1.w...@ge.com> wrote: > Hi again. > > Sorry to resurrect this but I'm only just back to looking at it, the logic > board of my computer blew. > > So are we clear that it i

Re: Using scala variables in html

2015-07-21 Thread Wood, Dean Jr (GE Oil & Gas)
Hi again. Sorry to resurrect this but I'm only just back to looking at it, the logic board of my computer blew. So are we clear that it is not possible to put this approach into a package and have it plot a graph in Zeppelin? What is the issue? If I put the whole lot in a html file and just

Re: Using scala variables in html

2015-07-16 Thread Wood, Dean Jr (GE Oil & Gas)
Awesome. Thank you very much. I am basically learning html and D3 as I go here so I was sure there were stupid mistakes all over the place. I really appreciate your time and effort. Dean Sent from my iPhone On 16 Jul 2015, at 07:45, Corneau Damien mailto:cornead...@gmail.com>> wrote: Hi, I

Re: Using scala variables in html

2015-07-15 Thread Corneau Damien
Hi, I solved your problems, you can check it out here: https://beta.zeppelinhub.com/#/notebook/dcorneau/2AW72S1F8 It took me some time because the package definition doesn't work in zeppelin (seems related to REPL) Basically your file1.html had some problems: - there was a tag not closed - ther

Re: Using scala variables in html

2015-07-15 Thread Wood, Dean Jr (GE Oil & Gas)
Hi Moon, Thanks for the quick response. My problem with my approach is it doesn’t work. When I package it up and then call it from zeppelin with { import zep_plot._ zep_plot.zepplot.plotter } it prints out the html and doesn’t display the plot. What am I doing wrong? Dean On 15 Jul 2015, a

Re: Using scala variables in html

2015-07-15 Thread moon soo Lee
The other possibility is using angular display system. If you use %angular instead of %html, you'll able to send some data to front-end side by doing val x1=Vector(0,1,2,3,4) z.angularBind("x1", x1.toArray) println("%angular x1={{x1}}") You can also access this variable in JS, by printing javas

Re: Using scala variables in html

2015-07-15 Thread moon soo Lee
Hi, Will String interpolation helps? http://docs.scala-lang.org/overviews/core/string-interpolation.html And i think your approach is very valid. Best, moon On Wed, Jul 15, 2015 at 8:31 AM Wood, Dean Jr (GE Oil & Gas) < dean1.w...@ge.com> wrote: > Hi, > > I’m having some issues with getting a

Using scala variables in html

2015-07-15 Thread Wood, Dean Jr (GE Oil & Gas)
Hi, I’m having some issues with getting a html file which plots a line graph using D3 to plot using some scala variables. My html is rubbish so it might be something straightforward. I have a simple package built with sbt containing the following: package zep_plot import com.google.common.io.F