public static void main(String[] args) {
			// һ״ͼ
			DefaultCategoryDataset dataset = new DefaultCategoryDataset();
			// װ
			dataset.setValue(6, "Profit", "Jane");
			dataset.setValue(3, "Profit2", "Jane");
			dataset.setValue(7, "Profit", "Tom");
			dataset.setValue(6, "Profit2", "Tom");
			dataset.setValue(8, "Profit", "Jill");
			dataset.setValue(9, "Profit2", "Jill");
			dataset.setValue(5, "Profit", "John");
			dataset.setValue(8, "Profit2", "John");
			dataset.setValue(12, "Profit", "Fred");
			dataset.setValue(11, "Profit2", "Fred");

			// ״ͼ
			// JFreeChart chart =
			// ChartFactory.createXYLineChart("""x־","y־","","ͼʾ",Ƿʾͼ,Ƿʾ,Ƿñŵַ);
			// ͼʾ
			// (1)HORIZONTAL:ʾͼ
			// (2)VERTICAL:ʾͼ
			// 3D״ͼ
			JFreeChart chart = ChartFactory.createBarChart3D("ͳͼ", "ֵ", "ʱ", dataset, PlotOrientation.VERTICAL, true, true, false);

			// ܵıɫ
			chart.setBackgroundPaint(ChartColor.WHITE);
			// ñɫ
			chart.getTitle().setPaint(ChartColor.blue);
			// ͼ
			CategoryPlot p = chart.getCategoryPlot();
			// ͼıɫ
			p.setBackgroundPaint(ChartColor.WHITE);
			// ñɫ
			p.setRangeGridlinePaint(ChartColor.red);
			try {
				// // ͼʾ
				// ChartFrame cf = new ChartFrame("״ͼ",chart);
				// cf.pack();
				// // ͼƬС
				// cf.setSize(500,300);
				// // ͼοɼ
				// cf.setVisible(true);

				// ͼƬָļ
				ChartUtilities.saveChartAsPNG(new File("d:\\BarChart.png"), chart, 500, 300);

			} catch (Exception e) {
				System.err.println("Problem occurred creating chart.");
			}
		}