Package com.trulytech.mantis.util

Examples of com.trulytech.mantis.util.Chart


      HttpServletResponse response, SQLParser Parser) throws Exception

  {
    // 绘制字符串
    if (getParameter(request, "Action").equalsIgnoreCase("String")) {
      Chart chart = new Chart(response, 200, Color.BLUE, Color.yellow, 3);

      chart.setStr(getParameter(request, "str"));
      return chart.drawChart();
    }
    // 绘制校验码
    else if (getParameter(request, "Action").equalsIgnoreCase("randimg")) {
      Chart chart = new Chart(response, 50, null, null, 3);
      chart.setStrfont(new Font("Times New Roman", 0, 18));

      chart.setStr(StringUtils.randomNumber(4));
      return chart.drawChart();

    } else { // 绘制饼图
      Chart chart = new Chart(response, 400, Color.white, Color.black, 0);

      DBResult Result = Parser
          .QueryExecute("select label,value from piechart order by id desc");

      chart.setResult(Result);
      chart.setBKColor(Color.white);
      chart.setLabelValue("label");
      chart.setValueName("value");
      chart.setFill(Color.red);
      return chart.drawChart();
    }
  }
View Full Code Here

TOP

Related Classes of com.trulytech.mantis.util.Chart

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.