I have a Java application in which I want to use rhino to execute some
highcharts code. The highcharts library depends on the document
object, therefore I need envjs. I have tried to embed envjs using the
guidelines from the site and whatever advice I could find on the
internet and ended up with the following code:
cx.setOptimizationLevel(-1);//bypass the 64k limit
Global global = Main.getGlobal();
global.init(cx);
Main.processSource(cx, "FopTest/src/main/resources/env.rhino.1.2.js");
cx.evaluateReader(scope,
new
InputStreamReader(RhinoTest.class.getResourceAsStream("highcharts.js")),
"highcharts.js", 0, null);
for which I received the following output in the console:
[ Envjs/1.6 (Rhino; U; Linux i386 2.6.35-24-generic; en-US; rv:
1.7.0.rc2) Resig/20070309 PilotFish/1.2.13 ]
org.mozilla.javascript.EcmaError: ReferenceError: "document" is not
defined. (highcharts.js#50)
which I suppose shows that the file was loaded, but it is not
available for highcharts.
Then, I tried like this:
cx.setOptimizationLevel(-1);
cx.evaluateReader(scope, new
InputStreamReader(RhinoTest.class.getResourceAsStream("env.rhino.
1.2.js")), "env.rhino.1.2.js", 0, null);
cx.evaluateReader(scope,
new
InputStreamReader(RhinoTest.class.getResourceAsStream("highcharts.js")),
"highcharts.js", 0, null);
but I got the following error: org.mozilla.javascript.EcmaError:
ReferenceError: "print" is not defined. (env.rhino.1.2.js#1294)
I am using rhino 1.7R2 and env.rhino.1.2.js(Envjs core-env.1.2.13).
Can you point me into the right direction as to how can I make the
env.rhino.js code available to the high charts code?
> I have a Java application in which I want to use rhino to execute some
> highcharts code. The highcharts library depends on the document
> object, therefore I need envjs. I have tried to embed envjs using the
> guidelines from the site and whatever advice I could find on the
> internet and ended up with the following code:
> cx.setOptimizationLevel(-1);//bypass the 64k limit
> Global global = Main.getGlobal();
> global.init(cx);
> Main.processSource(cx, "FopTest/src/main/resources/env.rhino.1.2.js");
> cx.evaluateReader(scope,
> new
> InputStreamReader(RhinoTest.class.getResourceAsStream("highcharts.js")),
> "highcharts.js", 0, null);
> for which I received the following output in the console:
> [ Envjs/1.6 (Rhino; U; Linux i386 2.6.35-24-generic; en-US; rv:
> 1.7.0.rc2) Resig/20070309 PilotFish/1.2.13 ]
> org.mozilla.javascript.EcmaError: ReferenceError: "document" is not
> defined. (highcharts.js#50)
> which I suppose shows that the file was loaded, but it is not
> available for highcharts.
> but I got the following error: org.mozilla.javascript.EcmaError:
> ReferenceError: "print" is not defined. (env.rhino.1.2.js#1294)
> I am using rhino 1.7R2 and env.rhino.1.2.js(Envjs core-env.1.2.13).
> Can you point me into the right direction as to how can I make the
> env.rhino.js code available to the high charts code?
> Global global = new Global();
> global.init(cx);
> On Jan 11, 3:49 pm, cristi <cristi.cior...@gmail.com> wrote:
> > Hello,
> > I have a Java application in which I want to use rhino to execute some
> > highcharts code. The highcharts library depends on the document
> > object, therefore I need envjs. I have tried to embed envjs using the
> > guidelines from the site and whatever advice I could find on the
> > internet and ended up with the following code:
> > cx.setOptimizationLevel(-1);//bypass the 64k limit
> > Global global = Main.getGlobal();
> > global.init(cx);
> > Main.processSource(cx, "FopTest/src/main/resources/env.rhino.1.2.js");
> > cx.evaluateReader(scope,
> > new
> > InputStreamReader(RhinoTest.class.getResourceAsStream("highcharts.js")),
> > "highcharts.js", 0, null);
> > for which I received the following output in the console:
> > [ Envjs/1.6 (Rhino; U; Linux i386 2.6.35-24-generic; en-US; rv:
> > 1.7.0.rc2) Resig/20070309 PilotFish/1.2.13 ]
> > org.mozilla.javascript.EcmaError: ReferenceError: "document" is not
> > defined. (highcharts.js#50)
> > which I suppose shows that the file was loaded, but it is not
> > available for highcharts.
> > but I got the following error: org.mozilla.javascript.EcmaError:
> > ReferenceError: "print" is not defined. (env.rhino.1.2.js#1294)
> > I am using rhino 1.7R2 and env.rhino.1.2.js(Envjs core-env.1.2.13).
> > Can you point me into the right direction as to how can I make the
> > env.rhino.js code available to the high charts code?
> > Global global = new Global(); > > global.init(cx);
> > On Jan 11, 3:49 pm, cristi <cristi.cior...@gmail.com> wrote:
> > > Hello,
> > > I have a Java application in which I want to use rhino to execute some > > > highcharts code. The highcharts library depends on the document > > > object, therefore I need envjs. I have tried to embed envjs using the > > > guidelines from the site and whatever advice I could find on the > > > internet and ended up with the following code:
> > > cx.setOptimizationLevel(-1);//bypass the 64k limit > > > Global global = Main.getGlobal(); > > > global.init(cx); > > > Main.processSource(cx, "FopTest/src/main/resources/env.rhino.1.2.js"); > > > cx.evaluateReader(scope, > > > new
> > > for which I received the following output in the console: > > > [ Envjs/1.6 (Rhino; U; Linux i386 2.6.35-24-generic; en-US; rv: > > > 1.7.0.rc2) Resig/20070309 PilotFish/1.2.13 ] > > > org.mozilla.javascript.EcmaError: ReferenceError: "document" is not > > > defined. (highcharts.js#50) > > > which I suppose shows that the file was loaded, but it is not > > > available for highcharts.
> > > but I got the following error: org.mozilla.javascript.EcmaError: > > > ReferenceError: "print" is not defined. (env.rhino.1.2.js#1294)
> > > I am using rhino 1.7R2 and env.rhino.1.2.js(Envjs core-env.1.2.13). > > > Can you point me into the right direction as to how can I make the > > > env.rhino.js code available to the high charts code?
> > > Thanks, > > > Cristi
> -- > You received this message because you are subscribed to the Google Groups > "Env.js" group. > To post to this group, send email to envjs@googlegroups.com. > To unsubscribe from this group, send email to > envjs+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/envjs?hl=en.
thatcher.christop...@gmail.com> wrote: > Hi Hu, Can you give me some more details about what you mean by 'the > generated html are broken'? Thanks. > Thatcher
> On Sun, Feb 13, 2011 at 6:07 PM, Hu Kai <iamka...@gmail.com> wrote:
>> did you get any good luck of generating the svg you want?
>> I did something similar few days before., however the html it >> generated are broken.
>> On Jan 13, 7:04 pm, cristi <cristi.cior...@gmail.com> wrote: >> > Hello,
>> > I have managed to solve the problem of making available to rhino >> > functions like as described in here:
>> > Global global = new Global(); >> > global.init(cx);
>> > On Jan 11, 3:49 pm, cristi <cristi.cior...@gmail.com> wrote:
>> > > Hello,
>> > > I have a Java application in which I want to use rhino to execute some >> > > highcharts code. The highcharts library depends on the document >> > > object, therefore I need envjs. I have tried to embed envjs using the >> > > guidelines from the site and whatever advice I could find on the >> > > internet and ended up with the following code:
>> > > cx.setOptimizationLevel(-1);//bypass the 64k limit >> > > Global global = Main.getGlobal(); >> > > global.init(cx); >> > > Main.processSource(cx, "FopTest/src/main/resources/env.rhino.1.2.js"); >> > > cx.evaluateReader(scope, >> > > new
>> > > for which I received the following output in the console: >> > > [ Envjs/1.6 (Rhino; U; Linux i386 2.6.35-24-generic; en-US; rv: >> > > 1.7.0.rc2) Resig/20070309 PilotFish/1.2.13 ] >> > > org.mozilla.javascript.EcmaError: ReferenceError: "document" is not >> > > defined. (highcharts.js#50) >> > > which I suppose shows that the file was loaded, but it is not >> > > available for highcharts.
>> > > but I got the following error: org.mozilla.javascript.EcmaError: >> > > ReferenceError: "print" is not defined. (env.rhino.1.2.js#1294)
>> > > I am using rhino 1.7R2 and env.rhino.1.2.js(Envjs core-env.1.2.13). >> > > Can you point me into the right direction as to how can I make the >> > > env.rhino.js code available to the high charts code?
>> > > Thanks, >> > > Cristi
>> -- >> You received this message because you are subscribed to the Google Groups >> "Env.js" group. >> To post to this group, send email to envjs@googlegroups.com. >> To unsubscribe from this group, send email to >> envjs+unsubscribe@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/envjs?hl=en.
> -- > Christopher Thatcher
> -- > You received this message because you are subscribed to the Google Groups > "Env.js" group. > To post to this group, send email to envjs@googlegroups.com. > To unsubscribe from this group, send email to > envjs+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/envjs?hl=en.
Hi all, Any updates with env.js+rhino+ highcharts? Did someone success in that? I've tried to customize one2team solution (that is basically uses rhino 1.7rc2 + env.js + highcharts2.1.2) to work with Rhino1.7.rc3 + env.js 1.2.13 + highcharts 2.1.7 (or later). The best results I've got - is I'm getting line chart OK, but all layout seems to be broken. So that title, axis, categories are all on the left of the chart. Further investigation gave me that tspan x value is zero for all texts, and some other problems was found. I'm not sure if this is an env.js or highchart problem.
>>> > Global global = new Global(); >>> > global.init(cx);
>>> > On Jan 11, 3:49 pm, cristi <cristi.cior...@gmail.com> wrote:
>>> > > Hello,
>>> > > I have a Java application in which I want to use rhino to execute >>> some >>> > > highcharts code. The highcharts library depends on the document >>> > > object, therefore I need envjs. I have tried to embed envjs using >>> the >>> > > guidelines from the site and whatever advice I could find on the >>> > > internet and ended up with the following code:
>>> > > cx.setOptimizationLevel(-1);//bypass the 64k limit >>> > > Global global = Main.getGlobal(); >>> > > global.init(cx); >>> > > Main.processSource(cx, >>> "FopTest/src/main/resources/env.rhino.1.2.js"); >>> > > cx.evaluateReader(scope, >>> > > new
>>> > > for which I received the following output in the console: >>> > > [ Envjs/1.6 (Rhino; U; Linux i386 2.6.35-24-generic; en-US; rv: >>> > > 1.7.0.rc2) Resig/20070309 PilotFish/1.2.13 ] >>> > > org.mozilla.javascript.EcmaError: ReferenceError: "document" is not >>> > > defined. (highcharts.js#50) >>> > > which I suppose shows that the file was loaded, but it is not >>> > > available for highcharts.
>>> > > but I got the following error: org.mozilla.javascript.EcmaError: >>> > > ReferenceError: "print" is not defined. (env.rhino.1.2.js#1294)
>>> > > I am using rhino 1.7R2 and env.rhino.1.2.js(Envjs core-env.1.2.13). >>> > > Can you point me into the right direction as to how can I make the >>> > > env.rhino.js code available to the high charts code?
>>> > > Thanks, >>> > > Cristi
>>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Env.js" group. >>> To post to this group, send email to envjs@googlegroups.com. >>> To unsubscribe from this group, send email to >>> envjs+unsubscribe@googlegroups.com. >>> For more options, visit this group at >>> http://groups.google.com/group/envjs?hl=en.
>> -- >> Christopher Thatcher
>> -- >> You received this message because you are subscribed to the Google Groups >> "Env.js" group. >> To post to this group, send email to envjs@googlegroups.com. >> To unsubscribe from this group, send email to >> envjs+unsubscribe@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/envjs?hl=en.