Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Implementation of google charts in JSP

 
mallikarjun dontamsetti
Ranch Hand
Posts: 246
Firefox Browser Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Bartender
Posts: 2677
33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 246
Firefox Browser Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Bartender
Posts: 2677
33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What, specifically, are you wondering that isn't explained on the Google Charts web site?
 
mallikarjun dontamsetti
Ranch Hand
Posts: 246
Firefox Browser Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Bartender
Posts: 2677
33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 246
Firefox Browser Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Bartender
Posts: 2677
33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 246
Firefox Browser Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 246
Firefox Browser Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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..?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic