aspose file tools*
The moose likes Other Java Products and Servers and the fly likes Implementation of google charts in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "Implementation of google charts in JSP" Watch "Implementation of google charts in JSP" New topic
Author

Implementation of google charts in JSP

mallikarjun dontamsetti
Ranch Hand

Joined: Mar 18, 2011
Posts: 244

Hi , we have a requirement to implement charts in jsp. in jsp we are getting data based on search page the user given. Example if user want to see the employee from different locations worked around the world in his company. i have to represent the data in pie and bar charts in jsp. i am getting the data in List object of employee. i don't know how to get the data for that charts. give me some example it will be helpfull for me.
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
Does it have to be Google charts? If yes, there are examples on its web site. You might also want to look into the Java library Eastwood (from the maker of JFreeChart) - it's a Java web app that implements the Google Chart API (in case you'd rather have control over chart-making instead of ceding that to Google). There's also a JSP tag library called cewolf (on SourceForge) that can generate charts.
mallikarjun dontamsetti
Ranch Hand

Joined: Mar 18, 2011
Posts: 244

When i ask some one they said google charts are much look good than JFree. so i posted my question like that. please give some example
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
What, specifically, are you wondering that isn't explained on the Google Charts web site?
mallikarjun dontamsetti
Ranch Hand

Joined: Mar 18, 2011
Posts: 244

my servlet returning list which i am getting at my JSP in the same JSP only i have to display charts based on this data(list) only.
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
OK. What do you have so far? Using the Google Charts API consists of generating a dynamic <img> URL; do you have that yet?
mallikarjun dontamsetti
Ranch Hand

Joined: Mar 18, 2011
Posts: 244

i just have my jsp and list in the session i am not getting how to pass those perameters and data to google charts
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
Have you gotten any of the examples to work? Which example are you trying to follow to get your stuff to work? I'm getting the impression that you haven't really familiarized yourself with the API; that should be the next step.
mallikarjun dontamsetti
Ranch Hand

Joined: Mar 18, 2011
Posts: 244

i got some example i'll test it first and reply you thanks. here is the link what i got Grails
mallikarjun dontamsetti
Ranch Hand

Joined: Mar 18, 2011
Posts: 244

I have implemented it like this here is my jsp


My servlet code


My class to get data


it is working fine when there is a data. but the code is showing empty space when there is no data. i am checking empty list like i mentioned above

but it is failing why..?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Implementation of google charts in JSP