Package com.trulytech.mantis.util

Examples of com.trulytech.mantis.util.ChartManagement


        .QueryExecute("select name,X,Y from xychart ");
    String[] Legend = new String[2];
    Legend[0] = "收入1";
    Legend[1] = "收入2";

    ChartManagement chartmgr = null;
    String Type = getParameter(request, "type");

    if (Type.equalsIgnoreCase("0"))

      chartmgr = new ChartManagement(ChartManagement.PIE, response,
          Result, false);

    else if (Type.equalsIgnoreCase("1"))

      chartmgr = new ChartManagement(ChartManagement.PIE, response,
          Result, true);
    else if (Type.equalsIgnoreCase("2"))
      chartmgr = new ChartManagement(ChartManagement.BAR, response,
          ResultBar, false, Legend);

    else if (Type.equalsIgnoreCase("3"))
      chartmgr = new ChartManagement(ChartManagement.LINE, response,
          ResultBar, false, Legend);
    else if (Type.equalsIgnoreCase("4"))
      chartmgr = new ChartManagement(ChartManagement.LINE, response,
          ResultBar, true, Legend);
    else if (Type.equalsIgnoreCase("5"))
      chartmgr = new ChartManagement(ChartManagement.STACKBAR, response,
          ResultBar, false, Legend);
    else if (Type.equalsIgnoreCase("6"))
      chartmgr = new ChartManagement(ChartManagement.STACKBAR, response,
          ResultBar, true, Legend);
    else if (Type.equalsIgnoreCase("7"))
      chartmgr = new ChartManagement(ChartManagement.AREA, response,
          ResultBar, false, Legend);
    else if (Type.equalsIgnoreCase("8"))
      chartmgr = new ChartManagement(ChartManagement.STACKAREA, response,
          ResultBar, false, Legend);

    else if (Type.equalsIgnoreCase("10"))
      chartmgr = new ChartManagement(ChartManagement.RING, response,
          Result, false, Legend);
    else if (Type.equalsIgnoreCase("11"))
      chartmgr = new ChartManagement(ChartManagement.XYLINE, response,
          ResultXY, false);
    else if (Type.equalsIgnoreCase("12"))
      chartmgr = new ChartManagement(ChartManagement.XYAREA, response,
          ResultXY, false);
    chartmgr.setWidth(600);
    chartmgr.setHeight(400);
    // 产生图片
    return chartmgr.generateChart();

  }
View Full Code Here

TOP

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

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.