fusioncharts饼图显示的一个问题
public void SendmmSStatusCodeAnalysis() { String cityId = this.getParameter("cityId"); String time1 = this.getParameter("startTime"); statslevel = "43200"; String startTime = ""; String endTime = ""; startTime = time1 + "000000"; endTime = time1 + "312359"; List rsltLst = null; try { rsltLst = terminalPerformanceService .getPerformanceMmsBySendstatusCode(cityId, startTime, endTime, statslevel); } catch (ServiceException e) { try { this.getResponse().getWriter().write("查询异常"); } catch (IOException e1) { e1.printStackTrace(); } e.printStackTrace(); } if (rsltLst != null && !rsltLst.isEmpty()) { Iterator itr = rsltLst.iterator(); Document document = DocumentHelper.createDocument(); Element rootEl = document.addElement("chart"); Element el = null; HashMap rsMap = null; String statusCode = ""; String mmsCnt = ""; String percent = ""; while (itr.hasNext()) { rsMap = (HashMap) itr.next(); statusCode = (String) rsMap.get("statusCode"); mmsCnt = (String) rsMap.get("mmsCnt"); percent = (String) rsMap.get("percent"); el = rootEl.addElement("set"); el.addAttribute("label", statusCode); el.addAttribute("value", mmsCnt); } // rootEl.addAttribute("caption", "用户品牌占比"); Element styleEl = rootEl.addElement("styles"); el = styleEl.addElement("definition"); el = el.addElement("style"); el.addAttribute("name", "dataLabeStyle"); el.addAttribute("type", "font"); el.addAttribute("size", "12"); // el.addAttribute("font", "宋体"); el.addAttribute("color", "#009900"); el = styleEl.addElement("application"); el = el.addElement("apply"); el.addAttribute("toObject", "DataLabels"); el.addAttribute("styles", "dataLabeStyle"); // log.info("\n" + document.asXML()); try { this.getResponse().getWriter().write(document.asXML()); } catch (IOException e) { e.printStackTrace(); } } else { try { this.getResponse().getWriter().write("没有查询到数据"); } catch (IOException e) { e.printStackTrace(); } } }