WebRoot/admin/tongji/tongjiRes.jsp
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<%@ page language="java" pageEncoding="UTF-8"%>
<jsp:directive.page import="java.util.List"/>
<jsp:directive.page import="java.util.Date"/>
<%@page import="com.model.TGoods"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page isELIgnored="false" %>
<jsp:directive.page import="org.jfree.chart.ChartFactory"/>
<jsp:directive.page import="org.jfree.chart.title.TextTitle"/>
<jsp:directive.page import="java.awt.Font"/>
<jsp:directive.page import="java.io.OutputStream"/>
<jsp:directive.page import="org.jfree.chart.ChartUtilities"/>
<jsp:directive.page import="java.io.FileOutputStream"/>
<jsp:directive.page import="org.jfree.data.category.DefaultCategoryDataset"/>
<jsp:directive.page import="org.jfree.chart.plot.PlotOrientation"/>
<jsp:directive.page import="org.jfree.chart.plot.CategoryPlot"/>
<jsp:directive.page import="org.jfree.chart.axis.CategoryAxis"/>
<jsp:directive.page import="org.jfree.chart.axis.NumberAxis"/>
<jsp:directive.page import="org.jfree.chart.JFreeChart"/>
<%
String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3" />
<meta http-equiv="description" content="This is my page" />
<script type="text/javascript">
</script>
</head>
<body leftmargin="2" topmargin="2" background='<%=path %>/img/allbg.gif'>
<%
List goodsList=(List)request.getAttribute("goodsList");
DefaultCategoryDataset categoryDataset=new DefaultCategoryDataset();
for(int i=0;i<goodsList.size();i++)
{
TGoods goods=(TGoods)goodsList.get(i);
categoryDataset.setValue(goods.getXiaoshoujine(), "", goods.getMingcheng());
}
JFreeChart freeChart=ChartFactory.createBarChart("柱状图", "", "销售金额", categoryDataset, PlotOrientation.VERTICAL, false, false, false);
TextTitle title=freeChart.getTitle();
title.setFont(new Font("宋体", Font.BOLD, 20));
CategoryPlot plot=(CategoryPlot)freeChart.getPlot();
CategoryAxis categoryAxis=plot.getDomainAxis();//横轴
categoryAxis.setLabelFont(new Font("宋体", Font.BOLD, 20));
categoryAxis.setTickLabelFont(new Font("宋体" , Font.BOLD , 20));
后面还有 27 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。