This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Client Side Graph/Charting Recommendation? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Client Side Graph/Charting Recommendation?" Watch "Client Side Graph/Charting Recommendation?" New topic
Author

Client Side Graph/Charting Recommendation?

Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

I'm dipping my toe into the world of client side programming - and I'm instantly out my depth!

Can anyone recommend any existing client side components that can generate line and bar graphs? I'm particularly looking for something that can be updated on the fly (in an AJAX-y way presumably?!) as data on the server changes. I'm looking for something that can be used as an alternative to a modest graph drawing applet in environments where the installation of a JRE is prohibited.

If anyone has any recommendations, or can suggest any good resources for pre-cooked client side scripts (commercial or free) it would be a big help.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60794
    
  65

Even if you are prohibited from using a JRE on the client, can you not generate the images on the server to send to the client? Or does it truly need to be a client-side solution?

I know of no such libraries (but that doesn't mean one doesn't exist), but, of course, there's no such thing as "drawing" on the client side (without applets), so you're limited to what can be faked using HTML elements.

I've done such things in the past using Javascript and a heavy dose of CSS, but it's pretty messy and I had lots of problems with IE (since its CSS support is so poor).

Eric usually is pretty up-to-date with what's available out there, so maybe he'll chime in with an available library.
[ January 18, 2007: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336


Even if you are prohibited from using a JRE on the client, can you not generate the images on the server to send to the client? Or does it truly need to be a client-side solution?

We can certainly involve the server to do some of the work, and we are considering producing the chart server-side (since that's easy to do) but were wondering if there was some existing client-side solution. So far all my googling seems to be suggesting if I don't want to do this with an Applet, I need to use Flash or ActiveX. i.e. replace one browser plugin with another, which seems a bit pointless.

If it is just far too difficult a thing to do, I'll probably start pestering the account manager to push the client into dropping their no JRE on the client requirement. But at the moment, its early days.
[ January 18, 2007: Message edited by: Paul Sturrock ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60794
    
  65

I wouldn't pursue ActiveX, unless you are sure that your client base is 100% IE (God help them). But since Flash doesn't require any plugin external to browser, your clients may be less knee-jerk about it.

Personally, being the server-side guy that I am, I'd opt for the server-side solution, if only because that's what I'm most familiar with.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
You might want to look into: http://webfx.eae.net/dhtml/chart/chart.html or http://ajaxian.com/archives/dojo-charting-engine-released

Uses Canvas/SVG to render images so we are talking current day browsers.

ANother solution people use is to make a post to the server with Ajax to get data. Have a serverside charting engine build the graphic, give it a temp name/session id and send that to the client. The client in return sets an image tag to this id and you got the image.

Eric
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Thanks Bear and Eric.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Client Side Graph/Charting Recommendation?
 
Similar Threads
Performance Tuning and Java Plug-in
Hidden Frames
Algorithm Books
Tools using XML(sent from server) containing data to generate image on client side
Help please!!! Is there a method for closing sessions java-side?