Beispiel #1
0
        public HtmlGenericControl ShowItemConclusion(HtmlGenericControl div)
        {
            DataTable dtTtem             = new WebChart_Layer().GetTtem(SID, IID);
            string    itemConclusionText = "";

            if (dtTtem.Rows.Count > 0)
            {
                itemConclusionText = ConvertHelper.ConvertString(dtTtem.Rows[0]["ItemConclusion"]);
            }

            Anthem.TextBox itemConclusion = new Anthem.TextBox();
            itemConclusion.TextMode = TextBoxMode.MultiLine;
            itemConclusion.ID       = "itemConclusion";
            itemConclusion.Height   = 61;
            itemConclusion.Width    = 600;
            itemConclusion.ToolTip  = "最大允许输入长度为500个字,超过将被截断!";
            itemConclusion.CssClass = "itemConclusionText";

            itemConclusion.Text = itemConclusionText;
            itemConclusion.Attributes.Add("onKeyUp", "CheckLength(this,500)");


            Anthem.Button itemConclusionButton = new Anthem.Button();
            itemConclusionButton.OnClientClick = "return buttonClientClick();";
            itemConclusionButton.Text          = "保存";
            itemConclusionButton.CssClass      = "SaveItem";


            div.Controls.Add(itemConclusion);
            div.Controls.Add(itemConclusionButton);
            return(div);
        }
        /// <summary>
        /// 初始加载页
        /// </summary>
        public void InitPage()
        {
            //获取所有题目,根据SID
            //long SID = ConvertHelper.ConvertLong(Request.QueryString["SID"]);
            long   SID         = 96;
            string SurveryName = "";


            DataTable dtChoosedOption = new WebChart_Layer().GetChoosedOption(ConvertHelper.ConvertString(SID), "");
            long      nowRentCount    = 0;


            DataTable SurveyTable = new WebChart_Layer().GetSurveyTableName(ConvertHelper.ConvertString(SID));

            if (SurveyTable.Rows.Count == 1)
            {
                SurveryName = ConvertHelper.ConvertString(SurveyTable.Rows[0]["SurveyName"]);
            }

            DataTable SurveyItems = new WebChart_Layer().GetAllSurveyTtem(ConvertHelper.ConvertString(SID)); //获取问卷的所有题目

            if (SurveyItems.Rows.Count > 0)
            {
                foreach (DataRow drSurveyItem in SurveyItems.Rows)
                {
                    Chart chart = new Chart();
                    chart.Titles.Add(ConvertHelper.ConvertString(drSurveyItem["ItemName"]));

                    Series series0 = new Series();
                    //series0.Type =SeriesChartType.Pie;
                    chart.Series.Add(series0);

                    ChartArea ChartArea0 = new ChartArea();
                    ChartArea0.Name = "a";
                    chart.ChartAreas.Add(ChartArea0);

                    Legend Legends0 = new Legend();
                    Legends0.Name = "Default";
                    chart.Legends.Add(Legends0);

                    CalloutAnnotation CalloutAnnotation0 = new CalloutAnnotation();
                    CalloutAnnotation0.Name = "Callout1";
                    chart.Annotations.Add(CalloutAnnotation0);

                    SetChartProperty(chart);

                    DataRow[] dataItemRows = dtChoosedOption.Select(string.Format("IID={0}", ConvertHelper.ConvertString(drSurveyItem["IID"])));
                    if (dataItemRows != null)
                    {
                        for (int i = 0; i < dataItemRows.Length; i++)
                        {
                            nowRentCount = nowRentCount + ConvertHelper.ConvertLong(dataItemRows[i]["CountItemValue"]);
                        }
                    }

                    DataTable dtTtemOption = new WebChart_Layer().GetTtemOption(ConvertHelper.ConvertString(SID), ConvertHelper.ConvertString(drSurveyItem["IID"]));  //获取题目的所有选项
                    if (dtTtemOption != null)
                    {
                        int j = 0;
                        foreach (DataRow dtItemOption in dtTtemOption.Rows)
                        {
                            if (dtChoosedOption != null)
                            {
                                DataRow[] dataRows = dtChoosedOption.Select(string.Format("IID={0} and ItemValue={1}", ConvertHelper.ConvertString(drSurveyItem["IID"]), ConvertHelper.ConvertString(dtItemOption["OID"])));
                                if (dataRows.Length > 0)
                                {
                                    chart.Series[0].Points.AddY(Convert.ToInt64(dataRows[0]["CountItemValue"]) * 100 / nowRentCount);
                                    chart.Series[0].Points[j].Label      = Convert.ToString(Math.Round(Convert.ToDouble(dataRows[0]["CountItemValue"]) * 100 / nowRentCount, 2)) + "%";
                                    chart.Series[0].Points[j].LegendText = ConvertHelper.ConvertString(dtItemOption["OptionName"]) + "(" + dataRows[0]["CountItemValue"].ToString() + "个)";
                                    j++;
                                }
                                else
                                {
                                    //chart.Series[0].Points.AddY(0);
                                    //chart.Series[0].Points[j].Label = "100%";
                                    //chart.Series[0].Points[j].LegendText = ConvertHelper.ConvertString(dtItemOption["OptionName"]) + "(" + 0 + "个)";
                                    //chart.Series[0].Enabled = false;
                                    //j++;
                                }
                            }
                        }
                        j = 0;
                    }

                    Page.Controls.Add(chart);

                    nowRentCount = 0;
                }
            }
        }
Beispiel #3
0
        public void InitPage()
        {
            string QueryCondition = ConvertHelper.ConvertString(Request.Form["QueryCondition"]);
            string chartType      = ConvertHelper.ConvertString(Request.Form["chart"]);

            this.SID        = ConvertHelper.ConvertString(Request.Form["SID"]);
            this.IID        = ConvertHelper.ConvertString(Request.Form["ResultItem"]);
            SIDRecord.Value = SID;
            IIDRecord.Value = IID;

            string ConditionSql     = ConvertHelper.ConvertString(Request.QueryString["Condition"]);
            string TableName        = "";
            long   ItemToTalChoosed = 0;

            if (SID == "" || IID == "")
            {
                return;
            }

            this.sql = Getsql(QueryCondition);

            DataTable dtItemOption = new WebChart_Layer().GetTtemOption(SID, IID);

            dtTableName    = new WebChart_Layer().GetSurveyTableName(SID);
            dtChooseOption = new WebChart_Layer().GetChoosedOption(SID, sql);

            if (dtTableName.Rows.Count > 0)
            {
                TableName = ConvertHelper.ConvertString(dtTableName.Rows[0]["SurveyName"]);
            }

            //获取所有选择次数
            DataRow[] dtItemChoosedRows = dtChooseOption.Select(string.Format("IID={0}", IID));
            if (dtItemChoosedRows != null)
            {
                for (int i = 0; i < dtItemChoosedRows.Length; i++)
                {
                    ItemToTalChoosed += ConvertHelper.ConvertLong(dtItemChoosedRows[i]["CountItemValue"]);
                }
            }

            HtmlGenericControl divItemTable = new HtmlGenericControl("div");

            //divItemTable.Style.Add("width", "700px");
            divItemTable.Style.Add("margin-top", "10px");
            divItemTable.Style.Add("margin-left", "5px");
            divItemTable.Attributes.Add("align", "Left");

            HtmlGenericControl divItemTableValue = new HtmlGenericControl("div");

            //divItemTableValue.Style.Add("width", "700px");
            divItemTableValue.Style.Add("margin-top", "10px");
            divItemTableValue.Style.Add("margin-left", "5px");
            divItemTableValue.Attributes.Add("align", "Left");


            divItemTable.InnerHtml = "<div style=\"width:700px\" class=\"TableTitle\" >" + TableName + "</div>";
            divItemTable           = ShowItemTable(divItemTable, dtItemOption, dtChooseOption, ItemToTalChoosed);

            divItemTableValue.InnerHtml = "<div style=\"width:700px\" class=\"TableTitle\" >" + "分值分析" + "</div>";
            divItemTableValue           = ShowItemTableValue(divItemTableValue, dtItemOption, dtChooseOption, ItemToTalChoosed);

            HtmlGenericControl divItemConclusion = new HtmlGenericControl("div");

            divItemConclusion.Style.Add("height", "100px");
            divItemConclusion.Style.Add("margin-top", "10px");
            divItemConclusion.Style.Add("margin-left", "5px");
            divItemConclusion.Attributes.Add("align", "Left");


            divItemConclusion.InnerHtml = "<div style=\"width:700px\" class=\"DivConclusion\" >" + "结论评语:" + "</div>";
            divItemConclusion           = ShowItemConclusion(divItemConclusion);

            //if (!IsPostBack)
            //{
            //    Chart chart3DPie = new CreateWebChart().YFICreateChart(SID, IID, true, SeriesChartType.Pie, dtChooseOption, dtTableName); //创建3d饼图
            //    chart3DPie.Attributes.Add("id", "chart3DPie");
            //    chart3DPie.ImageUrl = "TempFiles/ChartPic_1";

            //    chartContent.Controls.Add(chart3DPie);
            //}
            if (!string.IsNullOrEmpty(chartType) && chartType != "")
            {
                SetChart(chartType);
            }

            Page.Form.Controls.Add(divItemTable);      //添加到页面控件
            //Page.Form.Controls.Add(divItemTableValue);  //添加到页面控件
            Page.Form.Controls.Add(divItemConclusion); //添加到页面控件
        }
Beispiel #4
0
        public void InitPage()
        {
            this.SID = ConvertHelper.ConvertString(Request.QueryString["SID"]);
            this.IID = ConvertHelper.ConvertString(Request.QueryString["IID"]);
            string TableName        = "";
            long   ItemToTalChoosed = 0;

            if (SID == "" || IID == "")
            {
                return;
            }

            DataTable dtItemOption = new WebChart_Layer().GetTtemOption(SID, IID);

            dtTableName    = new WebChart_Layer().GetSurveyTableName(SID);
            dtChooseOption = new WebChart_Layer().GetChoosedOption(SID, "");

            if (dtTableName.Rows.Count > 0)
            {
                TableName = ConvertHelper.ConvertString(dtTableName.Rows[0]["SurveyName"]);
            }

            //获取所有选择次数
            DataRow[] dtItemChoosedRows = dtChooseOption.Select(string.Format("IID={0}", IID));
            if (dtItemChoosedRows != null)
            {
                for (int i = 0; i < dtItemChoosedRows.Length; i++)
                {
                    ItemToTalChoosed += ConvertHelper.ConvertLong(dtItemChoosedRows[i]["CountItemValue"]);
                }
            }


            HtmlGenericControl divItemTable = new HtmlGenericControl("div");

            //divItemTable.Style.Add("width", "700px");
            divItemTable.Style.Add("margin-top", "10px");
            divItemTable.Style.Add("margin-left", "5px");
            divItemTable.Attributes.Add("align", "Left");

            HtmlGenericControl divItemTableValue = new HtmlGenericControl("div");

            //divItemTableValue.Style.Add("width", "700px");
            divItemTableValue.Style.Add("margin-top", "10px");
            divItemTableValue.Style.Add("margin-left", "5px");
            divItemTableValue.Attributes.Add("align", "Left");


            divItemTable.InnerHtml = "<div style=\"width:700px\" class=\"TableTitle\" >" + TableName + "</div>";
            divItemTable           = ShowItemTable(divItemTable, dtItemOption, dtChooseOption, ItemToTalChoosed);

            divItemTableValue.InnerHtml = "<div style=\"width:700px\" class=\"TableTitle\" >" + "分值分析" + "</div>";
            divItemTableValue           = ShowItemTableValue(divItemTableValue, dtItemOption, dtChooseOption, ItemToTalChoosed);

            HtmlGenericControl divItemConclusion = new HtmlGenericControl("div");

            divItemConclusion.Style.Add("height", "100px");
            divItemConclusion.Style.Add("margin-top", "10px");
            divItemConclusion.Style.Add("margin-left", "5px");
            divItemConclusion.Attributes.Add("align", "Left");


            divItemConclusion.InnerHtml = "<div style=\"width:700px\" class=\"DivConclusion\" >" + "结论评语:" + "</div>";
            divItemConclusion           = ShowItemConclusion(divItemConclusion);

            if (!IsPostBack)
            {
                Chart chart3DPie = new CreateWebChart().YFICreateChart(SID, IID, true, SeriesChartType.Pie, dtChooseOption, dtTableName);     //创建3d饼图
                chart3DPie.Attributes.Add("id", "chart3DPie");
                chart3DPie.ImageUrl = "TempFiles/ChartPic_1";


                //Chart chart3DColumn = new CreateWebChart().YFICreateChart(SID, IID, true, SeriesChartType.Column); //创建3D柱形图
                //chart3DColumn.Attributes.Add("id", "chart3DColumn");
                //chart3DColumn.Style.Add("display", "none");//设置默认隐藏
                //chart3DColumn.ImageUrl = "TempFiles/ChartPic_2";

                //Chart chartPie = new CreateWebChart().YFICreateChart(SID, IID, false, SeriesChartType.Pie); //创建饼图
                //chartPie.Attributes.Add("id", "chartPie");
                //chartPie.Style.Add("display", "none");//设置默认隐藏
                //chartPie.ImageUrl = "TempFiles/ChartPic_3";

                //Chart chartColumn = new CreateWebChart().YFICreateChart(SID, IID, false, SeriesChartType.Column); //创建柱形图
                //chartColumn.Attributes.Add("id", "chartColumn");
                //chartColumn.Style.Add("display", "none");//设置默认隐藏
                //chartColumn.ImageUrl = "TempFiles/ChartPic_4";

                //Chart chart3DDoughnut = new CreateWebChart().YFICreateChart(SID, IID, true, SeriesChartType.Doughnut); //创建3D圆环形
                //chart3DDoughnut.Attributes.Add("id", "chart3DDoughnut");
                //chart3DDoughnut.Style.Add("display", "none");//设置默认隐藏
                //chart3DDoughnut.ImageUrl = "TempFiles/ChartPic_5";

                //Chart chartDoughnut = new CreateWebChart().YFICreateChart(SID, IID, false, SeriesChartType.Doughnut); //创建圆环形
                //chartDoughnut.Attributes.Add("id", "chartDoughnut");
                //chartDoughnut.Style.Add("display", "none");//设置默认隐藏
                //chartDoughnut.ImageUrl = "TempFiles/ChartPic_6";

                //Chart chart3DBar = new CreateWebChart().YFICreateChart(SID, IID, true, SeriesChartType.Bar); //创建3D圆环形
                //chart3DBar.Attributes.Add("id", "chart3DBar");
                //chart3DBar.Style.Add("display", "none");//设置默认隐藏
                //chart3DBar.ImageUrl = "TempFiles/ChartPic_7";

                //Chart chartBar = new CreateWebChart().YFICreateChart(SID, IID, false, SeriesChartType.Bar); //创建圆环形
                //chartBar.Attributes.Add("id", "chartBar");
                //chartBar.Style.Add("display", "none");//设置默认隐藏
                //chartBar.ImageUrl = "TempFiles/ChartPic_8";


                chartContent.Controls.Add(chart3DPie);
            }
            //chartContent.Controls.Add(chart3DColumn);
            //chartContent.Controls.Add(chart3DDoughnut);
            //chartContent.Controls.Add(chart3DBar);

            //chartContent.Controls.Add(chartPie);
            //chartContent.Controls.Add(chartColumn);
            //chartContent.Controls.Add(chartDoughnut);
            //chartContent.Controls.Add(chartBar);


            Page.Form.Controls.Add(divItemTable);      //添加到页面控件
            //Page.Form.Controls.Add(divItemTableValue);  //添加到页面控件
            Page.Form.Controls.Add(divItemConclusion); //添加到页面控件
        }
        /// <summary>
        /// 创建一个饼图
        /// </summary>
        /// <param name="SID"></param>
        /// <param name="IID"></param>
        /// <returns></returns>
        public Chart GetPie(long SID, long IID)
        {
            long   nowRentCount = 0;
            string SurveryName  = "";

            DataTable dtChoosedOption = new WebChart_Layer().GetChoosedOption(ConvertHelper.ConvertString(SID));

            DataTable SurveyTable = new WebChart_Layer().GetSurveyTableName(ConvertHelper.ConvertString(SID));

            if (SurveyTable.Rows.Count == 1)
            {
                SurveryName = ConvertHelper.ConvertString(SurveyTable.Rows[0]["SurveyName"]);
            }

            DataTable SurveyItems = new WebChart_Layer().GetAllSurveyTtem(ConvertHelper.ConvertString(SID)); //获取问卷的所有题目

            Chart chart = new Chart();
            //chart.Titles.Add(ConvertHelper.ConvertString(drSurveyItem["ItemName"]));

            Series series0 = new Series();

            //series0.Type =SeriesChartType.Pie;
            chart.Series.Add(series0);

            ChartArea ChartArea0 = new ChartArea();

            ChartArea0.Name = "a";
            chart.ChartAreas.Add(ChartArea0);

            Legend Legends0 = new Legend();

            Legends0.Name = "Default";
            chart.Legends.Add(Legends0);

            CalloutAnnotation CalloutAnnotation0 = new CalloutAnnotation();

            CalloutAnnotation0.Name = "Callout1";
            chart.Annotations.Add(CalloutAnnotation0);

            SetPieProperty(chart);

            DataRow[] dataItemRows = dtChoosedOption.Select(string.Format("IID={0}", ConvertHelper.ConvertString(IID)));
            if (dataItemRows != null)
            {
                for (int i = 0; i < dataItemRows.Length; i++)
                {
                    nowRentCount = nowRentCount + ConvertHelper.ConvertLong(dataItemRows[i]["CountItemValue"]);
                }
            }

            DataTable dtTtemOption = new WebChart_Layer().GetTtemOption(ConvertHelper.ConvertString(SID), ConvertHelper.ConvertString(IID));  //获取题目的所有选项

            if (dtTtemOption != null)
            {
                int j = 0;
                foreach (DataRow dtItemOption in dtTtemOption.Rows)
                {
                    if (dtChoosedOption != null)
                    {
                        long frequence = GetFrequence(dtChoosedOption, ConvertHelper.ConvertString(IID), ConvertHelper.ConvertString(dtItemOption["OID"]));
                        if (frequence > 0)
                        {
                            chart.Series[0].Points.AddY(frequence * 100 / nowRentCount);
                            chart.Series[0].Points[j].Label      = Convert.ToString(Math.Round((double)frequence * 100 / nowRentCount, 2)) + "%";
                            chart.Series[0].Points[j].LegendText = ConvertHelper.ConvertString(dtItemOption["OptionName"]) + "(" + frequence + "个)";
                            j++;
                        }
                        else
                        {
                            //chart.Series[0].Points.AddY(0);
                            //chart.Series[0].Points[j].Label = "100%";
                            //chart.Series[0].Points[j].LegendText = ConvertHelper.ConvertString(dtItemOption["OptionName"]) + "(" + 0 + "个)";
                            //chart.Series[0].Enabled = false;
                            //j++;
                        }
                    }
                }
                j = 0;
            }

            nowRentCount = 0;

            return(chart);
        }
Beispiel #6
0
        public void InitPage()
        {
            //SID = "1";
            string SurveryName      = "";
            long   ItemToTalChoosed = 0;
            long   nowRentCount     = 0;

            SID = ConvertHelper.ConvertString(Request.QueryString["SID"]);

            DataTable dtChooseOption = new WebChart_Layer().GetChoosedOption(SID, "");;                           //获取选择项
            DataTable SurveyItems    = new WebChart_Layer().GetAllSurveyTtem(ConvertHelper.ConvertString(SID));   //获取问卷的所有题目
            DataTable dtSurveyTable  = new WebChart_Layer().GetSurveyTableName(ConvertHelper.ConvertString(SID)); //获取问卷

            if (dtSurveyTable.Rows.Count == 1)
            {
                SurveryName = ConvertHelper.ConvertString(dtSurveyTable.Rows[0]["SurveyName"]);
            }

            //创建问卷报告表
            HtmlGenericControl divSurveyReportOut = new HtmlGenericControl("div");
            HtmlGenericControl divSurveyReport    = new HtmlGenericControl("div");

            divSurveyReport.Attributes.Add("class", "surveyReport");
            divSurveyReport.Style.Add("margin-top", "10px");
            divSurveyReport.Style.Add("margin-left", "5px");
            divSurveyReport.Attributes.Add("align", "Left");

            divSurveyReportOut.InnerHtml += "<div  class=\"OutTitle\" >" + SurveryName + " -- 综合分析报告" + "</div>";
            divSurveyReport.InnerHtml    += "<div style=\"width:800px\" class=\"TopDivTitle\" >" + SurveryName + "</div>";
            divSurveyReport = ShowItemTableValue(divSurveyReport, SID.ToString());

            divSurveyReportOut.Controls.Add(divSurveyReport);
            Page.Form.Controls.Add(divSurveyReportOut);  //添加到页面控件

            HtmlGenericControl divItemsOut = new HtmlGenericControl("div");

            divItemsOut.InnerHtml += "<div  class=\"OutTitle\" >" + "结果分析" + "</div>";
            //创建问卷选项表

            if (SurveyItems.Rows.Count > 0)
            {
                foreach (DataRow drSurveyItem in SurveyItems.Rows)
                {
                    string IID = ConvertHelper.ConvertString(drSurveyItem["IID"]);  //获取选项ID
                    //获取所有选择次数
                    if (!string.IsNullOrEmpty(IID))
                    {
                        HtmlGenericControl divTableTitle = new HtmlGenericControl("div");
                        divTableTitle.Attributes.Add("class", "surveyReport");
                        divTableTitle.Style.Add("margin-top", "10px");
                        divTableTitle.Style.Add("margin-left", "5px");
                        divTableTitle.Attributes.Add("align", "Left");

                        divTableTitle.InnerHtml += "<div style=\"width:800px\" class=\"TopDivTitle\" >" + ConvertHelper.ConvertString(drSurveyItem["ItemName"]) + "</div>";
                        divTableTitle.InnerHtml += "<div style=\"width:630px\" class=\"AnalysisTitle\" >" + "频率分析" + "</div>";

                        HtmlGenericControl divItems          = new HtmlGenericControl("div");
                        DataRow[]          dtItemChoosedRows = dtChooseOption.Select(string.Format("IID={0}", IID));
                        if (dtItemChoosedRows != null)
                        {
                            for (int i = 0; i < dtItemChoosedRows.Length; i++)
                            {
                                ItemToTalChoosed += ConvertHelper.ConvertLong(dtItemChoosedRows[i]["CountItemValue"]);
                            }
                        }

                        DataTable dtItemOption = new WebChart_Layer().GetTtemOption(SID, IID);
                        divItems = ShowItemTable(divItems, dtItemOption, dtChooseOption, ItemToTalChoosed, IID);

                        divTableTitle.Controls.Add(divItems);
                        divItemsOut.Controls.Add(divTableTitle);
                        ItemToTalChoosed = 0;
                    }
                }
            }
            Page.Form.Controls.Add(divItemsOut);  //添加到页面控件
        }
        public Chart YFICreateChart(string SID, string IID, bool is3D, SeriesChartType seriesChartType, DataTable dtChoosedOption, DataTable SurveyTable)
        {
            Chart chart;

            long   nowRentCount          = 0;  //题目选项总选择数
            string SurveryName           = ""; //问卷名称
            string title                 = ""; //图表的标题,题目标题
            string CalloutAnnotationText = ""; //显示合计数的


            //DataTable dtChoosedOption = new WebChart_Layer().GetChoosedOption(ConvertHelper.ConvertString(SID));  //获取所有已选择项
            //DataTable SurveyTable = new WebChart_Layer().GetSurveyTableName(ConvertHelper.ConvertString(SID));  //获取问卷表
            DataTable SurveyItems = new WebChart_Layer().GetAllSurveyTtem(ConvertHelper.ConvertString(SID)); //获取问卷的所有题目

            if (SurveyTable.Rows.Count == 1)
            {
                SurveryName = ConvertHelper.ConvertString(SurveyTable.Rows[0]["SurveyName"]);
            }

            DataRow[] drItem = SurveyItems.Select(string.Format("IID={0}", IID));
            if (drItem.Length > 0)
            {
                title = ConvertHelper.ConvertString(drItem[0]["ItemName"]);
            }

            DataRow[] dataItemRows = dtChoosedOption.Select(string.Format("IID={0}", ConvertHelper.ConvertString(IID)));
            if (dataItemRows != null)
            {
                for (int i = 0; i < dataItemRows.Length; i++)
                {
                    nowRentCount = nowRentCount + ConvertHelper.ConvertLong(dataItemRows[i]["CountItemValue"]);
                }
            }
            CalloutAnnotationText = "合计:选择数 " + nowRentCount;


            switch (seriesChartType)
            {
            case SeriesChartType.Pie:
                chart = GetPie(is3D, title, CalloutAnnotationText);
                break;

            case SeriesChartType.Column:
                chart = GetColumn(is3D, title, CalloutAnnotationText);
                break;

            case SeriesChartType.Doughnut:
                chart = GetDoughnut(is3D, title, CalloutAnnotationText);
                break;

            case SeriesChartType.Bar:
                chart = GetBar(is3D, title, CalloutAnnotationText);
                break;

            default:
                chart = GetPie(is3D, title, CalloutAnnotationText);
                break;
            }


            DataTable dtTtemOption = new WebChart_Layer().GetTtemOption(ConvertHelper.ConvertString(SID), ConvertHelper.ConvertString(IID));  //获取题目的所有选项

            if (dtTtemOption != null)
            {
                int j = 0;
                foreach (DataRow dtItemOption in dtTtemOption.Rows)
                {
                    if (dtChoosedOption != null)
                    {
                        long frequence = GetFrequence(dtChoosedOption, ConvertHelper.ConvertString(IID), ConvertHelper.ConvertString(dtItemOption["OID"]));
                        if (frequence > 0)
                        {
                            setSeries(chart, chart.Series[0], seriesChartType, frequence, nowRentCount, dtItemOption, 1, j);

                            j++;
                        }
                        else
                        {
                            //chart.Series[0].Points.AddY(0);
                            //chart.Series[0].Points[j].Label = "100%";
                            //chart.Series[0].Points[j].LegendText = ConvertHelper.ConvertString(dtItemOption["OptionName"]) + "(" + 0 + "个)";
                            //chart.Series[0].Enabled = false;
                            //j++;
                        }
                    }
                }
            }

            return(chart);
        }