ChartBLL.cs
资源名称:vmlTest.rar [点击查看]
上传用户:yinyuehua
上传日期:2022-08-10
资源大小:17k
文件大小:78k
源码类别:
matlab例程
开发平台:
C#
- using System;
- using System.Collections.Generic;
- using System.Text;
- using Microsoft.VisualBasic;
- public class ChartBLL
- {
- public StringBuilder vml = new StringBuilder();
- public StringBuilder csiVMLChart(ChartModule Chart)
- {
- Chart.BG_color = Strings.Split(Chart.sys_color_list, ",", -1, CompareMethod.Binary);
- Chart.COLOR_count = Information.UBound(Chart.BG_color, 1) + 1;
- Chart.CHART_type = Chart.CHART_type.ToUpper();
- if (ValidateUtil.isBlank(Chart.CHART_title))
- {
- Chart.CHART_title = Chart.sys_chart_title;
- }
- if (Chart.CHART_left == 0)
- {
- Chart.CHART_left = Chart.sys_chart_left;
- }
- if (Chart.CHART_top == 0)
- {
- Chart.CHART_top = Chart.sys_chart_top;
- }
- if (Chart.ALL_width == 0)
- {
- Chart.ALL_width = Chart.sys_all_width;
- }
- if (Chart.All_height == 0)
- {
- Chart.All_height = Chart.sys_all_height;
- }
- if (Chart.HEIGHT_split == 0)
- {
- Chart.HEIGHT_split = Chart.sys_height_split;
- }
- if (Chart.THICKNESS == 0)
- {
- if (Chart.CHART_type == "Z")
- {
- Chart.THICKNESS = 60;
- }
- else
- {
- Chart.THICKNESS = Chart.sys_thickness;
- }
- }
- if (Chart.CHART_width == 0)
- {
- if (Chart.CHART_type == "Z")
- {
- Chart.CHART_width = 0;
- }
- else
- {
- Chart.CHART_width = Chart.sys_chart_width;
- }
- }
- if (ValidateUtil.isBlank(Chart.SPLIT_color))
- {
- Chart.SPLIT_color = Chart.sys_split_color;
- }
- if (ValidateUtil.isBlank(Chart.CHART_backcolor))
- {
- Chart.CHART_backcolor = Chart.sys_chart_backcolor;
- }
- if (ValidateUtil.isBlank(Chart.CHART_type))
- {
- Chart.CHART_type = Chart.sys_chart_type;
- }
- switch (Chart.CHART_type)
- {
- case"X":
- csiVMLColumnChart(Chart);
- break;
- case"Y":
- csiVMLColumnChart(Chart);
- break;
- case"L":
- csiVMLLineChart(Chart);
- break;
- case"Z":
- csiVMLCakeChart(Chart);
- break;
- default:
- break;
- }
- return vml;
- }
- private void csiVMLColumnChart(ChartModule Chart)
- {
- Chart.LENGTH = Chart.THICKNESS / 2.0;
- Chart.TOTAL_no1 = Information.UBound(Chart.TOTAL, 1);
- Chart.TOTAL_no2 = Information.UBound(Chart.TOTAL, 2);
- Chart.DUOWEI = true;
- for (int i = 1; i <= Chart.TOTAL_no1; i++)
- {
- if (!(Information.IsNumeric(Chart.TOTAL[i, 2])) || ValidateUtil.isBlank(Convert.ToString(Chart.TOTAL[i, 2])))
- {
- Chart.DUOWEI = false;
- Chart.TOTAL_no2 = 1;
- break;
- }
- }
- Chart.ADDAllWidth = (Chart.TOTAL_no2 - 1) * Chart.CHART_width;
- string[,] pie = null;
- pie = new string[Chart.TOTAL_no1 + 1, Chart.TOTAL_no2 + 1];
- Chart.ALLvalues = 0.0;
- Chart.Standard = Convert.ToInt32(Strings.Split(Convert.ToString(Chart.TOTAL[0, 0]), ",", -1, CompareMethod.Binary)[0]);
- if (Chart.Standard == 0)
- {
- for (int i = 1; i <= Chart.TOTAL_no2; i++)
- {
- for (int j = 1; j <= Chart.TOTAL_no1; j++)
- {
- Chart.ALLvalues = Chart.ALLvalues + Convert.ToDouble(Chart.TOTAL[j, i]);
- }
- for (int k = 1; k <= Chart.TOTAL_no1; k++)
- {
- pie[k, i] = Strings.FormatNumber(Convert.ToDouble(Chart.TOTAL[k, i]) / Chart.ALLvalues, 4, TriState.True, TriState.UseDefault, TriState.UseDefault);
- }
- }
- }
- else
- {
- for (int i = 1; i <= Chart.TOTAL_no2; i++)
- {
- for (int j = 1; j <= Chart.TOTAL_no1; j++)
- {
- Chart.ALLvalues = Chart.ALLvalues + Convert.ToDouble(Chart.TOTAL[j, i]);
- }
- for (int k = 1; k <= Chart.TOTAL_no1; k++)
- {
- 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);
- }
- }
- }
- Chart.TEMP1 = 0;
- for (int i = 1; i <= Chart.TOTAL_no2; i++)
- {
- for (int j = 1; j <= Chart.TOTAL_no1; j++)
- {
- if (Convert.ToDouble(Chart.TEMP1) < Convert.ToDouble(Chart.TOTAL[j, i]))
- {
- Chart.TEMP1 = Chart.TOTAL[j, i];
- }
- }
- }
- Chart.TEMP1 = Conversion.Int(Chart.TEMP1);
- if (Convert.ToInt32(Chart.TEMP1) > 9)
- {
- Chart.TEMP2 = Convert.ToString(Chart.TEMP1).Substring(1, 1);
- if (String.Compare(Chart.TEMP2, "4") > 0)
- {
- 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));
- }
- else
- {
- 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));
- }
- }
- else
- {
- if (Convert.ToInt32(Chart.TEMP1) > 4)
- {
- Chart.TEMP3 = 10.0;
- }
- else
- {
- Chart.TEMP3 = 5.0;
- }
- }
- Chart.TEMP4 = Chart.TEMP3;
- Chart.LEFT_width = Convert.ToString(Chart.TEMP4).Length * 10;
- Chart.LEFT_x = Chart.CHART_left + Chart.LEFT_width;
- Chart.TTAH = Chart.CHART_top + Chart.All_height;
- Chart.TLAW = Chart.CHART_left + Chart.ALL_width + Chart.ADDAllWidth;
- vml.Append("<!--[if gte vml 1]><v:rect id='msi_1027' style='position:absolute;left:");
- vml.Append(Chart.LEFT_x);
- vml.Append("px;top:");
- vml.Append(Chart.CHART_top);
- vml.Append("px;width:");
- vml.Append(Chart.ALL_width + Chart.ADDAllWidth);
- vml.Append("px;height:");
- vml.Append(Chart.All_height);
- vml.Append("px;z-index:-1' fillcolor='");
- vml.Append(Chart.CHART_backcolor);
- vml.Append("' stroked='f'><v:fill rotate='t' angle='-45' focus='100%' type='gradient'/></v:rect><![endif]-->");
- vml.Append("<!--[if gte vml 1]><v:line id='msi_1027' ");
- vml.Append(Chart.VMLStyle);
- vml.Append(" from='");
- vml.Append(Chart.LEFT_x);
- vml.Append("px,");
- vml.Append(Chart.TTAH);
- vml.Append("px' to='");
- vml.Append(Chart.TLAW + Chart.LEFT_width);
- vml.Append("px,");
- vml.Append(Chart.TTAH);
- vml.Append("px'><v:stroke opacity='1' startarrow='none' endarrow='classic'/></v:line>");
- vml.Append("<v:shape id='msi_1025' style='position:absolute;left:");
- vml.Append(Chart.TLAW + Chart.LEFT_width - 5);
- vml.Append("px;top:");
- vml.Append(Chart.TTAH - 10);
- vml.Append("px;width:");
- vml.Append(Chart.ALL_width);
- vml.Append("px;height:28px;z-index:1'>");
- vml.Append("<v:textbox inset='0px,0px,0px,0px'><table cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td align='left'>");
- vml.Append(string.Format("<b>{0}</b>", Chart.XTitle));
- vml.Append("</td></tr></table></v:textbox></v:shape><![endif]-->");
- vml.Append("<!--[if gte vml 1]><v:line id='msi_1027' ");
- vml.Append(Chart.VMLStyle);
- vml.Append(" from='");
- vml.Append(Chart.LEFT_x);
- vml.Append("px,");
- vml.Append(Chart.CHART_top);
- vml.Append("px' to='");
- vml.Append(Chart.LEFT_x);
- vml.Append("px,");
- vml.Append(Chart.TTAH);
- vml.Append("px'><v:stroke opacity='1' startarrow='none' endarrow='classic'/></v:line>");
- vml.Append("<v:shape id='msi_1025' style='position:absolute;left:");
- vml.Append(Chart.LEFT_x - 20);
- vml.Append("px;top:");
- vml.Append(Chart.CHART_top - 20);
- vml.Append("px;width:");
- vml.Append(Chart.ALL_width);
- vml.Append("px;height:28px;z-index:1'>");
- vml.Append("<v:textbox inset='0px,0px,0px,0px'><table cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td align='left'>");
- vml.Append(string.Format("<b>{0}</b><font color='red'>总数({1})</font>", Chart.YTitle, Chart.ALLvalues + Chart.UNIT));
- vml.Append("</td></tr></table></v:textbox></v:shape><![endif]-->");
- if (Chart.CHART_type == "Y")
- {
- Chart.CHART_space = (Chart.ALL_width - Chart.CHART_width * Chart.TOTAL_no1) / Chart.TOTAL_no1;
- vml.Append("<!--[if gte vml 1]><v:line id='msi_1027' ");
- vml.Append(Chart.VMLStyle);
- vml.Append(" from='");
- vml.Append(Chart.LEFT_x + Chart.LENGTH);
- vml.Append("px,");
- vml.Append(Chart.CHART_top);
- vml.Append("px' to='");
- vml.Append(Chart.LEFT_x + Chart.LENGTH);
- vml.Append("px,");
- vml.Append(Chart.TTAH - Chart.LENGTH);
- vml.Append("px' strokecolor='");
- vml.Append(Chart.SPLIT_color);
- vml.Append("'/><![endif]-->");
- 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)
- {
- vml.Append("<!--[if gte vml 1]><v:line id='msi_1027' ");
- vml.Append(Chart.VMLStyle);
- vml.Append(" from='");
- vml.Append(Chart.LEFT_x);
- vml.Append("px,");
- vml.Append(Chart.TTAH - Chart.LENGTH - i);
- vml.Append("px' to='");
- vml.Append(Chart.LEFT_x + Chart.LENGTH);
- vml.Append("px,");
- vml.Append(Chart.TTAH - i);
- vml.Append("px' strokecolor='");
- vml.Append(Chart.SPLIT_color);
- vml.Append("'/><![endif]-->");
- vml.Append("<!--[if gte vml 1]><v:line id='msi_1027' ");
- vml.Append(Chart.VMLStyle);
- vml.Append(" from='");
- vml.Append(Chart.LEFT_x + Chart.LENGTH);
- vml.Append("px,");
- vml.Append(Chart.TTAH - Chart.LENGTH - i);
- vml.Append("px' to='");
- vml.Append(Chart.TLAW + Chart.LEFT_width);
- vml.Append("px,");
- vml.Append(Chart.TTAH - Chart.LENGTH - i);
- vml.Append("px' strokecolor='");
- vml.Append(Chart.SPLIT_color);
- vml.Append("'/><![endif]-->");
- vml.Append("<!--[if gte vml 1]><v:line id='msi_1027' ");
- vml.Append(Chart.VMLStyle);
- vml.Append(" from='");
- vml.Append(Chart.CHART_left + (Chart.LEFT_width - 15));
- vml.Append("px,");
- vml.Append(Chart.CHART_top + i);
- vml.Append("px' to='");
- vml.Append(Chart.LEFT_x);
- vml.Append("px,");
- vml.Append(Chart.CHART_top + i);
- vml.Append("px'/><![endif]-->");
- vml.Append("<!--[if gte vml 1]>");
- vml.Append("<v:shape id='msi_1025' type='#_x0000_t202' style='position:absolute;left:");
- vml.Append(Chart.CHART_left);
- vml.Append("px;top:");
- vml.Append(Chart.CHART_top + i);
- vml.Append("px;width:");
- vml.Append(Chart.LEFT_width);
- vml.Append("px;height:18px;z-index:1'>");
- vml.Append("<v:textbox inset='0px,0px,0px,0px'><table cellspacing='0' cellpadding='0' width='100%' height='100%'><tr><td align='right'>");
- vml.Append(Chart.TEMP4);
- vml.Append("</td></tr></table></v:textbox></v:shape><![endif]-->");
- Chart.TEMP4 = Chart.TEMP4 - Chart.TEMP3 / Chart.HEIGHT_split;
- }
- for (int i = 1; i <= Chart.TOTAL_no1; i++)
- {
- for (int j = 1; j <= Chart.TOTAL_no2; j++)
- {
- Chart.SetColor = Convert.ToString(Chart.TOTAL[i, 2]).Trim();
- if (Information.IsNumeric(Chart.SetColor))
- {
- Chart.SetColor = Strings.Split(Convert.ToString(Chart.TOTAL[0, j]), ",", -1, CompareMethod.Binary)[4];
- }
- if (ValidateUtil.isBlank(Chart.SetColor) && Chart.DUOWEI)
- {
- Chart.SetColor = Chart.BG_color[j % Chart.COLOR_count];
- }
- if (ValidateUtil.isBlank(Chart.SetColor) && !Chart.DUOWEI)
- {
- Chart.SetColor = Chart.BG_color[i % Chart.COLOR_count];
- }
- Chart.TEMP_space = Chart.LEFT_x + Chart.CHART_space / 2.0 + Chart.CHART_space * (i - 1) + Chart.CHART_width * (i - 1);
- vml.Append("<a href='");
- vml.Append(Strings.Split(Convert.ToString(Chart.TOTAL[i, 0]), ",", -1, CompareMethod.Binary)[1]);
- vml.Append("'><v:rect id='msi_1025' title='项目:");
- vml.Append(Strings.Split(Convert.ToString(Chart.TOTAL[i, 0]), ",", -1, CompareMethod.Binary)[0]);
- vml.Append(" <br>数值:");
- vml.Append(Convert.ToString(Chart.TOTAL[i, j]) + Chart.UNIT);
- vml.Append(" <br>比例:");
- vml.Append(Convert.ToDouble(pie[i, j]) * 100.0);
- vml.Append("% <br>点击可查看详细列表' style='position:absolute;left:");
- vml.Append(Chart.TEMP_space + (j - 1) * Chart.CHART_width);
- vml.Append("px;top:");
- vml.Append(Chart.CHART_top + Chart.All_height * (1.0 - (Convert.ToDouble(Chart.TOTAL[i, j]) / Chart.TEMP3)));
- vml.Append("px;width:");
- vml.Append(Chart.CHART_width);
- vml.Append("px;height:");
- vml.Append(Chart.All_height * (Convert.ToDouble(Chart.TOTAL[i, j]) / Chart.TEMP3));
- vml.Append("px;z-index:1' fillcolor='");
- vml.Append(Chart.SetColor);
- vml.Append("' onmouseover='this.fillcolor="#FFFFFF"' onmouseout='this.fillcolor="");
- vml.Append(Chart.SetColor);
- vml.Append(""'>");
- vml.Append("<v:fill color2='");
- vml.Append(Chart.SetColor);
- vml.Append("' rotate='t' type='gradient'/>");
- vml.Append("<o:extrusion v:ext='view' backdepth='");
- vml.Append(Chart.THICKNESS);
- vml.Append("pt' color='");
- vml.Append(Chart.SetColor);
- vml.Append("' on='t'/></v:rect></a>");
- if (!Chart.DUOWEI)
- {
- vml.Append("<v:shape id='msi_1025' type='#_x0000_t202' style='position:absolute;left:");
- vml.Append(Chart.TEMP_space - 10.0);
- vml.Append("px;top:");
- vml.Append(Chart.CHART_top + Chart.All_height * (1.0 - (Convert.ToDouble(Chart.TOTAL[i, j]) / Chart.TEMP3)) - Chart.CHART_width);
- vml.Append("px;width:");
- vml.Append(Chart.CHART_space + 25.0);
- vml.Append("px;height:18px;z-index:1'>");
- vml.Append("<v:textbox inset='0px,0px,0px,0px'><table cellspacing='0' cellpadding='0' width='100%' height='100%'><tr><td align='center'><a href='");
- vml.Append(Strings.Split(Convert.ToString(Chart.TOTAL[i, 0]), ",", -1, CompareMethod.Binary)[1]);
- vml.Append("'><font color=red>");
- vml.Append(Convert.ToString(Chart.TOTAL[i, j]) + Chart.UNIT);
- vml.Append("</font></a></td></tr></table></v:textbox></v:shape>");
- }
- }
- vml.Append("<v:shape id='msi_1025' type='#_x0000_t202' style='position:absolute;left:");
- vml.Append(Chart.TEMP_space - Chart.CHART_space / 2.0 + Chart.CHART_width * Chart.TOTAL_no2 / 2.0);
- vml.Append("px;top:");
- vml.Append(Chart.TTAH + 1);
- vml.Append("px;width:");
- vml.Append(Chart.CHART_space + Chart.CHART_width);
- vml.Append("px;height:28px;z-index:1'>");
- Chart.LineName = Strings.Split(Convert.ToString(Chart.TOTAL[i, 0]), ",", -1, CompareMethod.Binary)[0];
- Chart.HrefName = Strings.Split(Convert.ToString(Chart.TOTAL[i, 0]), ",", -1, CompareMethod.Binary)[1];
- if (i == Chart.Standard)
- {
- Chart.LineName = "<a title='以此项目为标准比100%' href='" + Chart.HrefName + "'><font color=red>" + Chart.LineName + "</font></a>";
- }
- else
- {
- Chart.LineName = "<a href='" + Chart.HrefName + "'>" + Chart.LineName + "</a>";
- }
- vml.Append("<v:textbox>");
- vml.Append(Chart.LineName);
- vml.Append("</v:textbox></v:shape>");
- vml.Append("<script type='text/javascript'>document.getElementById('CountImage2').width=");
- vml.Append(66 + (33 * i));
- vml.Append(";document.getElementById('CountTXT').innerHTML='处理进度:<font color=red><b>");
- vml.Append(50 + (50 / Chart.TOTAL_no1 * i));
- vml.Append("</b></font>';document.getElementById('CountImage').title = '正在处理数据...';</script>");
- }
- }
- else if (Chart.CHART_type == "X")
- {
- Chart.CHART_space = (Chart.All_height - Chart.CHART_width * Chart.TOTAL_no1) / Chart.TOTAL_no1;
- vml.Append("<!--[if gte vml 1]><v:line id='msi_1027' ");
- vml.Append(Chart.VMLStyle);
- vml.Append(" from='");
- vml.Append(Chart.LEFT_x + Chart.LENGTH);
- vml.Append("px,");
- vml.Append(Chart.TTAH - Chart.LENGTH);
- vml.Append("px' to='");
- vml.Append(Chart.LEFT_x + Chart.ALL_width);
- vml.Append("px,");
- vml.Append(Chart.TTAH - Chart.LENGTH);
- vml.Append("px' strokecolor='");
- vml.Append(Chart.SPLIT_color);
- vml.Append("'/><![endif]-->");
- 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)
- {
- vml.Append("<!--[if gte vml 1]><v:line id='msi_1027' ");
- vml.Append(Chart.VMLStyle);
- vml.Append(" from='");
- vml.Append(Chart.LEFT_x + i);
- vml.Append("px,");
- vml.Append(Chart.TTAH - Chart.LENGTH);
- vml.Append("px' to='");
- vml.Append(Chart.LEFT_x + Chart.LENGTH + i);
- vml.Append("px,");
- vml.Append(Chart.TTAH);
- vml.Append("px' strokecolor='");
- vml.Append(Chart.SPLIT_color);
- vml.Append("'/><![endif]-->");
- vml.Append("<!--[if gte vml 1]><v:line id='msi_1027' ");
- vml.Append(Chart.VMLStyle);
- vml.Append(" from='");
- vml.Append(Chart.LEFT_x + Chart.LENGTH + i);
- vml.Append("px,");
- vml.Append(Chart.TTAH - Chart.LENGTH);
- vml.Append("px' to='");
- vml.Append(Chart.LEFT_x + Chart.LENGTH + i);
- vml.Append("px,");
- vml.Append(Chart.CHART_top);
- vml.Append("px' strokecolor='");
- vml.Append(Chart.SPLIT_color);
- vml.Append("'/><![endif]-->");
- vml.Append("<!--[if gte vml 1]><v:line id='msi_1027' ");
- vml.Append(Chart.VMLStyle);
- vml.Append(" from='");
- vml.Append(Chart.LEFT_x + i + Chart.ALL_width / Chart.HEIGHT_split);
- vml.Append("px,");
- vml.Append(Chart.TTAH);
- vml.Append("px' to='");
- vml.Append(Chart.LEFT_x + i + Chart.ALL_width / Chart.HEIGHT_split);
- vml.Append("px,");
- vml.Append(Chart.TTAH + 15);
- vml.Append("px'/><![endif]-->");
- vml.Append("<!--[if gte vml 1]>");
- vml.Append("<v:shape id='msi_1025' type='#_x0000_t202' style='position:absolute;left:");
- vml.Append(Chart.CHART_left + i);
- vml.Append("px;top:");
- vml.Append(Chart.TTAH);
- vml.Append("px;width:");
- vml.Append(Chart.LEFT_width);
- vml.Append("px;height:18px;z-index:1'>");
- vml.Append("<v:textbox inset='40px,0px,0px,0px'><table><tr><td align='left'>");
- vml.Append(Chart.TEMP3 - Chart.TEMP4);
- vml.Append("</td></tr></table></v:textbox></v:shape><![endif]-->");
- Chart.TEMP4 = Chart.TEMP4 - Chart.TEMP3 / Chart.HEIGHT_split;
- }
- for (int i = 1; i <= Chart.TOTAL_no1; i++)
- {
- for (int j = 1; j <= Chart.TOTAL_no2; j++)
- {
- Chart.SetColor = Convert.ToString(Chart.TOTAL[i, 2]).Trim();
- if (Information.IsNumeric(Chart.SetColor))
- {
- Chart.SetColor = Strings.Split(Convert.ToString(Chart.TOTAL[0, j]),",",-1,CompareMethod.Binary)[4];
- }
- if (ValidateUtil.isBlank(Chart.SetColor) && Chart.DUOWEI)
- {
- Chart.SetColor = Chart.BG_color[j % Chart.COLOR_count];
- }
- if (ValidateUtil.isBlank(Chart.SetColor) && !Chart.DUOWEI)
- {
- Chart.SetColor = Chart.BG_color[i % Chart.COLOR_count];
- }
- Chart.TEMP_space = Chart.CHART_space / 2.0 + Chart.CHART_space * (i - 1) + Chart.CHART_width * (i - 1) + Chart.CHART_top;
- vml.Append("<a href='");
- vml.Append(Strings.Split(Convert.ToString(Chart.TOTAL[i, 0]), ",", -1, CompareMethod.Binary)[1]);
- vml.Append("'><v:rect id='msi_1025' title='项目:");
- vml.Append(Strings.Split(Convert.ToString(Chart.TOTAL[i, 0]), ",", -1, CompareMethod.Binary)[0]);
- vml.Append(" <br>数值:");
- vml.Append(Convert.ToString(Chart.TOTAL[i, j]) + Chart.UNIT);
- vml.Append(" <br>比例:");
- vml.Append(Convert.ToDouble(pie[i, j]) * 100.0);
- vml.Append("% <br>点击可查看详细列表' style='position:absolute;left:");
- vml.Append(Chart.LEFT_x);
- vml.Append("px;top:");
- if (Chart.DUOWEI)
- {
- vml.Append(Chart.TEMP_space + (j - 3) * Chart.CHART_width);
- }
- else
- {
- vml.Append(Chart.TEMP_space);
- }
- vml.Append("px;width:");
- vml.Append(Chart.ALL_width * (Convert.ToDouble(Chart.TOTAL[i, j]) / Chart.TEMP3));
- vml.Append("px;height:");
- vml.Append(Chart.CHART_width);
- vml.Append("px;z-index:");
- vml.Append(10 - j);
- vml.Append("' fillcolor='");
- vml.Append(Chart.SetColor);
- vml.Append("' onmouseover='this.fillcolor="#FFFFFF"' onmouseout='this.fillcolor="");
- vml.Append(Chart.SetColor);
- vml.Append(""'>");
- vml.Append("<v:fill color2='");
- vml.Append(Chart.SetColor);
- vml.Append("' rotate='t' angle='-90' focus='100%' type='gradient'/>");
- vml.Append("<o:extrusion v:ext='view' backdepth='");
- vml.Append(Chart.THICKNESS);
- vml.Append("pt' color='");
- vml.Append(Chart.SetColor);
- vml.Append("' on='t'/></v:rect></a>");
- if (!Chart.DUOWEI)
- {
- vml.Append("<v:shape id='msi_1025' type='#_x0000_t202' style='position:absolute;left:");
- vml.Append(Chart.LEFT_x + Chart.ALL_width * (Convert.ToDouble(Chart.TOTAL[i, j]) / Chart.TEMP3) + Chart.THICKNESS / 2.0 - 10.0);
- vml.Append("px;top:");
- vml.Append(Chart.TEMP_space - 6.0 + (j - 1) * Chart.CHART_width);
- vml.Append("px;width:");
- vml.Append(Chart.CHART_space + 55.0);
- vml.Append("px;height:18px;z-index:1'>");
- vml.Append("<v:textbox inset='0px,0px,0px,0px'><table cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td align='center'><a href='");
- vml.Append(Strings.Split(Convert.ToString(Chart.TOTAL[i, 0]), ",", -1, CompareMethod.Binary)[1]);
- vml.Append("'><font color=red>");
- vml.Append(Convert.ToString(Chart.TOTAL[i, j]) + Chart.UNIT);
- vml.Append("</font></a></td></tr></table></v:textbox></v:shape>");
- }
- }
- vml.Append("<v:shape id='msi_1025' type='#_x0000_t202' style='position:absolute;left:");
- vml.Append(Chart.CHART_left);
- vml.Append("px;top:");
- vml.Append(Chart.TEMP_space);
- vml.Append("px;width:");
- vml.Append(Chart.LEFT_width);
- vml.Append("px;height:18px;z-index:1'>");
- Chart.LineName = Strings.Split(Convert.ToString(Chart.TOTAL[i, 0]), ",", -1, CompareMethod.Binary)[0];
- Chart.HrefName = Strings.Split(Convert.ToString(Chart.TOTAL[i, 0]), ",", -1, CompareMethod.Binary)[1];
- if (i == Chart.Standard)
- {
- Chart.LineName = "<a title='以此项目为标准比100%' href='" + Chart.HrefName + "'><font color=red>" + Chart.LineName + "</font></a>";
- }
- else
- {
- Chart.LineName = "<a href='" + Chart.HrefName + "'>" + Chart.LineName + "</a>";
- }
- vml.Append("<v:textbox inset='-20px,0px,0px,0px'><table cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td align='right'>");
- vml.Append(Chart.LineName);
- vml.Append("</td></tr></table></v:textbox></v:shape>");
- }
- }
- else
- {
- }
- if (Chart.DUOWEI)
- {
- Chart.TB_height = 15;
- vml.Append("<v:rect id='msi_1025' style='position:absolute;left:");
- vml.Append(Chart.TLAW);
- vml.Append("px;top:");
- vml.Append(Chart.CHART_top);
- vml.Append("px;width:100px;height:");
- vml.Append(Chart.TOTAL_no2 * Chart.TB_height + 20);
- vml.Append("px;z-index:1'/>");
- for (int i = 1; i <= Chart.TOTAL_no2; i++)
- {
- Chart.SetColor = Strings.Split(Convert.ToString(Chart.TOTAL[0, i]), ",", -1, CompareMethod.Binary)[4];
- if (ValidateUtil.isBlank(Chart.SetColor))
- {
- Chart.SetColor = Chart.BG_color[i % Chart.COLOR_count];
- }
- vml.Append("<v:shape id='msi_1025' type='#_x0000_t202' style='position:absolute;left:");
- vml.Append(Chart.TLAW + 15);
- vml.Append("px;top:");
- vml.Append(Chart.CHART_top + 10 + (i - 1) * Chart.TB_height);
- vml.Append("px;width:100px;height:");
- vml.Append(Chart.TB_height);
- vml.Append("px;z-index:1'>");
- vml.Append("<v:textbox inset='0px,0px,0px,0px'><table cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td align='left'>");
- vml.Append(Strings.Split(Convert.ToString(Chart.TOTAL[0, i]), ",", -1, CompareMethod.Binary)[0]);
- vml.Append("</td></tr></table></v:textbox></v:shape>");
- vml.Append("<v:rect id='msi_1040' style='position:absolute;left:");
- vml.Append(Chart.TLAW + 60);
- vml.Append("px;top:");
- vml.Append(Chart.CHART_top + 10 + (i - 1) * Chart.TB_height + 4);
- vml.Append("px;width:30px;height:10px;z-index:1' fillcolor='");
- vml.Append(Chart.SetColor);
- vml.Append("'><v:fill color2='");
- vml.Append(Chart.SetColor);
- vml.Append("' rotate='t' focus='100%' type='gradient'/></v:rect>");
- }
- }
- vml.Append("<v:shape id='msi_1025' type='#_x0000_t202' style='position:absolute;left:");
- vml.Append(Chart.LEFT_x);
- vml.Append("px;top:");
- vml.Append(Chart.CHART_top + Chart.TB_height + Chart.All_height + 20);
- vml.Append("px;width:");
- vml.Append(Chart.ALL_width);
- vml.Append("px;height:");
- vml.Append(Chart.TB_height);
- vml.Append("px;z-index:1'><table align='center'><tr><td>");
- vml.Append(Chart.CHART_title);
- vml.Append("</td></tr></v:shape>");
- }
- private void csiVMLLineChart(ChartModule Chart)
- {
- Chart.TOTAL_no1 = Information.UBound(Chart.TOTAL, 1);
- Chart.LINE_no = Information.UBound(Chart.TOTAL, 2);
- string[,] pie = null;
- pie = new string[Chart.TOTAL_no1 + 1, Chart.LINE_no + 1];
- Chart.ALLvalues = 0.0;
- Chart.Standard = Convert.ToInt32(Strings.Split(Convert.ToString(Chart.TOTAL[0, 0]), ",", -1, CompareMethod.Binary)[0]);
- if (Chart.Standard == 0)
- {
- for (int i = 1; i <= Chart.LINE_no; i++)
- {
- for (int j = 1; j <= Chart.TOTAL_no1; j++)
- {
- Chart.ALLvalues = Chart.ALLvalues + Convert.ToDouble(Chart.TOTAL[j, i]);
- }
- for (int k = 1; k <= Chart.TOTAL_no1; k++)
- {
- pie[k, i] = Strings.FormatNumber(Convert.ToDouble(Chart.TOTAL[k, i]) / Chart.ALLvalues, 4, TriState.True, TriState.UseDefault, TriState.UseDefault);
- }
- }
- }
- else
- {
- for (int i = 1; i <= Chart.LINE_no; i++)
- {
- for (int j = 1; j <= Chart.TOTAL_no1; j++)
- {
- Chart.ALLvalues = Chart.ALLvalues + Convert.ToDouble(Chart.TOTAL[j, i]);
- }
- for (int k = 1; k <= Chart.TOTAL_no1; k++)
- {
- 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);
- }
- }
- }
- Chart.TEMP1 = 0;
- for (int i = 1; i <= Chart.TOTAL_no1; i++)
- {
- for (int j = 1; j <= Chart.LINE_no; j++)
- {
- if (Convert.ToDouble(Chart.TEMP1) < Convert.ToDouble(Chart.TOTAL[i, j]))
- {
- Chart.TEMP1 = Chart.TOTAL[i, j];
- }
- }
- }
- Chart.TEMP1 = Conversion.Int(Chart.TEMP1);
- if (Convert.ToUInt32(Chart.TEMP1) > 9)
- {
- Chart.TEMP2 = Convert.ToString(Chart.TEMP1).Substring(1, 1);
- if (string.Compare(Chart.TEMP2, "4") > 0)
- {
- 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));
- }
- else
- {
- 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));
- }
- }
- else
- {
- if (Convert.ToInt32(Chart.TEMP1) > 4)
- {
- Chart.TEMP3 = 10.0;
- }
- else
- {
- Chart.TEMP3 = 5.0;
- }
- }
- Chart.TEMP4 = Chart.TEMP3;
- Chart.LEFT_width = Chart.TEMP4.ToString().Length * 10;
- Chart.LEFT_x = Chart.CHART_left + Chart.LEFT_width;
- Chart.TTAH = Chart.CHART_top + Chart.All_height;
- Chart.TLAW = Chart.CHART_left + Chart.ALL_width;
- vml.Append("<v:rect id='msi_1027' style='position:absolute;left:");
- vml.Append(Chart.LEFT_x);
- vml.Append("px;top:");
- vml.Append(Chart.CHART_top);
- vml.Append("px;width:");
- vml.Append(Chart.ALL_width);
- vml.Append("px;height:");
- vml.Append(Chart.All_height);
- vml.Append("px;z-index:-1' fillcolor='");
- vml.Append(Chart.CHART_backcolor);
- vml.Append("' stroked='f'><v:fill rotate='t' angle='-45' focus='100%' type='gradient'/></v:rect>");
- 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)
- {
- vml.Append("<v:line id='msi_1027' ");
- vml.Append(Chart.VMLStyle);
- vml.Append(" from='");
- vml.Append(Chart.LEFT_x + Chart.LENGTH);
- vml.Append("px,");
- vml.Append(Chart.TTAH - Chart.LENGTH - i);
- vml.Append("px' to='");
- vml.Append(Chart.LEFT_x + Chart.ALL_width);
- vml.Append("px,");
- vml.Append(Chart.TTAH - Chart.LENGTH - i);
- vml.Append("px' strokecolor='");
- vml.Append(Chart.SPLIT_color);
- vml.Append("'/>");
- vml.Append("<v:line id='msi_1027' ");
- vml.Append(Chart.VMLStyle);
- vml.Append(" from='");
- vml.Append(Chart.LEFT_x - 15);
- vml.Append("px,");
- vml.Append(Chart.CHART_top + i);
- vml.Append("px' to='");
- vml.Append(Chart.LEFT_x);
- vml.Append("px,");
- vml.Append(Chart.CHART_top + i);
- vml.Append("px'/>");
- vml.Append("");
- vml.Append("<v:shape id='msi_1025' type='#_x0000_t202' style='position:absolute;left:");
- vml.Append(Chart.CHART_left);
- vml.Append("px;top:");
- vml.Append(Chart.CHART_top + i);
- vml.Append("px;width:");
- vml.Append(Chart.LEFT_width);
- vml.Append("px;height:18px;z-index:1'>");
- vml.Append("<v:textbox inset='0px,0px,0px,0px'><table cellspacing='0' cellpadding='0' width='100%' height='100%'><tr><td align='right'>");
- vml.Append(Chart.TEMP4);
- vml.Append("</td></tr></table></v:textbox></v:shape>");
- Chart.TEMP4 = Chart.TEMP4 - Chart.TEMP3 / Chart.HEIGHT_split;
- }
- vml.Append("<v:line id='msi_1027' ");
- vml.Append(Chart.VMLStyle);
- vml.Append(" from='");
- vml.Append(Chart.LEFT_x);
- vml.Append("px,");
- vml.Append(Chart.TTAH);
- vml.Append("px' to='");
- vml.Append(Chart.LEFT_x + Chart.ALL_width);
- vml.Append("px,");
- vml.Append(Chart.TTAH);
- vml.Append("px'><v:stroke opacity='5' startarrow='none' endarrow='classic'/></v:line>");
- vml.Append("<v:shape id='msi_1025' style='position:absolute;left:");
- vml.Append(Chart.TLAW + Chart.LEFT_width - 5);
- vml.Append("px;top:");
- vml.Append(Chart.TTAH - 10);
- vml.Append("px;width:");
- vml.Append(Chart.ALL_width);
- vml.Append("px;height:28px;z-index:1'>");
- vml.Append("<v:textbox inset='0px,0px,0px,0px'><table cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td align='left'>");
- vml.Append(string.Format("<b>{0}</b>", Chart.XTitle));
- vml.Append("</td></tr></table></v:textbox></v:shape>");
- vml.Append("<v:line id='msi_1027' " + Chart.VMLStyle + " from='");
- vml.Append(Chart.LEFT_x);
- vml.Append("px,");
- vml.Append(Chart.CHART_top);
- vml.Append("px' to='");
- vml.Append(Chart.LEFT_x);
- vml.Append("px,");
- vml.Append(Chart.TTAH);
- vml.Append("px'><v:stroke opacity='5' startarrow='none' endarrow='classic'/></v:line>");
- vml.Append("<v:shape id='msi_1025' style='position:absolute;left:");
- vml.Append(Chart.LEFT_x - 20);
- vml.Append("px;top:");
- vml.Append(Chart.CHART_top - 20);
- vml.Append("px;width:");
- vml.Append(Chart.ALL_width);
- vml.Append("px;height:28px;z-index:1'>");
- vml.Append("<v:textbox inset='0px,0px,0px,0px'><table cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td align='left'>");
- vml.Append(string.Format("<b>{0}</b><font color='red'>总数({1})</font>", Chart.YTitle, Chart.ALLvalues + Chart.UNIT));
- vml.Append("</td></tr></table></v:textbox></v:shape>");
- string[,] line_code = null;
- line_code = new string[Chart.LINE_no + 1, 5 + 1];
- for (int i = 1; i <= Chart.LINE_no; i++)
- {
- if (ValidateUtil.isBlank(Convert.ToString(Chart.TOTAL[0, i])))
- {
- Chart.TOTAL[0, i] = "未定义,,,,";
- }
- Chart.LINE_temp = Strings.Split(Convert.ToString(Chart.TOTAL[0, i]), ",", -1, CompareMethod.Binary);
- line_code[i, 1] = Chart.LINE_temp[1];
- line_code[i, 2] = Chart.LINE_temp[2];
- line_code[i, 3] = Chart.LINE_temp[3];
- line_code[i, 4] = Chart.LINE_temp[4];
- line_code[i, 5] = Chart.LINE_temp[0];
- if (ValidateUtil.isBlank(line_code[i, 1]))
- {
- line_code[i, 1] = Chart.BG_color[i % Chart.COLOR_count];
- }
- if (!(Information.IsNumeric(line_code[i, 2])))
- {
- line_code[i, 2] = "2";
- }
- if (!(Information.IsNumeric(line_code[i, 3])))
- {
- line_code[i, 3] = "1";
- }
- if (!(Information.IsNumeric(line_code[i, 4])))
- {
- line_code[i, 4] = "3";
- }
- }
- for (int j = 1; j <= Chart.LINE_no; j++)
- {
- for (int k = 1; k <= Chart.TOTAL_no1-1; k++)
- {
- Chart.X1 = Convert.ToInt32(Chart.LEFT_x + Chart.ALL_width * (k - 1.0) / Chart.TOTAL_no1);
- Chart.Y1 = Convert.ToInt32(Chart.CHART_top + (Chart.TEMP3 - Convert.ToDouble(Chart.TOTAL[k, j])) * (Chart.All_height / Chart.TEMP3));
- Chart.X2 = Convert.ToInt32(Chart.LEFT_x + Chart.ALL_width * k / Chart.TOTAL_no1);
- Chart.Y2 = Convert.ToInt32(Chart.CHART_top + (Chart.TEMP3 - Convert.ToDouble(Chart.TOTAL[k + 1, j])) * (Chart.All_height / Chart.TEMP3));
- if (!ValidateUtil.isBlank(Convert.ToString(Chart.TOTAL[k, j])))
- {
- vml.Append("<v:line id='msi_1025' title='");
- vml.Append(Convert.ToString(Chart.TOTAL[k, j]) + Chart.UNIT);
- vml.Append("-");
- vml.Append(Convert.ToString(Chart.TOTAL[k + 1, j]) + Chart.UNIT);
- vml.Append("' style='position:absolute;left:0px;text-align:left;top:0;z-index:1' from='");
- vml.Append(Chart.X1);
- vml.Append("px,");
- vml.Append(Chart.Y1);
- vml.Append("px' to='");
- vml.Append(Chart.X2);
- vml.Append("px,");
- vml.Append(Chart.Y2);
- vml.Append("px' coordsize='21600,21600' strokecolor='");
- vml.Append(line_code[j, 1]);
- vml.Append("' strokeweight='");
- vml.Append(line_code[j, 2]);
- vml.Append("' onmouseover='this.strokeweight=this.strokeweight+1' onmouseout='this.strokeweight=this.strokeweight-1'>");
- switch (line_code[j, 3])
- {
- case"1":
- vml.Append("<v:stroke dashstyle='solid'/>");
- break;
- case"2":
- vml.Append("<v:stroke dashstyle='dot'/>");
- break;
- case"3":
- vml.Append("<v:stroke dashstyle='dash'/>");
- break;
- case"4":
- vml.Append("<v:stroke dashstyle='dashdot'/>");
- break;
- case"5":
- vml.Append("<v:stroke dashstyle='longdash'/>");
- break;
- case"6":
- vml.Append("<v:stroke dashstyle='longdashdot'/>");
- break;
- case"7":
- vml.Append("<v:stroke dashstyle='longdashdotdot'/>");
- break;
- case"8":
- vml.Append("<v:stroke dashstyle='shortdot'/>");
- break;
- case"9":
- vml.Append("<v:stroke dashstyle='shortdash'/>");
- break;
- case"10":
- vml.Append("<v:stroke dashstyle='shortdashdot'/>");
- break;
- case"11":
- vml.Append("<v:stroke dashstyle='shortdashdotdot'/>");
- break;
- default:
- break;
- }
- vml.Append("</v:line>");
- //折点类型 '优化...
- if (line_code[j, 4] == "1")
- {
- vml.Append("<v:shape id='msi_1025' type='#_x0000_t202' style='position:absolute;left:");
- vml.Append(Chart.X1 - 2);
- vml.Append("px;top:");
- vml.Append(Chart.Y1 - 2);
- vml.Append("px;width:50px;height:18px;z-index:1'>");
- vml.Append("<v:textbox inset='0px,0px,0px,0px'><table cellspacing='0' cellpadding='0' width='100%' height='100%'><tr><td align='center'><a href='");
- vml.Append(Strings.Split(Convert.ToString(Chart.TOTAL[k, 0]), ",", -1, CompareMethod.Binary)[1]);
- vml.Append("'><font color=red>");
- vml.Append(Convert.ToString(Chart.TOTAL[k, j]));
- vml.Append("</font></a></td></tr></table></v:textbox></v:shape>");
- }
- else if (line_code[j, 4] == "2")
- {
- vml.Append("<v:shape id='msi_1025' type='#_x0000_t202' style='position:absolute;left:");
- vml.Append(Chart.X1 - 2);
- vml.Append("px;top:");
- vml.Append(Chart.Y1 - 2);
- vml.Append("px;width:50px;height:18px;z-index:1'>");
- vml.Append("<v:textbox inset='0px,0px,0px,0px'><table cellspacing='0' cellpadding='0' width='100%' height='100%'><tr><td align='center'><a href='");
- vml.Append(Strings.Split(Convert.ToString(Chart.TOTAL[k, 0]), ",", -1, CompareMethod.Binary)[1]);
- vml.Append("'><font color=red>");
- vml.Append(Convert.ToString(Chart.TOTAL[k, j]));
- vml.Append("</font></a></td></tr></table></v:textbox></v:shape>");
- vml.Append("<a href='");
- vml.Append(Strings.Split(Convert.ToString(Chart.TOTAL[k, 0]), ",", -1, CompareMethod.Binary)[1]);
- vml.Append("'><v:rect id='msi_1027' title='项目:");
- vml.Append(Strings.Split(Convert.ToString(Chart.TOTAL[k, 0]), ",", -1, CompareMethod.Binary)[0]);
- vml.Append(" <br>数值:");
- vml.Append(Convert.ToString(Chart.TOTAL[k, j]) + Chart.UNIT);
- vml.Append(" <br>比例:");
- vml.Append(Convert.ToDouble(pie[k, j]) * 100.0);
- vml.Append("% <br>点击可查看详细列表' style='position:absolute;left:");
- vml.Append(Chart.X1 - 2);
- vml.Append("px;top:");
- vml.Append(Chart.Y1 - 2);
- vml.Append("px;width:4px;height:4px; z-index:2' fillcolor='red' strokecolor='");
- vml.Append(line_code[j, 1]);
- vml.Append("'/></a>");
- }
- else if (line_code[j, 4] == "3")
- {
- vml.Append("<v:shape id='msi_1025' type='#_x0000_t202' style='position:absolute;left:");
- vml.Append(Chart.X1 - 2);
- vml.Append("px;top:");
- vml.Append(Chart.Y1 - 2);
- vml.Append("px;width:50px;height:18px;z-index:1'>");
- vml.Append("<v:textbox inset='0px,0px,0px,0px'><table cellspacing='0' cellpadding='0' width='100%' height='100%'><tr><td align='center'><a href='");
- vml.Append(Strings.Split(Convert.ToString(Chart.TOTAL[k, 0]), ",", -1, CompareMethod.Binary)[1]);
- vml.Append("'><font color=red>");
- vml.Append(Convert.ToString(Chart.TOTAL[k, j]));
- vml.Append("</font></a></td></tr></table></v:textbox></v:shape>");
- vml.Append("<a href='");
- vml.Append(Strings.Split(Convert.ToString(Chart.TOTAL[k, 0]), ",", -1, CompareMethod.Binary)[1]);
- vml.Append("'><v:oval id='msi_1026' title='项目:");
- vml.Append(Strings.Split(Convert.ToString(Chart.TOTAL[k, 0]), ",", -1, CompareMethod.Binary)[0]);
- vml.Append(" <br>数值:");
- vml.Append(Convert.ToString(Chart.TOTAL[k, j]) + Chart.UNIT);
- vml.Append(" <br>比例:");
- vml.Append(Convert.ToDouble(pie[k, j]) * 100.0);
- vml.Append("% <br>点击可查看详细列表' style='position:absolute;left:");
- vml.Append(Chart.X1 - 2);
- vml.Append("px;top:");
- vml.Append(Chart.Y1 - 2);
- vml.Append("px;width:4px;height:4px; z-index:2' fillcolor='red' strokecolor='");
- vml.Append(line_code[j, 1]);
- vml.Append("'/></a>");
- }
- //最后的一个折点
- if (line_code[j, 4] == "1")
- {
- }
- else if (line_code[j, 4] == "2")
- {
- vml.Append("<a href='");
- vml.Append(Strings.Split(Convert.ToString(Chart.TOTAL[Chart.TOTAL_no1, 0]), ",", -1, CompareMethod.Binary)[1]);
- vml.Append("'><v:rect id='msi_1027' title='项目:");
- vml.Append(Strings.Split(Convert.ToString(Chart.TOTAL[Chart.TOTAL_no1, 0]), ",", -1, CompareMethod.Binary)[0]);
- vml.Append(" <br>数值:");
- vml.Append(Convert.ToString(Chart.TOTAL[Chart.TOTAL_no1, j]) + Chart.UNIT);
- vml.Append(" <br>比例:");
- vml.Append(Convert.ToDouble(pie[Chart.TOTAL_no1, j]) * 100.0);
- vml.Append("% <br>点击可查看详细列表' style='position:absolute;left:");
- vml.Append(Chart.X2 - 2);
- vml.Append("px;top:");
- vml.Append(Chart.Y2 - 2);
- vml.Append("px;width:4px;height:4px; z-index:2' fillcolor='red' strokecolor='");
- vml.Append(line_code[j, 1]);
- vml.Append("'/></a>");
- }
- else if (line_code[j, 4] == "3")
- {
- vml.Append("<a href='");
- vml.Append(Strings.Split(Convert.ToString(Chart.TOTAL[Chart.TOTAL_no1, 0]), ",", -1, CompareMethod.Binary)[1]);
- vml.Append("'><v:oval id='msi_1026' title='项目:");
- vml.Append(Strings.Split(Convert.ToString(Chart.TOTAL[Chart.TOTAL_no1, 0]), ",", -1, CompareMethod.Binary)[0]);
- vml.Append(" <br>数值:");
- vml.Append(Convert.ToString(Chart.TOTAL[Chart.TOTAL_no1, j]) + Chart.UNIT);
- vml.Append(" <br>比例:");
- vml.Append(Convert.ToDouble(pie[Chart.TOTAL_no1, j]) * 100.0);
- vml.Append("% <br>点击可查看详细列表' style='position:absolute;left:");
- vml.Append(Chart.X2 - 2);
- vml.Append("px;top:");
- vml.Append(Chart.Y2 - 2);
- vml.Append("px;width:4px;height:4px;z-index:1' fillcolor='red' strokecolor='");
- vml.Append(line_code[j, 1]);
- vml.Append("'/></a>");
- }
- }
- }
- vml.Append("<v:shape id='msi_1025' type='#_x0000_t202' style='position:absolute;left:");
- vml.Append(Chart.X2 - 2);
- vml.Append("px;top:");
- vml.Append(Chart.Y2 - 2);
- vml.Append("px;width:50px;height:18px;z-index:1'>");
- vml.Append("<v:textbox inset='0px,0px,0px,0px'><table cellspacing='0' cellpadding='0' width='100%' height='100%'><tr><td align='center'><a href='");
- vml.Append(Strings.Split(Convert.ToString(Chart.TOTAL[Chart.TOTAL_no1, 0]), ",", -1, CompareMethod.Binary)[1]);
- vml.Append("'><font color=red>");
- vml.Append(Chart.TOTAL[Chart.TOTAL_no1, j]);
- vml.Append("</font></a></td></tr></table></v:textbox></v:shape>");
- }
- for (int i = 1; i <= Chart.TOTAL_no1; i++)
- {
- vml.Append("<v:line id='msi_1027' ");
- vml.Append(Chart.VMLStyle);
- vml.Append(" from='");
- vml.Append(Chart.LEFT_x + Chart.ALL_width * (i - 1) / Chart.TOTAL_no1);
- vml.Append("px,");
- vml.Append(Chart.TTAH);
- vml.Append("px' to='");
- vml.Append(Chart.LEFT_x + Chart.ALL_width * (i - 1) / Chart.TOTAL_no1);
- vml.Append("px,");
- vml.Append(Chart.TTAH + 15);
- vml.Append("px'/>");
- if (i > 1)
- {
- vml.Append("<v:line id='msi_1027' ");
- vml.Append(Chart.VMLStyle);
- vml.Append(" from='");
- vml.Append(Chart.LEFT_x + Chart.ALL_width * (i - 1) / Chart.TOTAL_no1);
- vml.Append("px,");
- vml.Append(Chart.TTAH);
- vml.Append("px' to='");
- vml.Append(Chart.LEFT_x + Chart.ALL_width * (i - 1) / Chart.TOTAL_no1);
- vml.Append("px,");
- vml.Append(Chart.CHART_top);
- vml.Append("px' strokecolor='");
- vml.Append(Chart.SPLIT_color);
- vml.Append("'/>");
- }
- vml.Append("");
- vml.Append("<v:shape id='msi_1025' type='#_x0000_t202' style='position:absolute;left:");
- vml.Append(Chart.LEFT_x + Chart.ALL_width * (i - 1) / Chart.TOTAL_no1);
- vml.Append("px;top:");
- vml.Append(Chart.TTAH);
- vml.Append("px;width:");
- vml.Append(Chart.ALL_width / Chart.TOTAL_no1);
- vml.Append("px;height:28px;z-index:1'>");
- Chart.LineName = Strings.Split(Convert.ToString(Chart.TOTAL[i, 0]), ",", -1, CompareMethod.Binary)[0];
- Chart.HrefName = Strings.Split(Convert.ToString(Chart.TOTAL[i, 0]), ",", -1, CompareMethod.Binary)[1];
- if (i == Chart.Standard)
- {
- Chart.LineName = "<a title='以此项目为标准比100%' href='" + Chart.HrefName + "'><font color=red>" + Chart.LineName + "</font></a>";
- }
- else
- {
- Chart.LineName = "<a href='" + Chart.HrefName + "'>" + Chart.LineName + "</a>";
- }
- vml.Append("<v:textbox>");
- vml.Append(Chart.LineName);
- vml.Append("</v:textbox></v:shape>");
- vml.Append("<script type='text/javascript'>document.getElementById('CountImage2').width=");
- vml.Append(66 + (33 * i));
- vml.Append(";document.getElementById('CountTXT').innerHTML='处理进度:<font color=red><b>");
- vml.Append(50 + (50 / Chart.TOTAL_no1 * i));
- vml.Append("</b></font>';document.getElementById('CountImage').title = '正在处理数据...';</script>");
- }
- Chart.TB_height = 15;
- if (Chart.LINE_no > 2)
- {
- vml.Append("<v:rect id='msi_1025' style='position:absolute;left:");
- vml.Append(Chart.TLAW);
- vml.Append("px;top:");
- vml.Append(Chart.CHART_top);
- vml.Append("px;width:100px;height:");
- vml.Append(Chart.LINE_no * Chart.TB_height + 20);
- vml.Append("px;z-index:1'/>");
- for (int i = 1; i <= Chart.LINE_no; i++)
- {
- vml.Append("<v:shape id='msi_1025' type='#_x0000_t202' style='position:absolute;left:");
- vml.Append(Chart.TLAW + 15);
- vml.Append("px;top:");
- vml.Append(Chart.CHART_top + 10 + (i - 1) * Chart.TB_height);
- vml.Append("px;width:60px;height:");
- vml.Append(Chart.TB_height);
- vml.Append("px;z-index:1'>");
- vml.Append("<v:textbox inset='0px,0px,0px,0px'><table cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td align='left'>");
- vml.Append(line_code[i, 5]);
- vml.Append("</td></tr></table></v:textbox></v:shape>");
- vml.Append("<v:rect id='msi_1040' style='position:absolute;left:");
- vml.Append(Chart.TLAW + 60);
- vml.Append("px;top:");
- vml.Append(Chart.CHART_top + 10 + (i - 1) * Chart.TB_height + 4);
- vml.Append("px;width:30px;height:10px;z-index:1' fillcolor='");
- vml.Append(line_code[i, 1]);
- vml.Append("'><v:fill color2='");
- vml.Append(line_code[i, 1]);
- vml.Append("' rotate='t' focus='100%' type='gradient'/></v:rect>");
- }
- }
- vml.Append("<v:shape id='msi_1025' type='#_x0000_t202' style='position:absolute;left:");
- vml.Append(Chart.LEFT_x);
- vml.Append("px;top:");
- vml.Append(Chart.CHART_top + Chart.TB_height + Chart.All_height + 10);
- vml.Append("px;width:");
- vml.Append(Chart.ALL_width);
- vml.Append("px;height:");
- vml.Append(Chart.TB_height);
- vml.Append("px;z-index:1'><table align='center'><tr><td>");
- vml.Append(Chart.CHART_title);
- vml.Append("</td></tr></v:shape>");
- }
- private void csiVMLCakeChart(ChartModule Chart)
- {
- if (Chart.THICKNESS > 80 | Chart.THICKNESS < 0)
- {
- Chart.THICKNESS = 60;
- }
- if (Chart.CHART_width > 0.5 | Chart.CHART_width < 0)
- {
- Chart.CHART_width = 0;
- }
- Chart.InTop = Chart.CHART_top + Chart.All_height / 14.0;
- Chart.Chart_no = Information.UBound(Chart.TOTAL, 1);
- string[] pie = null;
- pie = new string[Chart.Chart_no + 1];
- Chart.ALLvalues = 0.0;
- Chart.Standard = Convert.ToInt32(Strings.Split(Convert.ToString(Chart.TOTAL[0, 0]), ",", -1, CompareMethod.Binary)[0]);
- if (Chart.Standard == 0)
- {
- for (int i = 1; i <= Chart.Chart_no; i++)
- {
- Chart.ALLvalues = Chart.ALLvalues + Convert.ToDouble(Chart.TOTAL[i, 1]);
- }
- for (int j = 1; j <= Chart.Chart_no; j++)
- {
- pie[j] = Strings.FormatNumber(Convert.ToDouble(Chart.TOTAL[j, 1]) / Chart.ALLvalues, 4, TriState.True, TriState.UseDefault, TriState.UseDefault);
- }
- }
- else
- {
- for (int i = 1; i <= Chart.Chart_no; i++)
- {
- Chart.ALLvalues = Chart.ALLvalues + Convert.ToDouble(Chart.TOTAL[i, 1]);
- }
- for (int j = 1; j <= Chart.Chart_no; j++)
- {
- pie[j] = Strings.FormatNumber(Convert.ToDouble(Chart.TOTAL[j, 1]) / Convert.ToDouble(Chart.TOTAL[Chart.Standard, 1]), 4, TriState.True, TriState.UseDefault, TriState.UseDefault);
- }
- }
- 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>");
- vml.Append("<v:shapetype id='3dtxt' coordsize='21600,21600' o:spt='136' adj='10800' path='m@7,l@8,m@5,21600l@6,21600e'> ");
- 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'/>");
- vml.Append(" <v:textpath on='T' fitshape='T'/>");
- vml.Append(" <o:lock v:ext='edit' text='t' shapetype='T'/>");
- vml.Append("</v:shapetype>");
- vml.Append("");
- vml.Append("<v:rect id='background' style='position:absolute;left:");
- vml.Append(Chart.CHART_left);
- vml.Append("px;top:");
- vml.Append(Chart.CHART_top);
- vml.Append("px;WIDTH:");
- vml.Append(Chart.ALL_width);
- vml.Append("px;HEIGHT:");
- vml.Append(Chart.All_height);
- vml.Append("px;' fillcolor='#EFEFEF' strokecolor='");
- vml.Append(Chart.SPLIT_color);
- vml.Append("'>");
- vml.Append(" <v:shadow on='T' type='single' color='silver' offset='4pt,4pt'/>");
- vml.Append("</v:rect>");
- vml.Append("<v:group ID='table' style='position:absolute;left:");
- vml.Append(Chart.CHART_left);
- vml.Append("px;top:");
- vml.Append(Chart.CHART_top);
- vml.Append("px;WIDTH:");
- vml.Append(Chart.ALL_width);
- vml.Append("px;HEIGHT:");
- vml.Append(Chart.All_height);
- vml.Append("px;' coordsize = '21000,11500'>");
- vml.Append("<v:rect style='position:relative;left:500px;top:200px;width:20000px;height:800px;' filled='F' stroked='F'>");
- vml.Append("<v:TextBox inset='0pt,1pt,0pt,0pt'style='font-size:10pt;color: #000000;font-weight:bold;text-align:center;'>");
- vml.Append(Chart.CHART_title);
- vml.Append("</v:TextBox>");
- vml.Append("</v:rect> ");
- vml.Append("<v:rect id='back' style='position:relative;left:500px;top:1000px;width:20000px; height:10000px;' onmouseover='movereset(1)' onmouseout='movereset(0)' fillcolor='");
- vml.Append(Chart.CHART_backcolor);
- vml.Append("' strokecolor='");
- vml.Append(Chart.SPLIT_color);
- vml.Append("'>");
- vml.Append("<v:fill rotate='T' angle='-45' focus='100%' type='gradient'/>");
- vml.Append("</v:rect>");
- vml.Append(" <v:rect id='back' style='position:relative;left:15000px;top:1400px;width:5000px; height:");
- vml.Append(((Chart.Chart_no + 1) * 9000 / 15.0 + 1000.0));
- vml.Append("px;' fillcolor='");
- vml.Append(Chart.CHART_backcolor);
- vml.Append("' stroked='T' strokecolor='");
- vml.Append(Chart.SPLIT_color);
- vml.Append("'>");
- vml.Append(" <v:fill rotate='T' angle='-175' focus='100%' type='gradient'/>");
- vml.Append(" <v:shadow on='T' type='single' color='silver' offset='3pt,3pt'/>");
- vml.Append(" </v:rect>");
- vml.Append(" <v:rect style='position:relative;left:15500px;top:1500px;width:4000px;height:700px;' fillcolor='#9cf' strokecolor='#69f'>");
- vml.Append(" <v:textBox inset='5pt,1pt,3pt,0pt' style='font-size:9pt;color: red;font-weight:bold;text-align:center;'>");
- vml.Append(string.Format("总数({0})", Chart.ALLvalues + Chart.UNIT));
- vml.Append("</v:textBox></v:rect> ");
- for (int k = 1; k <= Chart.Chart_no; k++)
- {
- Chart.SetColor = Convert.ToString(Chart.TOTAL[k, 2]).Trim();
- double m = k * 600.0 + 2000.0;
- if (ValidateUtil.isBlank(Chart.SetColor))
- {
- Chart.SetColor = Chart.BG_color[k % Chart.COLOR_count];
- }
- vml.Append(" <v:Rect id='rec");
- vml.Append(k);
- vml.Append("' style='position:relative;left:15400px;top:");
- vml.Append(m);
- vml.Append("px;width:4300px;height:450px;display:none' fillcolor='#efefef' strokecolor='");
- vml.Append(Chart.SetColor);
- vml.Append("'>");
- vml.Append(" <v:fill opacity='.6' color2='fill darken(118)' o:opacity2='.6' rotate='T' method='linear sigma' focus='100%' type='gradient'/>");
- vml.Append(" </v:Rect>");
- vml.Append(" <v:Rect style='position:relative;left:15500px;top:");
- vml.Append(m + 30.0);
- vml.Append("px;width:600px;height:400px' fillcolor='");
- vml.Append(Chart.SetColor);
- vml.Append("' stroked='F'/>");
- vml.Append(" <v:Rect style='position:relative;left:16300px;top:");
- vml.Append(m);
- vml.Append("px;width:3400px;height:600px' filled='F' stroked='F' onmouseover='moveup(cake");
- vml.Append(k);
- vml.Append(",");
- vml.Append(Chart.InTop);
- vml.Append(",txt");
- vml.Append(k);
- vml.Append(",rec");
- vml.Append(k);
- vml.Append(")'; onmouseout='movedown(cake");
- vml.Append(k);
- vml.Append(",");
- vml.Append(Chart.InTop);
- vml.Append(",txt");
- vml.Append(k);
- vml.Append(",rec");
- vml.Append(k);
- vml.Append(");'>");
- Chart.LineName = Strings.Split(Convert.ToString(Chart.TOTAL[k, 0]), ",", -1, CompareMethod.Binary)[0] + ":" + Chart.TOTAL[k, 1] + Chart.UNIT;
- Chart.HrefName = Strings.Split(Convert.ToString(Chart.TOTAL[k, 0]), ",", -1, CompareMethod.Binary)[1];
- if (k == Chart.Standard)
- {
- Chart.LineName = "<a title='以此项目为标准比100%' href='" + Chart.HrefName + "'><font color=red>" + Chart.LineName + "</font></a>";
- }
- else
- {
- Chart.LineName = "<a title='点击可查看详细列表' href='" + Chart.HrefName + "'>" + Chart.LineName + "</a>";
- }
- vml.Append("<v:textbox inset='0pt,");
- vml.Append(Chart.All_height / 330);
- vml.Append("px,0pt,0pt'>");
- vml.Append(Chart.LineName);
- vml.Append("</v:textbox></v:Rect>");
- Chart.SetColor = "";
- }
- vml.Append("</v:group>");
- double k1 = 180.0;
- int k4 = 10;
- for (int l = 1; l <= Chart.Chart_no; l++)
- {
- Chart.SetColor = Convert.ToString(Chart.TOTAL[l, 2]).Trim();
- if (ValidateUtil.isBlank(Chart.SetColor))
- {
- Chart.SetColor = Chart.BG_color[l % Chart.COLOR_count];
- }
- double k2 = 360.0 * Convert.ToDouble(pie[l]) / 2.0;
- double k3 = k1 + k2;
- if (k3 >= 360.0)
- {
- k3 = k3 - 360.0;
- }
- double kkk = (-11796480.0 * Convert.ToDouble(pie[l]) + 5898240.0);
- double k5 = 3.1415926 * 2.0 * (180.0 - (k3 - 180.0)) / 360.0;
- double R = Chart.All_height / 2.0;
- double txt_x = Chart.CHART_left + Chart.All_height / 8.0 - 30.0 + R + R * Math.Sin(k5) * 0.7;
- double txt_y = Chart.InTop - 39.0 + R + R * Math.Cos(k5) * 0.7 * 0.5;
- 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>点击可查看详细列表";
- vml.Append("<a href='");
- vml.Append(Strings.Split(Convert.ToString(Chart.TOTAL[l, 0]), ",", -1, CompareMethod.Binary)[1]);
- vml.Append("'><v:shape id='cake");
- vml.Append(l);
- vml.Append("' type='#Cake_3D' title='");
- vml.Append(titlestr);
- vml.Append("'");
- vml.Append(" style='position:absolute;left:");
- vml.Append(Chart.CHART_left + Chart.All_height / 8.0);
- vml.Append("px;top:");
- vml.Append(Chart.InTop);
- vml.Append("px;WIDTH:");
- vml.Append(Chart.All_height);
- vml.Append("px;HEIGHT:");
- vml.Append(Chart.All_height);
- vml.Append("px;rotation:");
- vml.Append(k3);
- vml.Append(";z-index:");
- vml.Append(k4);
- vml.Append("'");
- vml.Append(" adj='");
- vml.Append(kkk);
- vml.Append(",0' fillcolor='");
- vml.Append(Chart.SetColor);
- vml.Append("' onmouseover='moveup(cake");
- vml.Append(l);
- vml.Append(",");
- vml.Append(Chart.InTop);
- vml.Append(",txt");
- vml.Append(l);
- vml.Append(",rec");
- vml.Append(l);
- vml.Append(")'; onmouseout='movedown(cake");
- vml.Append(l);
- vml.Append(",");
- vml.Append(Chart.InTop);
- vml.Append(",txt");
- vml.Append(l);
- vml.Append(",rec");
- vml.Append(l);
- vml.Append(");'></a>");
- vml.Append(" <v:fill opacity='60293f' color2='fill lighten(120)' o:opacity2='60293f' rotate='t' angle='-135' method='linear sigma' focus='100%' type='gradient'/>");
- vml.Append(" <o:extrusion v:ext='view' on='t'backdepth='");
- vml.Append(Chart.HEIGHT_split);
- vml.Append("' rotationangle='");
- vml.Append(Chart.THICKNESS);
- vml.Append("' viewpoint='0,0'viewpointorigin='0,0' skewamt='");
- vml.Append(Chart.CHART_width);
- vml.Append("' lightposition='-50000,-50000' lightposition2='50000'/>");
- vml.Append(" </v:shape>");
- vml.Append(" <v:shape id='txt");
- vml.Append(l);
- vml.Append("' type='#3dtxt' style='position:absolute;left:");
- vml.Append(txt_x);
- vml.Append("px;top:");
- vml.Append(txt_y);
- vml.Append("px;z-index:20;display:none;width:50px; height:18px;' fillcolor='#ffffff' onmouseover='ontxt(cake");
- vml.Append(l);
- vml.Append(",");
- vml.Append(Chart.InTop);
- vml.Append(",txt");
- vml.Append(l);
- vml.Append(",rec");
- vml.Append(l);
- vml.Append(")'>");
- vml.Append(" <v:fill opacity='60293f' color2='fill lighten(10)' o:opacity2='60293f' rotate='t' angle='-135' method='linear sigma' focus='100%' type='gradient'/>");
- vml.Append(" <v:textpath style='font-family:'黑体';v-text-kern:t' trim='t' fitpath='t' string='");
- vml.Append(Convert.ToDouble(pie[l]) * 100.0);
- vml.Append("%'/>");
- vml.Append(" <o:extrusion v:ext='view' backdepth='8pt' on='t' lightposition='0,0' lightposition2='0,0'/>");
- vml.Append(" </v:shape>");
- vml.Append("<script type='text/javascript'>document.getElementById('CountImage2').width=");
- vml.Append(66 + (33 * l));
- vml.Append(";document.getElementById('CountTXT').innerHTML='处理进度:<font color=red><b>");
- vml.Append(50 + (50 / Chart.Chart_no * l));
- vml.Append("</b></font>';document.getElementById('CountImage').title = '正在处理数据...';</script>");
- k1 = k1 + k2 * 2.0;
- if (k1 >= 360.0)
- {
- k1 = k1 - 360.0;
- }
- if (k1 > 180.0)
- {
- k4 = k4 + 1;
- }
- else
- {
- k4 = k4 - 1;
- }
- }
- Chart.HEIGHT_split = Chart.HEIGHT_split + 3;
- //调节饼块上移高度匹配 默认28
- //饼块上下移动JS
- vml.Append(Constants.vbCrLf);
- vml.Append("<script type='text/javascript'>" + Constants.vbCrLf);
- vml.Append("<!--" + Constants.vbCrLf);
- vml.Append("onit=true" + Constants.vbCrLf);
- vml.Append("num=0" + Constants.vbCrLf);
- vml.Append("function moveup(iteam,top,txt,rec){" + Constants.vbCrLf);
- vml.Append("temp=eval(iteam)" + Constants.vbCrLf);
- vml.Append("tempat=eval(top)" + Constants.vbCrLf);
- vml.Append("temptxt=eval(txt)" + Constants.vbCrLf);
- vml.Append("temprec=eval(rec)" + Constants.vbCrLf);
- vml.Append("at=parseInt(temp.style.top)" + Constants.vbCrLf);
- vml.Append("temprec.style.display = "";"+ Constants.vbCrLf);
- vml.Append("if (num>");
- vml.Append(Chart.HEIGHT_split - 1);
- vml.Append("){" + Constants.vbCrLf);
- vml.Append("temptxt.style.display = "";" + Constants.vbCrLf);
- vml.Append("}" + Constants.vbCrLf);
- vml.Append("if(at>(tempat-");
- vml.Append(Chart.HEIGHT_split);
- vml.Append(")&&onit){" + Constants.vbCrLf);
- vml.Append("num++" + Constants.vbCrLf);
- vml.Append("temp.style.top=at-1" + Constants.vbCrLf);
- vml.Append("Stop=setTimeout("moveup(temp,tempat,temptxt,temprec)",5);" + Constants.vbCrLf);
- vml.Append("}else{" + Constants.vbCrLf);
- vml.Append("return" + Constants.vbCrLf);
- vml.Append("}" + Constants.vbCrLf);
- vml.Append("}" + Constants.vbCrLf);
- vml.Append("function movedown(iteam,top,txt,rec){" + Constants.vbCrLf);
- vml.Append("temp=eval(iteam)" + Constants.vbCrLf);
- vml.Append("temptxt=eval(txt)" + Constants.vbCrLf);
- vml.Append("temprec=eval(rec)" + Constants.vbCrLf);
- vml.Append("clearTimeout(Stop)" + Constants.vbCrLf);
- vml.Append("temp.style.top=top" + Constants.vbCrLf);
- vml.Append("num=0;" + Constants.vbCrLf);
- vml.Append("temptxt.style.display = "none";" + Constants.vbCrLf);
- vml.Append("temprec.style.display = "none";" + Constants.vbCrLf);
- vml.Append("}" + Constants.vbCrLf);
- vml.Append("function ontxt(iteam,top,txt,rec){" + Constants.vbCrLf);
- vml.Append("temp = eval(iteam)" + Constants.vbCrLf);
- vml.Append("temptxt = eval(txt)" + Constants.vbCrLf);
- vml.Append("temprec = eval(rec)" + Constants.vbCrLf);
- vml.Append("if (onit){" + Constants.vbCrLf);
- vml.Append("temp.style.top = top-");
- vml.Append(Chart.HEIGHT_split);
- vml.Append(";" + Constants.vbCrLf);
- vml.Append("temptxt.style.display = "";" + Constants.vbCrLf);
- vml.Append("temprec.style.display = "";" + Constants.vbCrLf);
- vml.Append("}" + Constants.vbCrLf);
- vml.Append("}" + Constants.vbCrLf);
- vml.Append("function movereset(over){" + Constants.vbCrLf);
- vml.Append("if (over==1){" + Constants.vbCrLf);
- vml.Append("onit=false" + Constants.vbCrLf);
- vml.Append("}else{" + Constants.vbCrLf);
- vml.Append("onit=true" + Constants.vbCrLf);
- vml.Append("}" + Constants.vbCrLf);
- vml.Append("}" + Constants.vbCrLf);
- vml.Append("-->" + Constants.vbCrLf);
- vml.Append("</script>" + Constants.vbCrLf);
- }
- }