JWorld@TW the best professional Java site in Taiwan
      註冊 | 登入 | 全文檢索 | 排行榜  

» JWorld@TW » Servlet/JSP 討論區  

按列印兼容模式列印這個話題 列印話題    把這個話題寄給朋友 寄給朋友   
reply to topicthreaded modego to previous topicgo to next topic
本主題所含的標籤
作者 JFreeChart 的DatasetUtilities.createCategoryDataset()方法不能使用
s53





發文: 3
積分: 0
於 2011-11-14 14:34 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
Dear 大大

我是用Tomcat 5.5
JFreechar的version: jfreechart-1.0.13
JFreeChart chart = ChartFactory.createTimeSeriesChart("", "", "分數", lineDataset, true, false, true);

上面那一行可以畫的出來
可是下面
KeyedValues cumulative = DataUtilities.getCumulativePercentages(data);
CategoryDataset dataset = DatasetUtilities.createCategoryDataset("字母", data);
JFreeChart chart = ChartFactory.createBarChart3D("水果銷量統計圖",
"1",
"2",
dataset,
PlotOrientation.VERTICAL,
false,
false,
false);
這一行卻會出現
The method createBarChart3D(String, String, String, CategoryDataset, PlotOrientation, boole
an, boolean, boolean) in the type ChartFactory is not applicable for the arguments (String, String, String, CategoryDataset, PlotOrientation, boolean, boolean, boolean)

下面是我import的jar路徑
<%@ page contentType="text/html;charset=big5"%>
<%@page import="java.util.*"%>

<%@page import="javax.naming.*"%>
<%@page import="java.sql.*"%>
<%@page import="javax.sql.*"%>

<%@page import="java.awt.Color"
import="java.awt.Font"
import="org.jfree.chart.ChartFactory,
org.jfree.chart.JFreeChart,
org.jfree.chart.plot.PlotOrientation,
org.jfree.chart.servlet.ServletUtilities"
import="org.jfree.data.DefaultCategoryDataset"
import="org.jfree.data.XYDataset"
import="org.jfree.chart.*"
import="org.jfree.chart.renderer.*"
import="org.jfree.chart.plot.*"
import="org.jfree.chart.axis.*"
import="org.jfree.chart.labels.*"
import="org.jfree.util.*"
import= "org.jfree.data.*"
import= "org.jfree.data.time.Quarter"
import= "org.jfree.data.time.Month"
import= "org.jfree.data.time.TimeSeries"
import= "org.jfree.data.time.TimeSeriesCollection"
import= "org.jfree.chart.plot.ValueMarker"
import= "org.jfree.chart.title.TextTitle"
import="java.util.*,java.io.*,java.awt.*,java.text.*"
import= "org.jfree.ui.*"

%>
<%@ page import = "java.lang.*,
java.text.SimpleDateFormat,
org.jfree.data.time.Year,
org.jfree.chart.axis.CategoryAxis,
org.jfree.chart.axis.CategoryLabelPositions,
org.jfree.chart.axis.DateAxis,
org.jfree.chart.axis.DateTickMarkPosition,
org.jfree.chart.axis.DateTickUnit,
org.jfree.chart.axis.NumberAxis,
org.jfree.chart.axis.NumberTickUnit,
org.jfree.chart.axis.ValueAxis,
org.jfree.chart.plot.XYPlot,
org.jfree.chart.renderer.xy.XYLineAndShapeRenderer,
org.jfree.data.category.CategoryDataset
org.jfree.ui.RectangleInsets,
java.awt.Font,
org.jfree.chart.renderer.xy.XYItemRenderer,
org.jfree.chart.ChartUtilities"%>

感恩
s53


reply to postreply to post
» JWorld@TW »  Servlet/JSP 討論區

reply to topicthreaded modego to previous topicgo to next topic
  已讀文章
  新的文章
  被刪除的文章
Jump to the top of page

JWorld@TW 本站商標資訊

Powered by Powerful JuteForum® Version Jute 1.5.8