Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
rhino + envjs into a java application that uses highcharts
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
cristi  
View profile  
 More options Jan 11 2011, 8:49 am
From: cristi <cristi.cior...@gmail.com>
Date: Tue, 11 Jan 2011 05:49:40 -0800 (PST)
Local: Tues, Jan 11 2011 8:49 am
Subject: rhino + envjs into a java application that uses highcharts
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.

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?

Thanks,
Cristi


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
cristi  
View profile  
 More options Jan 13 2011, 3:04 am
From: cristi <cristi.cior...@gmail.com>
Date: Thu, 13 Jan 2011 00:04:12 -0800 (PST)
Local: Thurs, Jan 13 2011 3:04 am
Subject: Re: rhino + envjs into a java application that uses highcharts
Hello,

I have managed to solve the problem of making available to rhino
functions like as described in here:

http://www.devcomments.com/Embedding-EnvJs-how-to-get-the-Rhino-Shell...

The solution is:

Global global = new Global();
global.init(cx);

On Jan 11, 3:49 pm, cristi <cristi.cior...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Hu Kai  
View profile  
 More options Feb 13 2011, 6:07 pm
From: Hu Kai <iamka...@gmail.com>
Date: Sun, 13 Feb 2011 15:07:22 -0800 (PST)
Local: Sun, Feb 13 2011 6:07 pm
Subject: Re: rhino + envjs into a java application that uses highcharts
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:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
chris thatcher  
View profile  
 More options Feb 14 2011, 8:32 am
From: chris thatcher <thatcher.christop...@gmail.com>
Date: Mon, 14 Feb 2011 08:32:04 -0500
Local: Mon, Feb 14 2011 8:32 am
Subject: Re: [env-js] Re: rhino + envjs into a java application that uses highcharts

Hi Hu, Can you give me some more details about what you mean by 'the
generated html are broken'? Thanks.
Thatcher

--
Christopher Thatcher

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
胡凯  
View profile  
 More options Feb 14 2011, 5:15 pm
From: 胡凯 <iamka...@gmail.com>
Date: Tue, 15 Feb 2011 09:15:20 +1100
Local: Mon, Feb 14 2011 5:15 pm
Subject: Re: [env-js] Re: rhino + envjs into a java application that uses highcharts

let me work on it tonight and send you the code later.

On Tue, Feb 15, 2011 at 12:32 AM, chris thatcher <

--
All Infomation: http://iamhukai.info
Twitter:  http://twitter.com/iamhukai
Blog:  http://iamhukai.com

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Evgeniy Bogdanov  
View profile  
 More options Apr 25, 8:11 am
From: Evgeniy Bogdanov <ebogda...@gmail.com>
Date: Wed, 25 Apr 2012 05:11:16 -0700 (PDT)
Local: Wed, Apr 25 2012 8:11 am
Subject: Re: [env-js] Re: rhino + envjs into a java application that uses highcharts

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.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »