• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Replacement for JavaScript charts?

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey all,

I'm moving from a background in .NET to a new position programming in Java. It's exciting!

On to the question... Part of my new role involves maintaining and improving a dozen JSP pages that hit an Oracle back-end. Within those pages there are numerous JavaScript pie charts and graphs. They're very basic in appearance. Do any of you have a favorite Javascript pie chart library you use? Or are there Java applets/servlets that you favor for this function?

Just wanted to get input from some experts.

Thanks
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to JavaRanch. Please read your private messages for an administrative matter.

Google has an API for creating different kinds of charts using JavaScript easily. In fact, you don't even need to use JavaScript, you just create an URL with the parameters and Google will return to you a nice looking chart. Ofcourse you'd need access to the web (specifically to Google) to use that in your application. I don't know if there's a way to use Google's chart service if you don't have access to the Internet (for example, if you're on a corporate network without open Internet access).

A popular Java charting library is JFreeChart. You could write some server-side Java code that generates the chart and sends it back to the client as an image. I wouldn't make an applet out of it, because your users will only be able to see that if they have a JVM installed on their system.
 
Rancher
Posts: 43026
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I don't know if there's a way to use Google's chart service if you don't have access to the Internet (for example, if you're on a corporate network without open Internet access).


http://www.jfree.org/eastwood/ is an open source Java web app that mimics the Google Charts API. So if you'd rather host it yourself - it's trivial.

A popular Java charting library is JFreeChart. You could write some server-side Java code that generates the chart and sends it back to the client as an image. I wouldn't make an applet out of it, because your users will only be able to see that if they have a JVM installed on their system.


Can't let an opportunity pass to tout https://sourceforge.net/projects/cewolf/ (my own project). It's a JSP tag library for embedding charts -specifically those that can be created using JFreeChart- in JSP pages. It's much easier to use than the JFreeChart API itself.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic