用JFreeChart可以实现
用google搜一下很多的

解决方案 »

  1.   

    有例子吗,我用了JFreeChart但是有很多错误
      

  2.   

    我用了JFreeChart,好了,我现在在win下已经能够正常的显示了好了,但是把文件转移到linxu下就不可以
    出现以下错误:javax.servlet.ServletException
    org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
    org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
    org.apache.jsp.tb12_jsp._jspService(tb12_jsp.java:122)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:298)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    root cause java.lang.NoClassDefFoundError
    org.jfree.chart.ChartFactory.createBarChart3D(ChartFactory.java:636)
    org.apache.jsp.tb12_jsp._jspService(tb12_jsp.java:65)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:298)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.0.25 logs.
    --------------------------------------------------------------------------------
      

  3.   

    你把linux的图形界面启动起来试试,要是还不行那就没办法了这个问题跟系统有关,好象linux的2D引擎的问题
      

  4.   

    10. My web application runs fine on my Windows development machine, but when 
        I deploy it to the Unix/Linux production server, it doesn't work.  What 
        is the problem? Most likely your server does not have X11 running.  This is a Java 
    (AWT/Java2D) issue, not something that is specific to JFreeChart.  There is 
    some more information at Sun's website:     http://java.sun.com/products/java-media/2D/forDevelopers/java2dfaq.html#xvfb In addition, the following thread in the JFreeChart forum contains some 
    useful information:     http://www.jfree.org/phpBB2/viewtopic.php?t=1012
      

  5.   

    http://community.csdn.net/Expert/topic/3297/3297845.xml?temp=.8308679