JFreeChart chart = ChartFactory.createVerticalBarChart3D(title, domain, range, dataset,true,true,false);
chart.setBackgroundPaint(new GradientPaint(0.0F, 0.0F, Color.white, 1000F, 0.0F, Color.red)); chart.setTitle(new TextTitle(title, new Font("隶书", Font.ITALIC, 15)));
Font font=new Font("黑体",Font.TRUETYPE_FONT, 12);
StandardLegend legend = (StandardLegend) chart.getLegend(); legend.setItemFont(font);
CategoryPlot plot = (CategoryPlot)chart.getPlot(); plot.setForegroundAlpha(0.9F);
CategoryAxis domain_axis = plot.getDomainAxis(); domain_axis.setTickLabelFont(font);
ValueAxis value_axis=plot.getRangeAxis(); value_axis.setTickLabelFont(font);
|