/****
*模块:三违同环比统计图
* @author maomao
*功能:设置三违同环比统计图中的标题,折线宽度,节点标记
*/
public class HTYearJFreeChartSetter implements JFreeChartSetter {
private String orgid = "";
private String grade = "";
public HTYearJFreeChartSetter() {
// TODO Auto-generated constructor stub
}
public void set(JFreeChart chart) {
CategoryPlot plot = (CategoryPlot) chart.getPlot();
// ValueAxis va = (ValueAxis) plot.getRangeAxis();
// va.setAutoRange(true);
// va.setFixedAutoRange(50);
String title = "";
ActionContext ac = LocalContext.getLocalContext().getActionContext();
Row rr = FastUnit.getQueryRow(ac, "ht", "ht.stat.query");
orgid = rr.get("orgid");
grade = rr.get("gradeid");
if (Checker.isEmpty(orgid)) {
orgid = ac.getVisitor().getUser().getOrgId();
}else {
;
}
ReportStat rs= new ReportStat();
String orgname =rs.GetOrgName(orgid);
if (Checker.isEmpty(grade)) {
title = orgname + "所有等级同环比统计图";
} else {
title = orgname + grade.toUpperCase() + "级同环比统计图";
}
chart.setTitle(title);
LineAndShapeRenderer r = (LineAndShapeRenderer) plot.getRenderer();
r.setBaseShapesVisible(true);
r.setStroke(new BasicStroke(2));
r.setSeriesStroke(0, new BasicStroke(3.0F, 1, 1, 1.0F, new float[] {10F, 6F}, 0.0F));
}
}
阅读(1436) | 评论(0) | 转发(0) |