ChartBLL.cs
上传用户:yinyuehua
上传日期:2022-08-10
资源大小:17k
文件大小:78k
源码类别:

matlab例程

开发平台:

C#

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using Microsoft.VisualBasic;
  5.     public class ChartBLL
  6.     {
  7.         public StringBuilder vml = new StringBuilder();
  8.         public StringBuilder csiVMLChart(ChartModule Chart)
  9.         {
  10.             Chart.BG_color = Strings.Split(Chart.sys_color_list, ",", -1, CompareMethod.Binary);
  11.             Chart.COLOR_count = Information.UBound(Chart.BG_color, 1) + 1;
  12.             Chart.CHART_type = Chart.CHART_type.ToUpper();
  13.             if (ValidateUtil.isBlank(Chart.CHART_title))
  14.             {
  15.                 Chart.CHART_title = Chart.sys_chart_title;
  16.             }
  17.             if (Chart.CHART_left == 0)
  18.             {
  19.                 Chart.CHART_left = Chart.sys_chart_left;
  20.             }
  21.             if (Chart.CHART_top == 0)
  22.             {
  23.                 Chart.CHART_top = Chart.sys_chart_top;
  24.             }
  25.             if (Chart.ALL_width == 0)
  26.             {
  27.                 Chart.ALL_width = Chart.sys_all_width;
  28.             }
  29.             if (Chart.All_height == 0)
  30.             {
  31.                 Chart.All_height = Chart.sys_all_height;
  32.             }
  33.             if (Chart.HEIGHT_split == 0)
  34.             {
  35.                 Chart.HEIGHT_split = Chart.sys_height_split;
  36.             }
  37.             if (Chart.THICKNESS == 0)
  38.             {
  39.                 if (Chart.CHART_type == "Z")
  40.                 {
  41.                     Chart.THICKNESS = 60;
  42.                 }
  43.                 else
  44.                 {
  45.                     Chart.THICKNESS = Chart.sys_thickness;
  46.                 }
  47.             }
  48.             if (Chart.CHART_width == 0)
  49.             {
  50.                 if (Chart.CHART_type == "Z")
  51.                 {
  52.                     Chart.CHART_width = 0;
  53.                 }
  54.                 else
  55.                 {
  56.                     Chart.CHART_width = Chart.sys_chart_width;
  57.                 }
  58.             }
  59.             if (ValidateUtil.isBlank(Chart.SPLIT_color))
  60.             {
  61.                 Chart.SPLIT_color = Chart.sys_split_color;
  62.             }
  63.             if (ValidateUtil.isBlank(Chart.CHART_backcolor))
  64.             {
  65.                 Chart.CHART_backcolor = Chart.sys_chart_backcolor;
  66.             }
  67.             if (ValidateUtil.isBlank(Chart.CHART_type))
  68.             {
  69.                 Chart.CHART_type = Chart.sys_chart_type;
  70.             }
  71.             switch (Chart.CHART_type)
  72.             {
  73.                 case"X":
  74.                     csiVMLColumnChart(Chart);
  75.                     break;
  76.                 case"Y":
  77.                     csiVMLColumnChart(Chart);
  78.                     break;
  79.                 case"L":
  80.                     csiVMLLineChart(Chart);
  81.                     break;
  82.                 case"Z":
  83.                     csiVMLCakeChart(Chart);
  84.                     break;
  85.                 default:
  86.                     break;
  87.             }
  88.             
  89.             return vml;
  90.         }
  91.         private void csiVMLColumnChart(ChartModule Chart)
  92.         {
  93.             Chart.LENGTH = Chart.THICKNESS / 2.0;
  94.             Chart.TOTAL_no1 = Information.UBound(Chart.TOTAL, 1);
  95.             Chart.TOTAL_no2 = Information.UBound(Chart.TOTAL, 2);
  96.             Chart.DUOWEI = true;
  97.             for (int i = 1; i <= Chart.TOTAL_no1; i++)
  98.             {
  99.                 if (!(Information.IsNumeric(Chart.TOTAL[i, 2])) || ValidateUtil.isBlank(Convert.ToString(Chart.TOTAL[i, 2])))
  100.                 {
  101.                     Chart.DUOWEI = false;
  102.                     Chart.TOTAL_no2 = 1;
  103.                     break;
  104.                 }
  105.             }
  106.             Chart.ADDAllWidth = (Chart.TOTAL_no2 - 1) * Chart.CHART_width;
  107.             string[,] pie = null;
  108.             pie = new string[Chart.TOTAL_no1 + 1, Chart.TOTAL_no2 + 1];
  109.             Chart.ALLvalues = 0.0;
  110.             Chart.Standard = Convert.ToInt32(Strings.Split(Convert.ToString(Chart.TOTAL[0, 0]), ",", -1, CompareMethod.Binary)[0]);
  111.             
  112.             if (Chart.Standard == 0)
  113.             {
  114.                 for (int i = 1; i <= Chart.TOTAL_no2; i++)
  115.                 {
  116.                     for (int j = 1; j <= Chart.TOTAL_no1; j++)
  117.                     {
  118.                         Chart.ALLvalues = Chart.ALLvalues + Convert.ToDouble(Chart.TOTAL[j, i]);
  119.                     }
  120.                     for (int k = 1; k <= Chart.TOTAL_no1; k++)
  121.                     {
  122.                         pie[k, i] = Strings.FormatNumber(Convert.ToDouble(Chart.TOTAL[k, i]) / Chart.ALLvalues, 4, TriState.True, TriState.UseDefault, TriState.UseDefault);
  123.                     }
  124.                 }
  125.             }
  126.             else
  127.             {
  128.                 for (int i = 1; i <= Chart.TOTAL_no2; i++)
  129.                 {
  130.                     for (int j = 1; j <= Chart.TOTAL_no1; j++)
  131.                     {
  132.                         Chart.ALLvalues = Chart.ALLvalues + Convert.ToDouble(Chart.TOTAL[j, i]);
  133.                     }
  134.                     for (int k = 1; k <= Chart.TOTAL_no1; k++)
  135.                     {
  136.                         pie[k, i] = Strings.FormatNumber(Convert.ToDouble(Chart.TOTAL[k, i]) / Convert.ToDouble(Chart.TOTAL[Chart.Standard, i]), 4, TriState.True, TriState.UseDefault, TriState.UseDefault);
  137.                     }
  138.                 }
  139.             }
  140.             Chart.TEMP1 = 0;
  141.             for (int i = 1; i <= Chart.TOTAL_no2; i++)
  142.             {
  143.                 for (int j = 1; j <= Chart.TOTAL_no1; j++)
  144.                 {
  145.                     if (Convert.ToDouble(Chart.TEMP1) < Convert.ToDouble(Chart.TOTAL[j, i]))
  146.                     {
  147.                         Chart.TEMP1 = Chart.TOTAL[j, i];
  148.                     }
  149.                 }
  150.             }
  151.             Chart.TEMP1 = Conversion.Int(Chart.TEMP1);
  152.             if (Convert.ToInt32(Chart.TEMP1) > 9)
  153.             {
  154.                 Chart.TEMP2 = Convert.ToString(Chart.TEMP1).Substring(1, 1);
  155.                 if (String.Compare(Chart.TEMP2, "4") > 0)
  156.                 {
  157.                     Chart.TEMP3 = (Conversion.Int(Convert.ToDouble(Chart.TEMP1) / (Math.Pow(10.0, ((Convert.ToString(Chart.TEMP1)).Length - 1)))) + 1.0) * Math.Pow(10.0, ((Convert.ToString(Chart.TEMP1)).Length - 1));
  158.                 }
  159.                 else
  160.                 {
  161.                     Chart.TEMP3 = (Conversion.Int(Convert.ToDouble(Chart.TEMP1) / (Math.Pow(10.0, ((Convert.ToString(Chart.TEMP1)).Length - 1)))) + 0.5) * Math.Pow(10.0, ((Convert.ToString(Chart.TEMP1)).Length - 1));
  162.                 }
  163.             }
  164.             else
  165.             {
  166.                 if (Convert.ToInt32(Chart.TEMP1) > 4)
  167.                 {
  168.                     Chart.TEMP3 = 10.0;
  169.                 }
  170.                 else
  171.                 {
  172.                     Chart.TEMP3 = 5.0;
  173.                 }
  174.             }
  175.             Chart.TEMP4 = Chart.TEMP3;
  176.             Chart.LEFT_width = Convert.ToString(Chart.TEMP4).Length * 10;
  177.             Chart.LEFT_x = Chart.CHART_left + Chart.LEFT_width;
  178.             Chart.TTAH = Chart.CHART_top + Chart.All_height;
  179.             Chart.TLAW = Chart.CHART_left + Chart.ALL_width + Chart.ADDAllWidth;
  180.             vml.Append("<!--[if gte vml 1]><v:rect id='msi_1027' style='position:absolute;left:");
  181.             vml.Append(Chart.LEFT_x);
  182.             vml.Append("px;top:");
  183.             vml.Append(Chart.CHART_top);
  184.             vml.Append("px;width:");
  185.             vml.Append(Chart.ALL_width + Chart.ADDAllWidth);
  186.             vml.Append("px;height:");
  187.             vml.Append(Chart.All_height);
  188.             vml.Append("px;z-index:-1' fillcolor='");
  189.             vml.Append(Chart.CHART_backcolor);
  190.             vml.Append("' stroked='f'><v:fill rotate='t' angle='-45' focus='100%' type='gradient'/></v:rect><![endif]-->");
  191.             vml.Append("<!--[if gte vml 1]><v:line id='msi_1027' ");
  192.             vml.Append(Chart.VMLStyle);
  193.             vml.Append(" from='");
  194.             vml.Append(Chart.LEFT_x);
  195.             vml.Append("px,");
  196.             vml.Append(Chart.TTAH);
  197.             vml.Append("px' to='");
  198.             vml.Append(Chart.TLAW + Chart.LEFT_width);
  199.             vml.Append("px,");
  200.             vml.Append(Chart.TTAH);
  201.             vml.Append("px'><v:stroke opacity='1' startarrow='none' endarrow='classic'/></v:line>");
  202.             vml.Append("<v:shape id='msi_1025' style='position:absolute;left:");
  203.             vml.Append(Chart.TLAW + Chart.LEFT_width - 5);
  204.             vml.Append("px;top:");
  205.             vml.Append(Chart.TTAH - 10);
  206.             vml.Append("px;width:");
  207.             vml.Append(Chart.ALL_width);
  208.             vml.Append("px;height:28px;z-index:1'>");
  209.             vml.Append("<v:textbox inset='0px,0px,0px,0px'><table cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td align='left'>");
  210.             vml.Append(string.Format("<b>{0}</b>", Chart.XTitle));
  211.             vml.Append("</td></tr></table></v:textbox></v:shape><![endif]-->");
  212.             vml.Append("<!--[if gte vml 1]><v:line id='msi_1027' ");
  213.             vml.Append(Chart.VMLStyle);
  214.             vml.Append(" from='");
  215.             vml.Append(Chart.LEFT_x);
  216.             vml.Append("px,");
  217.             vml.Append(Chart.CHART_top);
  218.             vml.Append("px' to='");
  219.             vml.Append(Chart.LEFT_x);
  220.             vml.Append("px,");
  221.             vml.Append(Chart.TTAH);
  222.             vml.Append("px'><v:stroke opacity='1' startarrow='none' endarrow='classic'/></v:line>");
  223.             vml.Append("<v:shape id='msi_1025' style='position:absolute;left:");
  224.             vml.Append(Chart.LEFT_x - 20);
  225.             vml.Append("px;top:");
  226.             vml.Append(Chart.CHART_top - 20);
  227.             vml.Append("px;width:");
  228.             vml.Append(Chart.ALL_width);
  229.             vml.Append("px;height:28px;z-index:1'>");
  230.             vml.Append("<v:textbox inset='0px,0px,0px,0px'><table cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td align='left'>");
  231.             vml.Append(string.Format("<b>{0}</b><font color='red'>总数({1})</font>", Chart.YTitle, Chart.ALLvalues + Chart.UNIT));
  232.             vml.Append("</td></tr></table></v:textbox></v:shape><![endif]-->");
  233.             if (Chart.CHART_type == "Y")
  234.             {
  235.                 Chart.CHART_space = (Chart.ALL_width - Chart.CHART_width * Chart.TOTAL_no1) / Chart.TOTAL_no1;
  236.                 vml.Append("<!--[if gte vml 1]><v:line id='msi_1027' ");
  237.                 vml.Append(Chart.VMLStyle);
  238.                 vml.Append(" from='");
  239.                 vml.Append(Chart.LEFT_x + Chart.LENGTH);
  240.                 vml.Append("px,");
  241.                 vml.Append(Chart.CHART_top);
  242.                 vml.Append("px' to='");
  243.                 vml.Append(Chart.LEFT_x + Chart.LENGTH);
  244.                 vml.Append("px,");
  245.                 vml.Append(Chart.TTAH - Chart.LENGTH);
  246.                 vml.Append("px' strokecolor='");
  247.                 vml.Append(Chart.SPLIT_color);
  248.                 vml.Append("'/><![endif]-->");
  249.                 for (int i = 0; (Chart.All_height / Chart.HEIGHT_split > 0 && i <= Chart.All_height - 1) || (Chart.All_height / Chart.HEIGHT_split < 0 && i >= Chart.All_height - 1); i += Chart.All_height / Chart.HEIGHT_split)
  250.                 {
  251.                     vml.Append("<!--[if gte vml 1]><v:line id='msi_1027' ");
  252.                     vml.Append(Chart.VMLStyle);
  253.                     vml.Append(" from='");
  254.                     vml.Append(Chart.LEFT_x);
  255.                     vml.Append("px,");
  256.                     vml.Append(Chart.TTAH - Chart.LENGTH - i);
  257.                     vml.Append("px' to='");
  258.                     vml.Append(Chart.LEFT_x + Chart.LENGTH);
  259.                     vml.Append("px,");
  260.                     vml.Append(Chart.TTAH - i);
  261.                     vml.Append("px' strokecolor='");
  262.                     vml.Append(Chart.SPLIT_color);
  263.                     vml.Append("'/><![endif]-->");
  264.                     vml.Append("<!--[if gte vml 1]><v:line id='msi_1027' ");
  265.                     vml.Append(Chart.VMLStyle);
  266.                     vml.Append(" from='");
  267.                     vml.Append(Chart.LEFT_x + Chart.LENGTH);
  268.                     vml.Append("px,");
  269.                     vml.Append(Chart.TTAH - Chart.LENGTH - i);
  270.                     vml.Append("px' to='");
  271.                     vml.Append(Chart.TLAW + Chart.LEFT_width);
  272.                     vml.Append("px,");
  273.                     vml.Append(Chart.TTAH - Chart.LENGTH - i);
  274.                     vml.Append("px' strokecolor='");
  275.                     vml.Append(Chart.SPLIT_color);
  276.                     vml.Append("'/><![endif]-->");
  277.                     vml.Append("<!--[if gte vml 1]><v:line id='msi_1027' ");
  278.                     vml.Append(Chart.VMLStyle);
  279.                     vml.Append(" from='");
  280.                     vml.Append(Chart.CHART_left + (Chart.LEFT_width - 15));
  281.                     vml.Append("px,");
  282.                     vml.Append(Chart.CHART_top + i);
  283.                     vml.Append("px' to='");
  284.                     vml.Append(Chart.LEFT_x);
  285.                     vml.Append("px,");
  286.                     vml.Append(Chart.CHART_top + i);
  287.                     vml.Append("px'/><![endif]-->");
  288.                     vml.Append("<!--[if gte vml 1]>");
  289.                     vml.Append("<v:shape id='msi_1025' type='#_x0000_t202' style='position:absolute;left:");
  290.                     vml.Append(Chart.CHART_left);
  291.                     vml.Append("px;top:");
  292.                     vml.Append(Chart.CHART_top + i);
  293.                     vml.Append("px;width:");
  294.                     vml.Append(Chart.LEFT_width);
  295.                     vml.Append("px;height:18px;z-index:1'>");
  296.                     vml.Append("<v:textbox inset='0px,0px,0px,0px'><table cellspacing='0' cellpadding='0' width='100%' height='100%'><tr><td align='right'>");
  297.                     vml.Append(Chart.TEMP4);
  298.                     vml.Append("</td></tr></table></v:textbox></v:shape><![endif]-->");
  299.                     Chart.TEMP4 = Chart.TEMP4 - Chart.TEMP3 / Chart.HEIGHT_split;
  300.                 }
  301.                 for (int i = 1; i <= Chart.TOTAL_no1; i++)
  302.                 {
  303.                     for (int j = 1; j <= Chart.TOTAL_no2; j++)
  304.                     {
  305.                         Chart.SetColor = Convert.ToString(Chart.TOTAL[i, 2]).Trim();
  306.                         if (Information.IsNumeric(Chart.SetColor))
  307.                         {
  308.                             Chart.SetColor = Strings.Split(Convert.ToString(Chart.TOTAL[0, j]), ",", -1, CompareMethod.Binary)[4];
  309.                         }
  310.                         if (ValidateUtil.isBlank(Chart.SetColor) && Chart.DUOWEI)
  311.                         {
  312.                             Chart.SetColor = Chart.BG_color[j % Chart.COLOR_count];
  313.                         }
  314.                         if (ValidateUtil.isBlank(Chart.SetColor) && !Chart.DUOWEI)
  315.                         {
  316.                             Chart.SetColor = Chart.BG_color[i % Chart.COLOR_count];
  317.                         }
  318.                         Chart.TEMP_space = Chart.LEFT_x + Chart.CHART_space / 2.0 + Chart.CHART_space * (i - 1) + Chart.CHART_width * (i - 1);
  319.                         vml.Append("<a href='");
  320.                         vml.Append(Strings.Split(Convert.ToString(Chart.TOTAL[i, 0]), ",", -1, CompareMethod.Binary)[1]);
  321.                         vml.Append("'><v:rect id='msi_1025' title='项目:");
  322.                         vml.Append(Strings.Split(Convert.ToString(Chart.TOTAL[i, 0]), ",", -1, CompareMethod.Binary)[0]);
  323.                         vml.Append(" <br>数值:");
  324.                         vml.Append(Convert.ToString(Chart.TOTAL[i, j]) + Chart.UNIT);
  325.                         vml.Append(" <br>比例:");
  326.                         vml.Append(Convert.ToDouble(pie[i, j]) * 100.0);
  327.                         vml.Append("% <br>点击可查看详细列表' style='position:absolute;left:");
  328.                         vml.Append(Chart.TEMP_space + (j - 1) * Chart.CHART_width);
  329.                         vml.Append("px;top:");
  330.                         vml.Append(Chart.CHART_top + Chart.All_height * (1.0 - (Convert.ToDouble(Chart.TOTAL[i, j]) / Chart.TEMP3)));
  331.                         vml.Append("px;width:");
  332.                         vml.Append(Chart.CHART_width);
  333.                         vml.Append("px;height:");
  334.                         vml.Append(Chart.All_height * (Convert.ToDouble(Chart.TOTAL[i, j]) / Chart.TEMP3));
  335.                         vml.Append("px;z-index:1' fillcolor='");
  336.                         vml.Append(Chart.SetColor);
  337.                         vml.Append("' onmouseover='this.fillcolor="#FFFFFF"' onmouseout='this.fillcolor="");
  338.                         vml.Append(Chart.SetColor);
  339.                         vml.Append(""'>");
  340.                         vml.Append("<v:fill color2='");
  341.                         vml.Append(Chart.SetColor);
  342.                         vml.Append("' rotate='t' type='gradient'/>");
  343.                         vml.Append("<o:extrusion v:ext='view' backdepth='");
  344.                         vml.Append(Chart.THICKNESS);
  345.                         vml.Append("pt' color='");
  346.                         vml.Append(Chart.SetColor);
  347.                         vml.Append("' on='t'/></v:rect></a>");
  348.                         if (!Chart.DUOWEI)
  349.                         {
  350.                             vml.Append("<v:shape id='msi_1025' type='#_x0000_t202' style='position:absolute;left:");
  351.                             vml.Append(Chart.TEMP_space - 10.0);
  352.                             vml.Append("px;top:");
  353.                             vml.Append(Chart.CHART_top + Chart.All_height * (1.0 - (Convert.ToDouble(Chart.TOTAL[i, j]) / Chart.TEMP3)) - Chart.CHART_width);
  354.                             vml.Append("px;width:");
  355.                             vml.Append(Chart.CHART_space + 25.0);
  356.                             vml.Append("px;height:18px;z-index:1'>");
  357.                             vml.Append("<v:textbox inset='0px,0px,0px,0px'><table cellspacing='0' cellpadding='0' width='100%' height='100%'><tr><td align='center'><a href='");
  358.                             vml.Append(Strings.Split(Convert.ToString(Chart.TOTAL[i, 0]), ",", -1, CompareMethod.Binary)[1]);
  359.                             vml.Append("'><font color=red>");
  360.                             vml.Append(Convert.ToString(Chart.TOTAL[i, j]) + Chart.UNIT);
  361.                             vml.Append("</font></a></td></tr></table></v:textbox></v:shape>");
  362.                         }
  363.                     }
  364.                     vml.Append("<v:shape id='msi_1025' type='#_x0000_t202'  style='position:absolute;left:");
  365.                     vml.Append(Chart.TEMP_space - Chart.CHART_space / 2.0 + Chart.CHART_width * Chart.TOTAL_no2 / 2.0);
  366.                     vml.Append("px;top:");
  367.                     vml.Append(Chart.TTAH + 1);
  368.                     vml.Append("px;width:");
  369.                     vml.Append(Chart.CHART_space + Chart.CHART_width);
  370.                     vml.Append("px;height:28px;z-index:1'>");
  371.                     Chart.LineName = Strings.Split(Convert.ToString(Chart.TOTAL[i, 0]), ",", -1, CompareMethod.Binary)[0];
  372.                     Chart.HrefName = Strings.Split(Convert.ToString(Chart.TOTAL[i, 0]), ",", -1, CompareMethod.Binary)[1];
  373.                     
  374.                     if (i == Chart.Standard)
  375.                     {
  376.                         Chart.LineName = "<a title='以此项目为标准比100%' href='" + Chart.HrefName + "'><font color=red>" + Chart.LineName + "</font></a>";
  377.                     }
  378.                     else
  379.                     {
  380.                         Chart.LineName = "<a href='" + Chart.HrefName + "'>" + Chart.LineName + "</a>";
  381.                     }
  382.                     vml.Append("<v:textbox>");
  383.                     vml.Append(Chart.LineName);
  384.                     vml.Append("</v:textbox></v:shape>");
  385.                     vml.Append("<script type='text/javascript'>document.getElementById('CountImage2').width=");
  386.                     vml.Append(66 + (33 * i));
  387.                     vml.Append(";document.getElementById('CountTXT').innerHTML='处理进度:<font color=red><b>");
  388.                     vml.Append(50 + (50 / Chart.TOTAL_no1 * i));
  389.                     vml.Append("</b></font>';document.getElementById('CountImage').title = '正在处理数据...';</script>");
  390.                 }
  391.             }
  392.             else if (Chart.CHART_type == "X")
  393.             {
  394.                 Chart.CHART_space = (Chart.All_height - Chart.CHART_width * Chart.TOTAL_no1) / Chart.TOTAL_no1;
  395.                 vml.Append("<!--[if gte vml 1]><v:line id='msi_1027' ");
  396.                 vml.Append(Chart.VMLStyle);
  397.                 vml.Append(" from='");
  398.                 vml.Append(Chart.LEFT_x + Chart.LENGTH);
  399.                 vml.Append("px,");
  400.                 vml.Append(Chart.TTAH - Chart.LENGTH);
  401.                 vml.Append("px' to='");
  402.                 vml.Append(Chart.LEFT_x + Chart.ALL_width);
  403.                 vml.Append("px,");
  404.                 vml.Append(Chart.TTAH - Chart.LENGTH);
  405.                 vml.Append("px' strokecolor='");
  406.                 vml.Append(Chart.SPLIT_color);
  407.                 vml.Append("'/><![endif]-->");
  408.                 for (int i = 0; (Chart.ALL_width / Chart.HEIGHT_split > 0 && i <= Chart.ALL_width - 1) || (Chart.ALL_width / Chart.HEIGHT_split < 0 && i >= Chart.ALL_width - 1); i += Chart.ALL_width / Chart.HEIGHT_split)
  409.                 {
  410.                     vml.Append("<!--[if gte vml 1]><v:line id='msi_1027' ");
  411.                     vml.Append(Chart.VMLStyle);
  412.                     vml.Append(" from='");
  413.                     vml.Append(Chart.LEFT_x + i);
  414.                     vml.Append("px,");
  415.                     vml.Append(Chart.TTAH - Chart.LENGTH);
  416.                     vml.Append("px' to='");
  417.                     vml.Append(Chart.LEFT_x + Chart.LENGTH + i);
  418.                     vml.Append("px,");
  419.                     vml.Append(Chart.TTAH);
  420.                     vml.Append("px' strokecolor='");
  421.                     vml.Append(Chart.SPLIT_color);
  422.                     vml.Append("'/><![endif]-->");
  423.                     vml.Append("<!--[if gte vml 1]><v:line id='msi_1027' ");
  424.                     vml.Append(Chart.VMLStyle);
  425.                     vml.Append(" from='");
  426.                     vml.Append(Chart.LEFT_x + Chart.LENGTH + i);
  427.                     vml.Append("px,");
  428.                     vml.Append(Chart.TTAH - Chart.LENGTH);
  429.                     vml.Append("px' to='");
  430.                     vml.Append(Chart.LEFT_x + Chart.LENGTH + i);
  431.                     vml.Append("px,");
  432.                     vml.Append(Chart.CHART_top);
  433.                     vml.Append("px' strokecolor='");
  434.                     vml.Append(Chart.SPLIT_color);
  435.                     vml.Append("'/><![endif]-->");
  436.                     vml.Append("<!--[if gte vml 1]><v:line id='msi_1027' ");
  437.                     vml.Append(Chart.VMLStyle);
  438.                     vml.Append(" from='");
  439.                     vml.Append(Chart.LEFT_x + i + Chart.ALL_width / Chart.HEIGHT_split);
  440.                     vml.Append("px,");
  441.                     vml.Append(Chart.TTAH);
  442.                     vml.Append("px' to='");
  443.                     vml.Append(Chart.LEFT_x + i + Chart.ALL_width / Chart.HEIGHT_split);
  444.                     vml.Append("px,");
  445.                     vml.Append(Chart.TTAH + 15);
  446.                     vml.Append("px'/><![endif]-->");
  447.                     vml.Append("<!--[if gte vml 1]>");
  448.                     vml.Append("<v:shape id='msi_1025' type='#_x0000_t202' style='position:absolute;left:");
  449.                     vml.Append(Chart.CHART_left + i);
  450.                     vml.Append("px;top:");
  451.                     vml.Append(Chart.TTAH);
  452.                     vml.Append("px;width:");
  453.                     vml.Append(Chart.LEFT_width);
  454.                     vml.Append("px;height:18px;z-index:1'>");
  455.                     vml.Append("<v:textbox inset='40px,0px,0px,0px'><table><tr><td align='left'>");
  456.                     vml.Append(Chart.TEMP3 - Chart.TEMP4);
  457.                     vml.Append("</td></tr></table></v:textbox></v:shape><![endif]-->");
  458.                     Chart.TEMP4 = Chart.TEMP4 - Chart.TEMP3 / Chart.HEIGHT_split;
  459.                 }
  460.                 for (int i = 1; i <= Chart.TOTAL_no1; i++)
  461.                 {
  462.                     for (int j = 1; j <= Chart.TOTAL_no2; j++)
  463.                     {
  464.                         Chart.SetColor = Convert.ToString(Chart.TOTAL[i, 2]).Trim();
  465.                         if (Information.IsNumeric(Chart.SetColor))
  466.                         {
  467.                             Chart.SetColor = Strings.Split(Convert.ToString(Chart.TOTAL[0, j]),",",-1,CompareMethod.Binary)[4];
  468.                         }
  469.                         if (ValidateUtil.isBlank(Chart.SetColor) && Chart.DUOWEI)
  470.                         {
  471.                             Chart.SetColor = Chart.BG_color[j % Chart.COLOR_count];
  472.                         }
  473.                         if (ValidateUtil.isBlank(Chart.SetColor) && !Chart.DUOWEI)
  474.                         {
  475.                             Chart.SetColor = Chart.BG_color[i % Chart.COLOR_count];
  476.                         }
  477.                         Chart.TEMP_space = Chart.CHART_space / 2.0 + Chart.CHART_space * (i - 1) + Chart.CHART_width * (i - 1) + Chart.CHART_top;
  478.                         vml.Append("<a href='");
  479.                         vml.Append(Strings.Split(Convert.ToString(Chart.TOTAL[i, 0]), ",", -1, CompareMethod.Binary)[1]);
  480.                         vml.Append("'><v:rect id='msi_1025' title='项目:");
  481.                         vml.Append(Strings.Split(Convert.ToString(Chart.TOTAL[i, 0]), ",", -1, CompareMethod.Binary)[0]);
  482.                         vml.Append(" <br>数值:");
  483.                         vml.Append(Convert.ToString(Chart.TOTAL[i, j]) + Chart.UNIT);
  484.                         vml.Append(" <br>比例:");
  485.                         vml.Append(Convert.ToDouble(pie[i, j]) * 100.0);
  486.                         vml.Append("% <br>点击可查看详细列表'  style='position:absolute;left:");
  487.                         vml.Append(Chart.LEFT_x);
  488.                         vml.Append("px;top:");
  489.                         if (Chart.DUOWEI)
  490.                         {
  491.                             vml.Append(Chart.TEMP_space + (j - 3) * Chart.CHART_width);
  492.                         }
  493.                         else
  494.                         {
  495.                             vml.Append(Chart.TEMP_space);
  496.                         }
  497.                         vml.Append("px;width:");
  498.                         vml.Append(Chart.ALL_width * (Convert.ToDouble(Chart.TOTAL[i, j]) / Chart.TEMP3));
  499.                         vml.Append("px;height:");
  500.                         vml.Append(Chart.CHART_width);
  501.                         vml.Append("px;z-index:");
  502.                         vml.Append(10 - j);
  503.                         vml.Append("' fillcolor='");
  504.                         vml.Append(Chart.SetColor);
  505.                         vml.Append("' onmouseover='this.fillcolor="#FFFFFF"' onmouseout='this.fillcolor="");
  506.                         vml.Append(Chart.SetColor);
  507.                         vml.Append(""'>");
  508.                         vml.Append("<v:fill color2='");
  509.                         vml.Append(Chart.SetColor);
  510.                         vml.Append("' rotate='t' angle='-90' focus='100%' type='gradient'/>");
  511.                         vml.Append("<o:extrusion v:ext='view' backdepth='");
  512.                         vml.Append(Chart.THICKNESS);
  513.                         vml.Append("pt' color='");
  514.                         vml.Append(Chart.SetColor);
  515.                         vml.Append("' on='t'/></v:rect></a>");
  516.                         if (!Chart.DUOWEI)
  517.                         {
  518.                             vml.Append("<v:shape id='msi_1025' type='#_x0000_t202' style='position:absolute;left:");
  519.                             vml.Append(Chart.LEFT_x + Chart.ALL_width * (Convert.ToDouble(Chart.TOTAL[i, j]) / Chart.TEMP3) + Chart.THICKNESS / 2.0 - 10.0);
  520.                             vml.Append("px;top:");
  521.                             vml.Append(Chart.TEMP_space - 6.0 + (j - 1) * Chart.CHART_width);
  522.                             vml.Append("px;width:");
  523.                             vml.Append(Chart.CHART_space + 55.0);
  524.                             vml.Append("px;height:18px;z-index:1'>");
  525.                             vml.Append("<v:textbox inset='0px,0px,0px,0px'><table cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td align='center'><a href='");
  526.                             vml.Append(Strings.Split(Convert.ToString(Chart.TOTAL[i, 0]), ",", -1, CompareMethod.Binary)[1]);
  527.                             vml.Append("'><font color=red>");
  528.                             vml.Append(Convert.ToString(Chart.TOTAL[i, j]) + Chart.UNIT);
  529.                             vml.Append("</font></a></td></tr></table></v:textbox></v:shape>");
  530.                         }
  531.                     }
  532.                     vml.Append("<v:shape id='msi_1025' type='#_x0000_t202' style='position:absolute;left:");
  533.                     vml.Append(Chart.CHART_left);
  534.                     vml.Append("px;top:");
  535.                     vml.Append(Chart.TEMP_space);
  536.                     vml.Append("px;width:");
  537.                     vml.Append(Chart.LEFT_width);
  538.                     vml.Append("px;height:18px;z-index:1'>");
  539.                     Chart.LineName = Strings.Split(Convert.ToString(Chart.TOTAL[i, 0]), ",", -1, CompareMethod.Binary)[0];
  540.                     Chart.HrefName = Strings.Split(Convert.ToString(Chart.TOTAL[i, 0]), ",", -1, CompareMethod.Binary)[1];
  541.                     if (i == Chart.Standard)
  542.                     {
  543.                         Chart.LineName = "<a title='以此项目为标准比100%' href='" + Chart.HrefName + "'><font color=red>" + Chart.LineName + "</font></a>";
  544.                     }
  545.                     else
  546.                     {
  547.                         Chart.LineName = "<a href='" + Chart.HrefName + "'>" + Chart.LineName + "</a>";
  548.                     }
  549.                     vml.Append("<v:textbox inset='-20px,0px,0px,0px'><table cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td align='right'>");
  550.                     vml.Append(Chart.LineName);
  551.                     vml.Append("</td></tr></table></v:textbox></v:shape>");
  552.                 }
  553.             }
  554.             else
  555.             {
  556.             }
  557.             if (Chart.DUOWEI)
  558.             {
  559.                 Chart.TB_height = 15;
  560.                 vml.Append("<v:rect id='msi_1025' style='position:absolute;left:");
  561.                 vml.Append(Chart.TLAW);
  562.                 vml.Append("px;top:");
  563.                 vml.Append(Chart.CHART_top);
  564.                 vml.Append("px;width:100px;height:");
  565.                 vml.Append(Chart.TOTAL_no2 * Chart.TB_height + 20);
  566.                 vml.Append("px;z-index:1'/>");
  567.                 for (int i = 1; i <= Chart.TOTAL_no2; i++)
  568.                 {
  569.                     Chart.SetColor = Strings.Split(Convert.ToString(Chart.TOTAL[0, i]), ",", -1, CompareMethod.Binary)[4];
  570.                     if (ValidateUtil.isBlank(Chart.SetColor))
  571.                     {
  572.                         Chart.SetColor = Chart.BG_color[i % Chart.COLOR_count];
  573.                     }
  574.                     vml.Append("<v:shape id='msi_1025' type='#_x0000_t202' style='position:absolute;left:");
  575.                     vml.Append(Chart.TLAW + 15);
  576.                     vml.Append("px;top:");
  577.                     vml.Append(Chart.CHART_top + 10 + (i - 1) * Chart.TB_height);
  578.                     vml.Append("px;width:100px;height:");
  579.                     vml.Append(Chart.TB_height);
  580.                     vml.Append("px;z-index:1'>");
  581.                     vml.Append("<v:textbox inset='0px,0px,0px,0px'><table cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td align='left'>");
  582.                     vml.Append(Strings.Split(Convert.ToString(Chart.TOTAL[0, i]), ",", -1, CompareMethod.Binary)[0]);
  583.                     vml.Append("</td></tr></table></v:textbox></v:shape>");
  584.                     vml.Append("<v:rect id='msi_1040' style='position:absolute;left:");
  585.                     vml.Append(Chart.TLAW + 60);
  586.                     vml.Append("px;top:");
  587.                     vml.Append(Chart.CHART_top + 10 + (i - 1) * Chart.TB_height + 4);
  588.                     vml.Append("px;width:30px;height:10px;z-index:1' fillcolor='");
  589.                     vml.Append(Chart.SetColor);
  590.                     vml.Append("'><v:fill color2='");
  591.                     vml.Append(Chart.SetColor);
  592.                     vml.Append("' rotate='t' focus='100%' type='gradient'/></v:rect>");
  593.                 }
  594.             }
  595.             vml.Append("<v:shape id='msi_1025' type='#_x0000_t202' style='position:absolute;left:");
  596.             vml.Append(Chart.LEFT_x);
  597.             vml.Append("px;top:");
  598.             vml.Append(Chart.CHART_top + Chart.TB_height + Chart.All_height + 20);
  599.             vml.Append("px;width:");
  600.             vml.Append(Chart.ALL_width);
  601.             vml.Append("px;height:");
  602.             vml.Append(Chart.TB_height);
  603.             vml.Append("px;z-index:1'><table align='center'><tr><td>");
  604.             vml.Append(Chart.CHART_title);
  605.             vml.Append("</td></tr></v:shape>");
  606.         }
  607.         private void csiVMLLineChart(ChartModule Chart)
  608.         {
  609.             Chart.TOTAL_no1 = Information.UBound(Chart.TOTAL, 1);
  610.             Chart.LINE_no = Information.UBound(Chart.TOTAL, 2);
  611.             string[,] pie = null;
  612.             pie = new string[Chart.TOTAL_no1 + 1, Chart.LINE_no + 1];
  613.             Chart.ALLvalues = 0.0;
  614.             Chart.Standard = Convert.ToInt32(Strings.Split(Convert.ToString(Chart.TOTAL[0, 0]), ",", -1, CompareMethod.Binary)[0]);
  615.             if (Chart.Standard == 0)
  616.             {
  617.                 for (int i = 1; i <= Chart.LINE_no; i++)
  618.                 {
  619.                     for (int j = 1; j <= Chart.TOTAL_no1; j++)
  620.                     {
  621.                         Chart.ALLvalues = Chart.ALLvalues + Convert.ToDouble(Chart.TOTAL[j, i]);
  622.                     }
  623.                     for (int k = 1; k <= Chart.TOTAL_no1; k++)
  624.                     {
  625.                         pie[k, i] = Strings.FormatNumber(Convert.ToDouble(Chart.TOTAL[k, i]) / Chart.ALLvalues, 4, TriState.True, TriState.UseDefault, TriState.UseDefault);
  626.                     }
  627.                 }
  628.             }
  629.             else
  630.             {
  631.                 for (int i = 1; i <= Chart.LINE_no; i++)
  632.                 {
  633.                     for (int j = 1; j <= Chart.TOTAL_no1; j++)
  634.                     {
  635.                         Chart.ALLvalues = Chart.ALLvalues + Convert.ToDouble(Chart.TOTAL[j, i]);
  636.                     }
  637.                     for (int k = 1; k <= Chart.TOTAL_no1; k++)
  638.                     {
  639.                         pie[k, i] = Strings.FormatNumber(Convert.ToDouble(Chart.TOTAL[k, i]) / Convert.ToDouble(Chart.TOTAL[Chart.Standard, i]), 4, TriState.True, TriState.UseDefault, TriState.UseDefault);
  640.                     }
  641.                 }
  642.             }
  643.             Chart.TEMP1 = 0;
  644.             for (int i = 1; i <= Chart.TOTAL_no1; i++)
  645.             {
  646.                 for (int j = 1; j <= Chart.LINE_no; j++)
  647.                 {
  648.                     if (Convert.ToDouble(Chart.TEMP1) < Convert.ToDouble(Chart.TOTAL[i, j]))
  649.                     {
  650.                         Chart.TEMP1 = Chart.TOTAL[i, j];
  651.                     }
  652.                 }
  653.             }
  654.             Chart.TEMP1 = Conversion.Int(Chart.TEMP1);
  655.             if (Convert.ToUInt32(Chart.TEMP1) > 9)
  656.             {
  657.                 Chart.TEMP2 = Convert.ToString(Chart.TEMP1).Substring(1, 1);
  658.                 if (string.Compare(Chart.TEMP2, "4") > 0)
  659.                 {
  660.                     Chart.TEMP3 = (Conversion.Int(Convert.ToDouble(Chart.TEMP1) / (Math.Pow(10.0, ((Convert.ToString(Chart.TEMP1)).Length - 1)))) + 1.0) * Math.Pow(10.0, ((Convert.ToString(Chart.TEMP1)).Length - 1));
  661.                 }
  662.                 else
  663.                 {
  664.                     Chart.TEMP3 = (Conversion.Int(Convert.ToDouble(Chart.TEMP1) / (Math.Pow(10.0, ((Convert.ToString(Chart.TEMP1)).Length - 1)))) + 0.5) * Math.Pow(10.0, ((Convert.ToString(Chart.TEMP1)).Length - 1));
  665.                 }
  666.             }
  667.             else
  668.             {
  669.                 if (Convert.ToInt32(Chart.TEMP1) > 4)
  670.                 {
  671.                     Chart.TEMP3 = 10.0;
  672.                 }
  673.                 else
  674.                 {
  675.                     Chart.TEMP3 = 5.0;
  676.                 }
  677.             }
  678.             Chart.TEMP4 = Chart.TEMP3;
  679.             Chart.LEFT_width = Chart.TEMP4.ToString().Length * 10;
  680.             Chart.LEFT_x = Chart.CHART_left + Chart.LEFT_width;
  681.             Chart.TTAH = Chart.CHART_top + Chart.All_height;
  682.             Chart.TLAW = Chart.CHART_left + Chart.ALL_width;
  683.             vml.Append("<v:rect id='msi_1027' style='position:absolute;left:");
  684.             vml.Append(Chart.LEFT_x);
  685.             vml.Append("px;top:");
  686.             vml.Append(Chart.CHART_top);
  687.             vml.Append("px;width:");
  688.             vml.Append(Chart.ALL_width);
  689.             vml.Append("px;height:");
  690.             vml.Append(Chart.All_height);
  691.             vml.Append("px;z-index:-1' fillcolor='");
  692.             vml.Append(Chart.CHART_backcolor);
  693.             vml.Append("' stroked='f'><v:fill rotate='t' angle='-45' focus='100%' type='gradient'/></v:rect>");
  694.             for (int i = 0; (Chart.All_height / Chart.HEIGHT_split > 0 && i <= Chart.All_height - 1) || (Chart.All_height / Chart.HEIGHT_split < 0 && i >= Chart.All_height - 1); i += Chart.All_height / Chart.HEIGHT_split)
  695.             {
  696.                 vml.Append("<v:line id='msi_1027' ");
  697.                 vml.Append(Chart.VMLStyle);
  698.                 vml.Append(" from='");
  699.                 vml.Append(Chart.LEFT_x + Chart.LENGTH);
  700.                 vml.Append("px,");
  701.                 vml.Append(Chart.TTAH - Chart.LENGTH - i);
  702.                 vml.Append("px' to='");
  703.                 vml.Append(Chart.LEFT_x + Chart.ALL_width);
  704.                 vml.Append("px,");
  705.                 vml.Append(Chart.TTAH - Chart.LENGTH - i);
  706.                 vml.Append("px' strokecolor='");
  707.                 vml.Append(Chart.SPLIT_color);
  708.                 vml.Append("'/>");
  709.                 vml.Append("<v:line id='msi_1027' ");
  710.                 vml.Append(Chart.VMLStyle);
  711.                 vml.Append(" from='");
  712.                 vml.Append(Chart.LEFT_x - 15);
  713.                 vml.Append("px,");
  714.                 vml.Append(Chart.CHART_top + i);
  715.                 vml.Append("px' to='");
  716.                 vml.Append(Chart.LEFT_x);
  717.                 vml.Append("px,");
  718.                 vml.Append(Chart.CHART_top + i);
  719.                 vml.Append("px'/>");
  720.                 vml.Append("");
  721.                 vml.Append("<v:shape id='msi_1025' type='#_x0000_t202' style='position:absolute;left:");
  722.                 vml.Append(Chart.CHART_left);
  723.                 vml.Append("px;top:");
  724.                 vml.Append(Chart.CHART_top + i);
  725.                 vml.Append("px;width:");
  726.                 vml.Append(Chart.LEFT_width);
  727.                 vml.Append("px;height:18px;z-index:1'>");
  728.                 vml.Append("<v:textbox inset='0px,0px,0px,0px'><table cellspacing='0' cellpadding='0' width='100%' height='100%'><tr><td align='right'>");
  729.                 vml.Append(Chart.TEMP4);
  730.                 vml.Append("</td></tr></table></v:textbox></v:shape>");
  731.                 Chart.TEMP4 = Chart.TEMP4 - Chart.TEMP3 / Chart.HEIGHT_split;
  732.             }
  733.             vml.Append("<v:line id='msi_1027' ");
  734.             vml.Append(Chart.VMLStyle);
  735.             vml.Append(" from='");
  736.             vml.Append(Chart.LEFT_x);
  737.             vml.Append("px,");
  738.             vml.Append(Chart.TTAH);
  739.             vml.Append("px' to='");
  740.             vml.Append(Chart.LEFT_x + Chart.ALL_width);
  741.             vml.Append("px,");
  742.             vml.Append(Chart.TTAH);
  743.             vml.Append("px'><v:stroke opacity='5' startarrow='none' endarrow='classic'/></v:line>");
  744.             vml.Append("<v:shape id='msi_1025' style='position:absolute;left:");
  745.             vml.Append(Chart.TLAW + Chart.LEFT_width - 5);
  746.             vml.Append("px;top:");
  747.             vml.Append(Chart.TTAH - 10);
  748.             vml.Append("px;width:");
  749.             vml.Append(Chart.ALL_width);
  750.             vml.Append("px;height:28px;z-index:1'>");
  751.             vml.Append("<v:textbox inset='0px,0px,0px,0px'><table cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td align='left'>");
  752.             vml.Append(string.Format("<b>{0}</b>", Chart.XTitle));
  753.             vml.Append("</td></tr></table></v:textbox></v:shape>");
  754.             vml.Append("<v:line id='msi_1027' " + Chart.VMLStyle + " from='");
  755.             vml.Append(Chart.LEFT_x);
  756.             vml.Append("px,");
  757.             vml.Append(Chart.CHART_top);
  758.             vml.Append("px' to='");
  759.             vml.Append(Chart.LEFT_x);
  760.             vml.Append("px,");
  761.             vml.Append(Chart.TTAH);
  762.             vml.Append("px'><v:stroke opacity='5' startarrow='none' endarrow='classic'/></v:line>");
  763.             vml.Append("<v:shape id='msi_1025' style='position:absolute;left:");
  764.             vml.Append(Chart.LEFT_x - 20);
  765.             vml.Append("px;top:");
  766.             vml.Append(Chart.CHART_top - 20);
  767.             vml.Append("px;width:");
  768.             vml.Append(Chart.ALL_width);
  769.             vml.Append("px;height:28px;z-index:1'>");
  770.             vml.Append("<v:textbox inset='0px,0px,0px,0px'><table cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td align='left'>");
  771.             vml.Append(string.Format("<b>{0}</b><font color='red'>总数({1})</font>", Chart.YTitle, Chart.ALLvalues + Chart.UNIT));
  772.             vml.Append("</td></tr></table></v:textbox></v:shape>");
  773.             string[,] line_code = null;
  774.             line_code = new string[Chart.LINE_no + 1, 5 + 1];
  775.             for (int i = 1; i <= Chart.LINE_no; i++)
  776.             {
  777.                 if (ValidateUtil.isBlank(Convert.ToString(Chart.TOTAL[0, i])))
  778.                 {
  779.                     Chart.TOTAL[0, i] = "未定义,,,,";
  780.                 }
  781.                 Chart.LINE_temp = Strings.Split(Convert.ToString(Chart.TOTAL[0, i]), ",", -1, CompareMethod.Binary);
  782.                 line_code[i, 1] = Chart.LINE_temp[1];
  783.                 line_code[i, 2] = Chart.LINE_temp[2];
  784.                 line_code[i, 3] = Chart.LINE_temp[3];
  785.                 line_code[i, 4] = Chart.LINE_temp[4];
  786.                 line_code[i, 5] = Chart.LINE_temp[0];
  787.                 if (ValidateUtil.isBlank(line_code[i, 1]))
  788.                 {
  789.                     line_code[i, 1] = Chart.BG_color[i % Chart.COLOR_count];
  790.                 }
  791.                 if (!(Information.IsNumeric(line_code[i, 2])))
  792.                 {
  793.                     line_code[i, 2] = "2";
  794.                 }
  795.                 if (!(Information.IsNumeric(line_code[i, 3])))
  796.                 {
  797.                     line_code[i, 3] = "1";
  798.                 }
  799.                 if (!(Information.IsNumeric(line_code[i, 4])))
  800.                 {
  801.                     line_code[i, 4] = "3";
  802.                 }                
  803.             }
  804.             for (int j = 1; j <= Chart.LINE_no; j++)
  805.             {
  806.                 for (int k = 1; k <= Chart.TOTAL_no1-1; k++)
  807.                 {
  808.                     Chart.X1 = Convert.ToInt32(Chart.LEFT_x + Chart.ALL_width * (k - 1.0) / Chart.TOTAL_no1);
  809.                     Chart.Y1 = Convert.ToInt32(Chart.CHART_top + (Chart.TEMP3 - Convert.ToDouble(Chart.TOTAL[k, j])) * (Chart.All_height / Chart.TEMP3));
  810.                     Chart.X2 = Convert.ToInt32(Chart.LEFT_x + Chart.ALL_width * k / Chart.TOTAL_no1);
  811.                     Chart.Y2 = Convert.ToInt32(Chart.CHART_top + (Chart.TEMP3 - Convert.ToDouble(Chart.TOTAL[k + 1, j])) * (Chart.All_height / Chart.TEMP3));
  812.                     if (!ValidateUtil.isBlank(Convert.ToString(Chart.TOTAL[k, j])))
  813.                     {
  814.                         vml.Append("<v:line id='msi_1025' title='");
  815.                         vml.Append(Convert.ToString(Chart.TOTAL[k, j]) + Chart.UNIT);
  816.                         vml.Append("-");
  817.                         vml.Append(Convert.ToString(Chart.TOTAL[k + 1, j]) + Chart.UNIT);
  818.                         vml.Append("' style='position:absolute;left:0px;text-align:left;top:0;z-index:1' from='");
  819.                         vml.Append(Chart.X1);
  820.                         vml.Append("px,");
  821.                         vml.Append(Chart.Y1);
  822.                         vml.Append("px' to='");
  823.                         vml.Append(Chart.X2);
  824.                         vml.Append("px,");
  825.                         vml.Append(Chart.Y2);
  826.                         vml.Append("px' coordsize='21600,21600' strokecolor='");
  827.                         vml.Append(line_code[j, 1]);
  828.                         vml.Append("' strokeweight='");
  829.                         vml.Append(line_code[j, 2]);
  830.                         vml.Append("' onmouseover='this.strokeweight=this.strokeweight+1' onmouseout='this.strokeweight=this.strokeweight-1'>");
  831.                         switch (line_code[j, 3])
  832.                         {
  833.                             case"1":
  834.                                 vml.Append("<v:stroke dashstyle='solid'/>");
  835.                                 break;
  836.                             case"2":
  837.                                 vml.Append("<v:stroke dashstyle='dot'/>");
  838.                                 break;
  839.                             case"3":
  840.                                 vml.Append("<v:stroke dashstyle='dash'/>");
  841.                                 break;
  842.                             case"4":
  843.                                 vml.Append("<v:stroke dashstyle='dashdot'/>");
  844.                                 break;
  845.                             case"5":
  846.                                 vml.Append("<v:stroke dashstyle='longdash'/>");
  847.                                 break;
  848.                             case"6":
  849.                                 vml.Append("<v:stroke dashstyle='longdashdot'/>");
  850.                                 break;
  851.                             case"7":
  852.                                 vml.Append("<v:stroke dashstyle='longdashdotdot'/>");
  853.                                 break;
  854.                             case"8":
  855.                                 vml.Append("<v:stroke dashstyle='shortdot'/>");
  856.                                 break;
  857.                             case"9":
  858.                                 vml.Append("<v:stroke dashstyle='shortdash'/>");
  859.                                 break;
  860.                             case"10":
  861.                                 vml.Append("<v:stroke dashstyle='shortdashdot'/>");
  862.                                 break;
  863.                             case"11":
  864.                                 vml.Append("<v:stroke dashstyle='shortdashdotdot'/>");
  865.                                 break;
  866.                             default:
  867.                                 break;
  868.                         }
  869.                         vml.Append("</v:line>");
  870.                         //折点类型 '优化...
  871.                         if (line_code[j, 4] == "1")
  872.                         {
  873.                             vml.Append("<v:shape id='msi_1025' type='#_x0000_t202' style='position:absolute;left:");
  874.                             vml.Append(Chart.X1 - 2);
  875.                             vml.Append("px;top:");
  876.                             vml.Append(Chart.Y1 - 2);
  877.                             vml.Append("px;width:50px;height:18px;z-index:1'>");
  878.                             vml.Append("<v:textbox inset='0px,0px,0px,0px'><table cellspacing='0' cellpadding='0' width='100%' height='100%'><tr><td align='center'><a href='");
  879.                             vml.Append(Strings.Split(Convert.ToString(Chart.TOTAL[k, 0]), ",", -1, CompareMethod.Binary)[1]);
  880.                             vml.Append("'><font color=red>");
  881.                             vml.Append(Convert.ToString(Chart.TOTAL[k, j]));
  882.                             vml.Append("</font></a></td></tr></table></v:textbox></v:shape>");
  883.                         }
  884.                         else if (line_code[j, 4] == "2")
  885.                         {
  886.                             vml.Append("<v:shape id='msi_1025' type='#_x0000_t202' style='position:absolute;left:");
  887.                             vml.Append(Chart.X1 - 2);
  888.                             vml.Append("px;top:");
  889.                             vml.Append(Chart.Y1 - 2);
  890.                             vml.Append("px;width:50px;height:18px;z-index:1'>");
  891.                             vml.Append("<v:textbox inset='0px,0px,0px,0px'><table cellspacing='0' cellpadding='0' width='100%' height='100%'><tr><td align='center'><a href='");
  892.                             vml.Append(Strings.Split(Convert.ToString(Chart.TOTAL[k, 0]), ",", -1, CompareMethod.Binary)[1]);
  893.                             vml.Append("'><font color=red>");
  894.                             vml.Append(Convert.ToString(Chart.TOTAL[k, j]));
  895.                             vml.Append("</font></a></td></tr></table></v:textbox></v:shape>");
  896.                             vml.Append("<a href='");
  897.                             vml.Append(Strings.Split(Convert.ToString(Chart.TOTAL[k, 0]), ",", -1, CompareMethod.Binary)[1]);
  898.                             vml.Append("'><v:rect id='msi_1027'  title='项目:");
  899.                             vml.Append(Strings.Split(Convert.ToString(Chart.TOTAL[k, 0]), ",", -1, CompareMethod.Binary)[0]);
  900.                             vml.Append(" <br>数值:");
  901.                             vml.Append(Convert.ToString(Chart.TOTAL[k, j]) + Chart.UNIT);
  902.                             vml.Append(" <br>比例:");
  903.                             vml.Append(Convert.ToDouble(pie[k, j]) * 100.0);
  904.                             vml.Append("% <br>点击可查看详细列表' style='position:absolute;left:");
  905.                             vml.Append(Chart.X1 - 2);
  906.                             vml.Append("px;top:");
  907.                             vml.Append(Chart.Y1 - 2);
  908.                             vml.Append("px;width:4px;height:4px; z-index:2' fillcolor='red' strokecolor='");
  909.                             vml.Append(line_code[j, 1]);
  910.                             vml.Append("'/></a>");
  911.                         }
  912.                         else if (line_code[j, 4] == "3")
  913.                         {
  914.                             vml.Append("<v:shape id='msi_1025' type='#_x0000_t202' style='position:absolute;left:");
  915.                             vml.Append(Chart.X1 - 2);
  916.                             vml.Append("px;top:");
  917.                             vml.Append(Chart.Y1 - 2);
  918.                             vml.Append("px;width:50px;height:18px;z-index:1'>");
  919.                             vml.Append("<v:textbox inset='0px,0px,0px,0px'><table cellspacing='0' cellpadding='0' width='100%' height='100%'><tr><td align='center'><a href='");
  920.                             vml.Append(Strings.Split(Convert.ToString(Chart.TOTAL[k, 0]), ",", -1, CompareMethod.Binary)[1]);
  921.                             vml.Append("'><font color=red>");
  922.                             vml.Append(Convert.ToString(Chart.TOTAL[k, j]));
  923.                             vml.Append("</font></a></td></tr></table></v:textbox></v:shape>");
  924.                             vml.Append("<a href='");
  925.                             vml.Append(Strings.Split(Convert.ToString(Chart.TOTAL[k, 0]), ",", -1, CompareMethod.Binary)[1]);
  926.                             vml.Append("'><v:oval id='msi_1026'  title='项目:");
  927.                             vml.Append(Strings.Split(Convert.ToString(Chart.TOTAL[k, 0]), ",", -1, CompareMethod.Binary)[0]);
  928.                             vml.Append(" <br>数值:");
  929.                             vml.Append(Convert.ToString(Chart.TOTAL[k, j]) + Chart.UNIT);
  930.                             vml.Append(" <br>比例:");
  931.                             vml.Append(Convert.ToDouble(pie[k, j]) * 100.0);
  932.                             vml.Append("% <br>点击可查看详细列表' style='position:absolute;left:");
  933.                             vml.Append(Chart.X1 - 2);
  934.                             vml.Append("px;top:");
  935.                             vml.Append(Chart.Y1 - 2);
  936.                             vml.Append("px;width:4px;height:4px; z-index:2' fillcolor='red' strokecolor='");
  937.                             vml.Append(line_code[j, 1]);
  938.                             vml.Append("'/></a>");
  939.                         }
  940.                         //最后的一个折点
  941.                         if (line_code[j, 4] == "1")
  942.                         {
  943.                         }
  944.                         else if (line_code[j, 4] == "2")
  945.                         {
  946.                             vml.Append("<a href='");
  947.                             vml.Append(Strings.Split(Convert.ToString(Chart.TOTAL[Chart.TOTAL_no1, 0]), ",", -1, CompareMethod.Binary)[1]);
  948.                             vml.Append("'><v:rect id='msi_1027' title='项目:");
  949.                             vml.Append(Strings.Split(Convert.ToString(Chart.TOTAL[Chart.TOTAL_no1, 0]), ",", -1, CompareMethod.Binary)[0]);
  950.                             vml.Append(" <br>数值:");
  951.                             vml.Append(Convert.ToString(Chart.TOTAL[Chart.TOTAL_no1, j]) + Chart.UNIT);
  952.                             vml.Append(" <br>比例:");
  953.                             vml.Append(Convert.ToDouble(pie[Chart.TOTAL_no1, j]) * 100.0);
  954.                             vml.Append("% <br>点击可查看详细列表' style='position:absolute;left:");
  955.                             vml.Append(Chart.X2 - 2);
  956.                             vml.Append("px;top:");
  957.                             vml.Append(Chart.Y2 - 2);
  958.                             vml.Append("px;width:4px;height:4px; z-index:2' fillcolor='red' strokecolor='");
  959.                             vml.Append(line_code[j, 1]);
  960.                             vml.Append("'/></a>");
  961.                         }
  962.                         else if (line_code[j, 4] == "3")
  963.                         {
  964.                             vml.Append("<a href='");
  965.                             vml.Append(Strings.Split(Convert.ToString(Chart.TOTAL[Chart.TOTAL_no1, 0]), ",", -1, CompareMethod.Binary)[1]);
  966.                             vml.Append("'><v:oval id='msi_1026' title='项目:");
  967.                             vml.Append(Strings.Split(Convert.ToString(Chart.TOTAL[Chart.TOTAL_no1, 0]), ",", -1, CompareMethod.Binary)[0]);
  968.                             vml.Append(" <br>数值:");
  969.                             vml.Append(Convert.ToString(Chart.TOTAL[Chart.TOTAL_no1, j]) + Chart.UNIT);
  970.                             vml.Append(" <br>比例:");
  971.                             vml.Append(Convert.ToDouble(pie[Chart.TOTAL_no1, j]) * 100.0);
  972.                             vml.Append("% <br>点击可查看详细列表' style='position:absolute;left:");
  973.                             vml.Append(Chart.X2 - 2);
  974.                             vml.Append("px;top:");
  975.                             vml.Append(Chart.Y2 - 2);
  976.                             vml.Append("px;width:4px;height:4px;z-index:1' fillcolor='red' strokecolor='");
  977.                             vml.Append(line_code[j, 1]);
  978.                             vml.Append("'/></a>");
  979.                         }
  980.                     }
  981.                 }
  982.                 vml.Append("<v:shape id='msi_1025' type='#_x0000_t202' style='position:absolute;left:");
  983.                 vml.Append(Chart.X2 - 2);
  984.                 vml.Append("px;top:");
  985.                 vml.Append(Chart.Y2 - 2);
  986.                 vml.Append("px;width:50px;height:18px;z-index:1'>");
  987.                 vml.Append("<v:textbox inset='0px,0px,0px,0px'><table cellspacing='0' cellpadding='0' width='100%' height='100%'><tr><td align='center'><a href='");
  988.                 vml.Append(Strings.Split(Convert.ToString(Chart.TOTAL[Chart.TOTAL_no1, 0]), ",", -1, CompareMethod.Binary)[1]);
  989.                 vml.Append("'><font color=red>");
  990.                 vml.Append(Chart.TOTAL[Chart.TOTAL_no1, j]);
  991.                 vml.Append("</font></a></td></tr></table></v:textbox></v:shape>");
  992.             }
  993.             for (int i = 1; i <= Chart.TOTAL_no1; i++)
  994.             {
  995.                 vml.Append("<v:line id='msi_1027' ");
  996.                 vml.Append(Chart.VMLStyle);
  997.                 vml.Append(" from='");
  998.                 vml.Append(Chart.LEFT_x + Chart.ALL_width * (i - 1) / Chart.TOTAL_no1);
  999.                 vml.Append("px,");
  1000.                 vml.Append(Chart.TTAH);
  1001.                 vml.Append("px' to='");
  1002.                 vml.Append(Chart.LEFT_x + Chart.ALL_width * (i - 1) / Chart.TOTAL_no1);
  1003.                 vml.Append("px,");
  1004.                 vml.Append(Chart.TTAH + 15);
  1005.                 vml.Append("px'/>");
  1006.                 if (i > 1)
  1007.                 {
  1008.                     vml.Append("<v:line id='msi_1027' ");
  1009.                     vml.Append(Chart.VMLStyle);
  1010.                     vml.Append(" from='");
  1011.                     vml.Append(Chart.LEFT_x + Chart.ALL_width * (i - 1) / Chart.TOTAL_no1);
  1012.                     vml.Append("px,");
  1013.                     vml.Append(Chart.TTAH);
  1014.                     vml.Append("px' to='");
  1015.                     vml.Append(Chart.LEFT_x + Chart.ALL_width * (i - 1) / Chart.TOTAL_no1);
  1016.                     vml.Append("px,");
  1017.                     vml.Append(Chart.CHART_top);
  1018.                     vml.Append("px' strokecolor='");
  1019.                     vml.Append(Chart.SPLIT_color);
  1020.                     vml.Append("'/>");
  1021.                 }
  1022.                 vml.Append("");
  1023.                 vml.Append("<v:shape id='msi_1025' type='#_x0000_t202' style='position:absolute;left:");
  1024.                 vml.Append(Chart.LEFT_x + Chart.ALL_width * (i - 1) / Chart.TOTAL_no1);
  1025.                 vml.Append("px;top:");
  1026.                 vml.Append(Chart.TTAH);
  1027.                 vml.Append("px;width:");
  1028.                 vml.Append(Chart.ALL_width / Chart.TOTAL_no1);
  1029.                 vml.Append("px;height:28px;z-index:1'>");
  1030.                 Chart.LineName = Strings.Split(Convert.ToString(Chart.TOTAL[i, 0]), ",", -1, CompareMethod.Binary)[0];
  1031.                 Chart.HrefName = Strings.Split(Convert.ToString(Chart.TOTAL[i, 0]), ",", -1, CompareMethod.Binary)[1];
  1032.                 if (i == Chart.Standard)
  1033.                 {
  1034.                     Chart.LineName = "<a title='以此项目为标准比100%' href='" + Chart.HrefName + "'><font color=red>" + Chart.LineName + "</font></a>";
  1035.                 }
  1036.                 else
  1037.                 {
  1038.                     Chart.LineName = "<a href='" + Chart.HrefName + "'>" + Chart.LineName + "</a>";
  1039.                 }
  1040.                 vml.Append("<v:textbox>");
  1041.                 vml.Append(Chart.LineName);
  1042.                 vml.Append("</v:textbox></v:shape>");
  1043.                 vml.Append("<script type='text/javascript'>document.getElementById('CountImage2').width=");
  1044.                 vml.Append(66 + (33 * i));
  1045.                 vml.Append(";document.getElementById('CountTXT').innerHTML='处理进度:<font color=red><b>");
  1046.                 vml.Append(50 + (50 / Chart.TOTAL_no1 * i));
  1047.                 vml.Append("</b></font>';document.getElementById('CountImage').title = '正在处理数据...';</script>");
  1048.             }
  1049.             Chart.TB_height = 15;
  1050.             if (Chart.LINE_no > 2)
  1051.             {
  1052.                 vml.Append("<v:rect id='msi_1025' style='position:absolute;left:");
  1053.                 vml.Append(Chart.TLAW);
  1054.                 vml.Append("px;top:");
  1055.                 vml.Append(Chart.CHART_top);
  1056.                 vml.Append("px;width:100px;height:");
  1057.                 vml.Append(Chart.LINE_no * Chart.TB_height + 20);
  1058.                 vml.Append("px;z-index:1'/>");
  1059.                 for (int i = 1; i <= Chart.LINE_no; i++)
  1060.                 {
  1061.                     vml.Append("<v:shape id='msi_1025' type='#_x0000_t202' style='position:absolute;left:");
  1062.                     vml.Append(Chart.TLAW + 15);
  1063.                     vml.Append("px;top:");
  1064.                     vml.Append(Chart.CHART_top + 10 + (i - 1) * Chart.TB_height);
  1065.                     vml.Append("px;width:60px;height:");
  1066.                     vml.Append(Chart.TB_height);
  1067.                     vml.Append("px;z-index:1'>");
  1068.                     vml.Append("<v:textbox inset='0px,0px,0px,0px'><table cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td align='left'>");
  1069.                     vml.Append(line_code[i, 5]);
  1070.                     vml.Append("</td></tr></table></v:textbox></v:shape>");
  1071.                     vml.Append("<v:rect id='msi_1040' style='position:absolute;left:");
  1072.                     vml.Append(Chart.TLAW + 60);
  1073.                     vml.Append("px;top:");
  1074.                     vml.Append(Chart.CHART_top + 10 + (i - 1) * Chart.TB_height + 4);
  1075.                     vml.Append("px;width:30px;height:10px;z-index:1' fillcolor='");
  1076.                     vml.Append(line_code[i, 1]);
  1077.                     vml.Append("'><v:fill color2='");
  1078.                     vml.Append(line_code[i, 1]);
  1079.                     vml.Append("' rotate='t' focus='100%' type='gradient'/></v:rect>");
  1080.                 }
  1081.             }
  1082.             vml.Append("<v:shape id='msi_1025' type='#_x0000_t202' style='position:absolute;left:");
  1083.             vml.Append(Chart.LEFT_x);
  1084.             vml.Append("px;top:");
  1085.             vml.Append(Chart.CHART_top + Chart.TB_height + Chart.All_height + 10);
  1086.             vml.Append("px;width:");
  1087.             vml.Append(Chart.ALL_width);
  1088.             vml.Append("px;height:");
  1089.             vml.Append(Chart.TB_height);
  1090.             vml.Append("px;z-index:1'><table align='center'><tr><td>");
  1091.             vml.Append(Chart.CHART_title);
  1092.             vml.Append("</td></tr></v:shape>");
  1093.         }
  1094.         private void csiVMLCakeChart(ChartModule Chart)
  1095.         {
  1096.             if (Chart.THICKNESS > 80 | Chart.THICKNESS < 0)
  1097.             {
  1098.                 Chart.THICKNESS = 60;
  1099.             }
  1100.             if (Chart.CHART_width > 0.5 | Chart.CHART_width < 0)
  1101.             {
  1102.                 Chart.CHART_width = 0;
  1103.             }
  1104.             Chart.InTop = Chart.CHART_top + Chart.All_height / 14.0;
  1105.             Chart.Chart_no = Information.UBound(Chart.TOTAL, 1);
  1106.             string[] pie = null;
  1107.             pie = new string[Chart.Chart_no + 1];
  1108.             Chart.ALLvalues = 0.0;
  1109.             Chart.Standard = Convert.ToInt32(Strings.Split(Convert.ToString(Chart.TOTAL[0, 0]), ",", -1, CompareMethod.Binary)[0]);
  1110.             if (Chart.Standard == 0)
  1111.             {
  1112.                 for (int i = 1; i <= Chart.Chart_no; i++)
  1113.                 {
  1114.                     Chart.ALLvalues = Chart.ALLvalues + Convert.ToDouble(Chart.TOTAL[i, 1]);
  1115.                 }
  1116.                 for (int j = 1; j <= Chart.Chart_no; j++)
  1117.                 {
  1118.                     pie[j] = Strings.FormatNumber(Convert.ToDouble(Chart.TOTAL[j, 1]) / Chart.ALLvalues, 4, TriState.True, TriState.UseDefault, TriState.UseDefault);
  1119.                 }
  1120.             }
  1121.             else
  1122.             {
  1123.                 for (int i = 1; i <= Chart.Chart_no; i++)
  1124.                 {
  1125.                     Chart.ALLvalues = Chart.ALLvalues + Convert.ToDouble(Chart.TOTAL[i, 1]);
  1126.                 }
  1127.                 for (int j = 1; j <= Chart.Chart_no; j++)
  1128.                 {
  1129.                     pie[j] = Strings.FormatNumber(Convert.ToDouble(Chart.TOTAL[j, 1]) / Convert.ToDouble(Chart.TOTAL[Chart.Standard, 1]), 4, TriState.True, TriState.UseDefault, TriState.UseDefault);
  1130.                 }
  1131.             }
  1132.             vml.Append("<v:shapetype id='Cake_3D' coordsize='21600,21600' o:spt='95' adj='11796480,5400' path='al10800,10800@0@0@2@14,10800,10800,10800,10800@3@15xe'></v:shapetype>");
  1133.             vml.Append("<v:shapetype id='3dtxt' coordsize='21600,21600' o:spt='136' adj='10800' path='m@7,l@8,m@5,21600l@6,21600e'> ");
  1134.             vml.Append(" <v:path textpathok='t' o:connecttype='custom' o:connectlocs='@9,0;@10,10800;@11,21600;@12,10800' o:connectangles='270,180,90,0'/>");
  1135.             vml.Append(" <v:textpath on='T' fitshape='T'/>");
  1136.             vml.Append(" <o:lock v:ext='edit' text='t' shapetype='T'/>");
  1137.             vml.Append("</v:shapetype>");
  1138.             vml.Append("");
  1139.             vml.Append("<v:rect id='background' style='position:absolute;left:");
  1140.             vml.Append(Chart.CHART_left);
  1141.             vml.Append("px;top:");
  1142.             vml.Append(Chart.CHART_top);
  1143.             vml.Append("px;WIDTH:");
  1144.             vml.Append(Chart.ALL_width);
  1145.             vml.Append("px;HEIGHT:");
  1146.             vml.Append(Chart.All_height);
  1147.             vml.Append("px;' fillcolor='#EFEFEF' strokecolor='");
  1148.             vml.Append(Chart.SPLIT_color);
  1149.             vml.Append("'>");
  1150.             vml.Append(" <v:shadow on='T' type='single' color='silver' offset='4pt,4pt'/>");
  1151.             vml.Append("</v:rect>");
  1152.             vml.Append("<v:group ID='table' style='position:absolute;left:");
  1153.             vml.Append(Chart.CHART_left);
  1154.             vml.Append("px;top:");
  1155.             vml.Append(Chart.CHART_top);
  1156.             vml.Append("px;WIDTH:");
  1157.             vml.Append(Chart.ALL_width);
  1158.             vml.Append("px;HEIGHT:");
  1159.             vml.Append(Chart.All_height);
  1160.             vml.Append("px;' coordsize = '21000,11500'>");
  1161.             vml.Append("<v:rect style='position:relative;left:500px;top:200px;width:20000px;height:800px;' filled='F' stroked='F'>");
  1162.             vml.Append("<v:TextBox inset='0pt,1pt,0pt,0pt'style='font-size:10pt;color: #000000;font-weight:bold;text-align:center;'>");
  1163.             vml.Append(Chart.CHART_title);
  1164.             vml.Append("</v:TextBox>");
  1165.             vml.Append("</v:rect> ");
  1166.             vml.Append("<v:rect id='back' style='position:relative;left:500px;top:1000px;width:20000px; height:10000px;' onmouseover='movereset(1)' onmouseout='movereset(0)' fillcolor='");
  1167.             vml.Append(Chart.CHART_backcolor);
  1168.             vml.Append("' strokecolor='");
  1169.             vml.Append(Chart.SPLIT_color);
  1170.             vml.Append("'>");
  1171.             vml.Append("<v:fill rotate='T' angle='-45' focus='100%' type='gradient'/>");
  1172.             vml.Append("</v:rect>");
  1173.             vml.Append(" <v:rect id='back' style='position:relative;left:15000px;top:1400px;width:5000px; height:");
  1174.             vml.Append(((Chart.Chart_no + 1) * 9000 / 15.0 + 1000.0));
  1175.             vml.Append("px;' fillcolor='");
  1176.             vml.Append(Chart.CHART_backcolor);
  1177.             vml.Append("' stroked='T' strokecolor='");
  1178.             vml.Append(Chart.SPLIT_color);
  1179.             vml.Append("'>");
  1180.             vml.Append(" <v:fill rotate='T' angle='-175' focus='100%' type='gradient'/>");
  1181.             vml.Append(" <v:shadow on='T' type='single' color='silver' offset='3pt,3pt'/>");
  1182.             vml.Append(" </v:rect>");
  1183.             vml.Append(" <v:rect style='position:relative;left:15500px;top:1500px;width:4000px;height:700px;' fillcolor='#9cf' strokecolor='#69f'>");
  1184.             vml.Append(" <v:textBox inset='5pt,1pt,3pt,0pt' style='font-size:9pt;color: red;font-weight:bold;text-align:center;'>");
  1185.             vml.Append(string.Format("总数({0})", Chart.ALLvalues + Chart.UNIT));
  1186.             vml.Append("</v:textBox></v:rect> ");
  1187.             for (int k = 1; k <= Chart.Chart_no; k++)
  1188.             {
  1189.                 Chart.SetColor = Convert.ToString(Chart.TOTAL[k, 2]).Trim();
  1190.                 double m = k * 600.0 + 2000.0;
  1191.                 if (ValidateUtil.isBlank(Chart.SetColor))
  1192.                 {
  1193.                     Chart.SetColor = Chart.BG_color[k % Chart.COLOR_count];
  1194.                 }
  1195.                 vml.Append(" <v:Rect id='rec");
  1196.                 vml.Append(k);
  1197.                 vml.Append("' style='position:relative;left:15400px;top:");
  1198.                 vml.Append(m);
  1199.                 vml.Append("px;width:4300px;height:450px;display:none' fillcolor='#efefef' strokecolor='");
  1200.                 vml.Append(Chart.SetColor);
  1201.                 vml.Append("'>");
  1202.                 vml.Append(" <v:fill opacity='.6' color2='fill darken(118)' o:opacity2='.6' rotate='T' method='linear sigma' focus='100%' type='gradient'/>");
  1203.                 vml.Append(" </v:Rect>");
  1204.                 vml.Append(" <v:Rect style='position:relative;left:15500px;top:");
  1205.                 vml.Append(m + 30.0);
  1206.                 vml.Append("px;width:600px;height:400px' fillcolor='");
  1207.                 vml.Append(Chart.SetColor);
  1208.                 vml.Append("' stroked='F'/>");
  1209.                 vml.Append(" <v:Rect style='position:relative;left:16300px;top:");
  1210.                 vml.Append(m);
  1211.                 vml.Append("px;width:3400px;height:600px' filled='F' stroked='F' onmouseover='moveup(cake");
  1212.                 vml.Append(k);
  1213.                 vml.Append(",");
  1214.                 vml.Append(Chart.InTop);
  1215.                 vml.Append(",txt");
  1216.                 vml.Append(k);
  1217.                 vml.Append(",rec");
  1218.                 vml.Append(k);
  1219.                 vml.Append(")'; onmouseout='movedown(cake");
  1220.                 vml.Append(k);
  1221.                 vml.Append(",");
  1222.                 vml.Append(Chart.InTop);
  1223.                 vml.Append(",txt");
  1224.                 vml.Append(k);
  1225.                 vml.Append(",rec");
  1226.                 vml.Append(k);
  1227.                 vml.Append(");'>");
  1228.                 Chart.LineName = Strings.Split(Convert.ToString(Chart.TOTAL[k, 0]), ",", -1, CompareMethod.Binary)[0] + ":" + Chart.TOTAL[k, 1] + Chart.UNIT;
  1229.                 Chart.HrefName = Strings.Split(Convert.ToString(Chart.TOTAL[k, 0]), ",", -1, CompareMethod.Binary)[1];
  1230.                 if (k == Chart.Standard)
  1231.                 {
  1232.                     Chart.LineName = "<a title='以此项目为标准比100%' href='" + Chart.HrefName + "'><font color=red>" + Chart.LineName + "</font></a>";
  1233.                 }
  1234.                 else
  1235.                 {
  1236.                     Chart.LineName = "<a title='点击可查看详细列表' href='" + Chart.HrefName + "'>" + Chart.LineName + "</a>";
  1237.                 }
  1238.                 vml.Append("<v:textbox inset='0pt,");
  1239.                 vml.Append(Chart.All_height / 330);
  1240.                 vml.Append("px,0pt,0pt'>");
  1241.                 vml.Append(Chart.LineName);
  1242.                 vml.Append("</v:textbox></v:Rect>");
  1243.                 Chart.SetColor = "";
  1244.             }
  1245.             vml.Append("</v:group>");
  1246.             double k1 = 180.0;
  1247.             int k4 = 10;
  1248.             for (int l = 1; l <= Chart.Chart_no; l++)
  1249.             {
  1250.                 Chart.SetColor = Convert.ToString(Chart.TOTAL[l, 2]).Trim();
  1251.                 if (ValidateUtil.isBlank(Chart.SetColor))
  1252.                 {
  1253.                     Chart.SetColor = Chart.BG_color[l % Chart.COLOR_count];
  1254.                 }
  1255.                 double k2 = 360.0 * Convert.ToDouble(pie[l]) / 2.0;
  1256.                 double k3 = k1 + k2;
  1257.                 if (k3 >= 360.0)
  1258.                 {
  1259.                     k3 = k3 - 360.0;
  1260.                 }
  1261.                 double kkk = (-11796480.0 * Convert.ToDouble(pie[l]) + 5898240.0);
  1262.                 double k5 = 3.1415926 * 2.0 * (180.0 - (k3 - 180.0)) / 360.0;
  1263.                 double R = Chart.All_height / 2.0;
  1264.                 double txt_x = Chart.CHART_left + Chart.All_height / 8.0 - 30.0 + R + R * Math.Sin(k5) * 0.7;
  1265.                 double txt_y = Chart.InTop - 39.0 + R + R * Math.Cos(k5) * 0.7 * 0.5;
  1266.                 string titlestr = " 项目:" + Strings.Split(Convert.ToString(Chart.TOTAL[l, 0]), ",", -1, CompareMethod.Binary)[0] + " <br> 数值:" + Chart.TOTAL[l, 1] + Chart.UNIT + " <br> 比例:" + Convert.ToDouble(pie[l]) * 100.0 + "%  <br>点击可查看详细列表";
  1267.                 vml.Append("<a href='");
  1268.                 vml.Append(Strings.Split(Convert.ToString(Chart.TOTAL[l, 0]), ",", -1, CompareMethod.Binary)[1]);
  1269.                 vml.Append("'><v:shape id='cake");
  1270.                 vml.Append(l);
  1271.                 vml.Append("' type='#Cake_3D' title='");
  1272.                 vml.Append(titlestr);
  1273.                 vml.Append("'");
  1274.                 vml.Append(" style='position:absolute;left:");
  1275.                 vml.Append(Chart.CHART_left + Chart.All_height / 8.0);
  1276.                 vml.Append("px;top:");
  1277.                 vml.Append(Chart.InTop);
  1278.                 vml.Append("px;WIDTH:");
  1279.                 vml.Append(Chart.All_height);
  1280.                 vml.Append("px;HEIGHT:");
  1281.                 vml.Append(Chart.All_height);
  1282.                 vml.Append("px;rotation:");
  1283.                 vml.Append(k3);
  1284.                 vml.Append(";z-index:");
  1285.                 vml.Append(k4);
  1286.                 vml.Append("'");
  1287.                 vml.Append(" adj='");
  1288.                 vml.Append(kkk);
  1289.                 vml.Append(",0' fillcolor='");
  1290.                 vml.Append(Chart.SetColor);
  1291.                 vml.Append("' onmouseover='moveup(cake");
  1292.                 vml.Append(l);
  1293.                 vml.Append(",");
  1294.                 vml.Append(Chart.InTop);
  1295.                 vml.Append(",txt");
  1296.                 vml.Append(l);
  1297.                 vml.Append(",rec");
  1298.                 vml.Append(l);
  1299.                 vml.Append(")'; onmouseout='movedown(cake");
  1300.                 vml.Append(l);
  1301.                 vml.Append(",");
  1302.                 vml.Append(Chart.InTop);
  1303.                 vml.Append(",txt");
  1304.                 vml.Append(l);
  1305.                 vml.Append(",rec");
  1306.                 vml.Append(l);
  1307.                 vml.Append(");'></a>");
  1308.                 vml.Append(" <v:fill opacity='60293f' color2='fill lighten(120)' o:opacity2='60293f' rotate='t' angle='-135' method='linear sigma' focus='100%' type='gradient'/>");
  1309.                 vml.Append(" <o:extrusion v:ext='view' on='t'backdepth='");
  1310.                 vml.Append(Chart.HEIGHT_split);
  1311.                 vml.Append("' rotationangle='");
  1312.                 vml.Append(Chart.THICKNESS);
  1313.                 vml.Append("' viewpoint='0,0'viewpointorigin='0,0' skewamt='");
  1314.                 vml.Append(Chart.CHART_width);
  1315.                 vml.Append("' lightposition='-50000,-50000' lightposition2='50000'/>");
  1316.                 vml.Append(" </v:shape>");
  1317.                 vml.Append(" <v:shape id='txt");
  1318.                 vml.Append(l);
  1319.                 vml.Append("' type='#3dtxt' style='position:absolute;left:");
  1320.                 vml.Append(txt_x);
  1321.                 vml.Append("px;top:");
  1322.                 vml.Append(txt_y);
  1323.                 vml.Append("px;z-index:20;display:none;width:50px; height:18px;' fillcolor='#ffffff' onmouseover='ontxt(cake");
  1324.                 vml.Append(l);
  1325.                 vml.Append(",");
  1326.                 vml.Append(Chart.InTop);
  1327.                 vml.Append(",txt");
  1328.                 vml.Append(l);
  1329.                 vml.Append(",rec");
  1330.                 vml.Append(l);
  1331.                 vml.Append(")'>");
  1332.                 vml.Append(" <v:fill opacity='60293f' color2='fill lighten(10)' o:opacity2='60293f' rotate='t' angle='-135' method='linear sigma' focus='100%' type='gradient'/>");
  1333.                 vml.Append(" <v:textpath style='font-family:'黑体';v-text-kern:t' trim='t' fitpath='t' string='");
  1334.                 vml.Append(Convert.ToDouble(pie[l]) * 100.0);
  1335.                 vml.Append("%'/>");
  1336.                 vml.Append(" <o:extrusion v:ext='view' backdepth='8pt' on='t' lightposition='0,0' lightposition2='0,0'/>");
  1337.                 vml.Append(" </v:shape>");
  1338.                 vml.Append("<script type='text/javascript'>document.getElementById('CountImage2').width=");
  1339.                 vml.Append(66 + (33 * l));
  1340.                 vml.Append(";document.getElementById('CountTXT').innerHTML='处理进度:<font color=red><b>");
  1341.                 vml.Append(50 + (50 / Chart.Chart_no * l));
  1342.                 vml.Append("</b></font>';document.getElementById('CountImage').title = '正在处理数据...';</script>");
  1343.                 k1 = k1 + k2 * 2.0;
  1344.                 if (k1 >= 360.0)
  1345.                 {
  1346.                     k1 = k1 - 360.0;
  1347.                 }
  1348.                 if (k1 > 180.0)
  1349.                 {
  1350.                     k4 = k4 + 1;
  1351.                 }
  1352.                 else
  1353.                 {
  1354.                     k4 = k4 - 1;
  1355.                 }
  1356.             }
  1357.             Chart.HEIGHT_split = Chart.HEIGHT_split + 3;
  1358.             //调节饼块上移高度匹配 默认28
  1359.             //饼块上下移动JS
  1360.             vml.Append(Constants.vbCrLf);
  1361.             vml.Append("<script type='text/javascript'>" + Constants.vbCrLf);
  1362.             vml.Append("<!--" + Constants.vbCrLf);
  1363.             vml.Append("onit=true" + Constants.vbCrLf);
  1364.             vml.Append("num=0" + Constants.vbCrLf);
  1365.             vml.Append("function moveup(iteam,top,txt,rec){" + Constants.vbCrLf);
  1366.             vml.Append("temp=eval(iteam)" + Constants.vbCrLf);
  1367.             vml.Append("tempat=eval(top)" + Constants.vbCrLf);
  1368.             vml.Append("temptxt=eval(txt)" + Constants.vbCrLf);
  1369.             vml.Append("temprec=eval(rec)" + Constants.vbCrLf);
  1370.             vml.Append("at=parseInt(temp.style.top)" + Constants.vbCrLf);
  1371.             vml.Append("temprec.style.display = "";"+ Constants.vbCrLf);
  1372.             vml.Append("if (num>");
  1373.             vml.Append(Chart.HEIGHT_split - 1);
  1374.             vml.Append("){" + Constants.vbCrLf);
  1375.             vml.Append("temptxt.style.display = "";" + Constants.vbCrLf);
  1376.             vml.Append("}" + Constants.vbCrLf);
  1377.             vml.Append("if(at>(tempat-");
  1378.             vml.Append(Chart.HEIGHT_split);
  1379.             vml.Append(")&&onit){" + Constants.vbCrLf);
  1380.             vml.Append("num++" + Constants.vbCrLf);
  1381.             vml.Append("temp.style.top=at-1" + Constants.vbCrLf);
  1382.             vml.Append("Stop=setTimeout("moveup(temp,tempat,temptxt,temprec)",5);" + Constants.vbCrLf);
  1383.             vml.Append("}else{" + Constants.vbCrLf);
  1384.             vml.Append("return" + Constants.vbCrLf);
  1385.             vml.Append("}" + Constants.vbCrLf);
  1386.             vml.Append("}" + Constants.vbCrLf);
  1387.             vml.Append("function movedown(iteam,top,txt,rec){" + Constants.vbCrLf);
  1388.             vml.Append("temp=eval(iteam)" + Constants.vbCrLf);
  1389.             vml.Append("temptxt=eval(txt)" + Constants.vbCrLf);
  1390.             vml.Append("temprec=eval(rec)" + Constants.vbCrLf);
  1391.             vml.Append("clearTimeout(Stop)" + Constants.vbCrLf);
  1392.             vml.Append("temp.style.top=top" + Constants.vbCrLf);
  1393.             vml.Append("num=0;" + Constants.vbCrLf);
  1394.             vml.Append("temptxt.style.display = "none";" + Constants.vbCrLf);
  1395.             vml.Append("temprec.style.display = "none";" + Constants.vbCrLf);
  1396.             vml.Append("}" + Constants.vbCrLf);
  1397.             vml.Append("function ontxt(iteam,top,txt,rec){" + Constants.vbCrLf);
  1398.             vml.Append("temp = eval(iteam)" + Constants.vbCrLf);
  1399.             vml.Append("temptxt = eval(txt)" + Constants.vbCrLf);
  1400.             vml.Append("temprec = eval(rec)" + Constants.vbCrLf);
  1401.             vml.Append("if (onit){" + Constants.vbCrLf);
  1402.             vml.Append("temp.style.top = top-");
  1403.             vml.Append(Chart.HEIGHT_split);
  1404.             vml.Append(";" + Constants.vbCrLf);
  1405.             vml.Append("temptxt.style.display = "";" + Constants.vbCrLf);
  1406.             vml.Append("temprec.style.display = "";" + Constants.vbCrLf);
  1407.             vml.Append("}" + Constants.vbCrLf);
  1408.             vml.Append("}" + Constants.vbCrLf);
  1409.             vml.Append("function movereset(over){" + Constants.vbCrLf);
  1410.             vml.Append("if (over==1){" + Constants.vbCrLf);
  1411.             vml.Append("onit=false" + Constants.vbCrLf);
  1412.             vml.Append("}else{" + Constants.vbCrLf);
  1413.             vml.Append("onit=true" + Constants.vbCrLf);
  1414.             vml.Append("}" + Constants.vbCrLf);
  1415.             vml.Append("}" + Constants.vbCrLf);
  1416.             vml.Append("-->" + Constants.vbCrLf);
  1417.             vml.Append("</script>" + Constants.vbCrLf);
  1418.         }
  1419.     }