电脑桌面
添加小米粒文库到电脑桌面
安装后可以在桌面快捷访问

免费jfreechart_生成折线图,饼图,柱状图,堆栈柱状图

免费jfreechart_生成折线图,饼图,柱状图,堆栈柱状图_第1页
1/18
免费jfreechart_生成折线图,饼图,柱状图,堆栈柱状图_第2页
2/18
免费jfreechart_生成折线图,饼图,柱状图,堆栈柱状图_第3页
3/18
最近公司使用jfreechart来生成统计图,使用了折线图,饼图等,因为用的1.0.8a版的jfreechart,与1.0.0 版本的地方有很多不同,而且图片生成清晰度比老版的高,如下是我做的demo. 1.所需包 (1) jfreechart-1.0.8a.jar (2) jcommon-1.0.12.jar 2.运行环境 JDK 1.5 3.源代码 import java.awt.Color; import java.awt.Font; import java.io.File; import java.io.FileOutputStream; import java.text.DecimalFormat; import java.text.NumberFormat; import org.jfree.chart.ChartFactory; import org.jfree.chart.ChartUtilities; import org.jfree.chart.JFreeChart; import org.jfree.chart.axis.CategoryAxis; import org.jfree.chart.axis.CategoryLabelPositions; import org.jfree.chart.axis.NumberAxis; import org.jfree.chart.axis.ValueAxis; import org.jfree.chart.labels.StandardCategoryItemLabelGenerator; import org.jfree.chart.labels.StandardPieSectionLabelGenerator; import org.jfree.chart.plot.CategoryPlot; import org.jfree.chart.plot.PiePlot3D; import org.jfree.chart.plot.PlotOrientation; import org.jfree.chart.renderer.category.BarRenderer; import org.jfree.chart.renderer.category.LineAndShapeRenderer; import org.jfree.chart.renderer.category.StackedBarRenderer; import org.jfree.chart.title.TextTitle; import org.jfree.data.category.CategoryDataset; import org.jfree.data.general.DatasetUtilities; import org.jfree.data.general.DefaultPieDataset; import org.jfree.data.general.PieDataset; /** * 实际取色的时候一定要 16 位的,这样比较准确 * * @author new */ public class CreateChartServiceImpl { private static final String CHART_PATH = "E:/test/"; public static void main(String[] args) { // TODO Auto-generated method stub CreateChartServiceImpl pm = new CreateChartServiceImpl(); // 生成饼状图 pm.makePieChart(); // 生成单组柱状图 pm.makeBarChart(); // 生成多组柱状图 pm.makeBarGroupChart(); // 生成堆积柱状图 pm.makeStackedBarChart(); // 生成折线图 pm.makeLineAndShapeChart(); } /** * 生成折线图 */ public...

1、当您付费下载文档后,您只拥有了使用权限,并不意味着购买了版权,文档只能用于自身使用,不得用于其他商业用途(如 [转卖]进行直接盈利或[编辑后售卖]进行间接盈利)。
2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。
3、如文档内容存在违规,或者侵犯商业秘密、侵犯著作权等,请点击“违规举报”。

碎片内容

免费jfreechart_生成折线图,饼图,柱状图,堆栈柱状图

确认删除?
VIP
微信客服
  • 扫码咨询
会员Q群
  • 会员专属群点击这里加入QQ群
客服邮箱
回到顶部