This week's book giveaway is in the Java in General forum.
We're giving away four copies of Event Streams in Action and have Alexander Dean & Valentin Crettaz on-line!
See this thread for details.
Win a copy of Event Streams in Action this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Implementation of google charts in JSP

 
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.
 
Saloon Keeper
Posts: 5712
144
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • 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
Saloon Keeper
Posts: 5712
144
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • 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
Saloon Keeper
Posts: 5712
144
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • 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
Saloon Keeper
Posts: 5712
144
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • 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..?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!