Meaningless Drivel is fun!*
The moose likes Other Open Source Projects and the fly likes How to zoom in/out with jfreechart on JSP pages? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "How to zoom in/out with jfreechart on JSP pages?" Watch "How to zoom in/out with jfreechart on JSP pages?" New topic
Author

How to zoom in/out with jfreechart on JSP pages?

michael stoker
Ranch Hand

Joined: Jul 15, 2010
Posts: 39
Hi everyone,

I'm new to this forum and first i'd like to apologize if my english is incorrect as i'm french so please be kind to me

I'm working on a web application that will display on a jsp page multiple tables and bar charts. For the tables, no problem, i used a great library: displaytag.
Concerning the bar charts, i'd like to use jfreechart and i could figure out how to display them on my page (i didn't code yet but i pretty know how to do it) but i'm having a problem, i am not sure how to zoom in/out on them (its easy to do it on a servlet but it seems like its impossible to do it on JSP pages as i couldn't find anything about it on the net).

So my question is: is it possible to set a zoom with jfreechart on a JSP page? If not, which other free library do you advice me to use please?

Thanks for any help.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41120
    
  45
If I may suggest a slightly different approach, check out the cewolf tag library (see the link in my signature - I'm the project lead). Comparatively easy embedding of JFreeChart-generated charts in JSP pages is its purpose, and it comes with some support for zooming. The "Zoom Date" and "Zoom Number" pages of the example web app (live at http://www.ulfdittmer.com/cewolfexample/) show that in action.


Ping & DNS - my free Android networking tools app
michael stoker
Ranch Hand

Joined: Jul 15, 2010
Posts: 39
Hi Ulf,

Thank you so much for your reply, i actually just read some of your posts about Cewolf and just sent you an email to know a bite more about it. It would be great if i could do it with your library as i am working for a big lab in France and my responsibles are expecting some interactivity with clients on the web pages i am creating.
I am going to check it our right now and will post anything that i could do with it.

Thank you again for the link.

Regards.
michael stoker
Ranch Hand

Joined: Jul 15, 2010
Posts: 39
May i just ask if the codes you used for the zoom and also the annotations are available please?

Regards.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41120
    
  45
The "cewolfexample web app" download from SourceForge includes all the JSP pages being used for the examples, as well as the Java classes. Just drop the war file into a servlet container, and you'll have the same web app that runs on my web site.
michael stoker
Ranch Hand

Joined: Jul 15, 2010
Posts: 39
I am very sorry, i must be very stupid or tired as it's late here but i can't find the SourceForge section? Is it on your website or somewhere else?

Sorry again and thank you for everything (that's a great project!)
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41120
    
  45
Follow the link in my signature and click on "view all files". The current example web app is listed under "newest files", and all versions are listed underneath "all files" (although you wouldn't want any of those).
michael stoker
Ranch Hand

Joined: Jul 15, 2010
Posts: 39
Thank you very much Ulf, i just found it.

Best regards.
michael stoker
Ranch Hand

Joined: Jul 15, 2010
Posts: 39
Just one last thing please. I noticed there are only the java classes on the war file but not the actual codes. Is there any way to have access to the java code please?

Regards.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41120
    
  45
The Java sources should have been part of the web app; it was an oversight in the build process that it wasn't. I've just uploaded a new build that does include them.
michael stoker
Ranch Hand

Joined: Jul 15, 2010
Posts: 39
Thank you soo very much Ulf, i really appreciate it. You have made my day!

Very best regards.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to zoom in/out with jfreechart on JSP pages?
 
Similar Threads
Generate pie charts throug jsp
Java charts recommendation needed
extending openoffice.org charting component
Charts or Graphs in Jsp
Data for JFreeChart