예제 #1
0
    private void BindingChart(Dundas.Charting.WebControl.Chart chart, DataTable dtData)
    {
        DundasCharts.DundasChartBase(chart, ChartImageType.Flash, 800, 300
                                     , BorderSkinStyle.Emboss, Color.FromArgb(181, 64, 1), 2
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE), Color.FromArgb(0x20, 0x80, 0xD0), ChartDashStyle.Solid
                                     , -1
                                     , ChartHatchStyle.None, GradientType.TopBottom, AntiAliasing.None);

        DataTable dt   = this.CODE_TABLE;
        int       iRow = dt.Rows.Count;

        for (int i = 0; i < iRow; i++)
        {
            Series ser = DundasCharts.CreateSeries(chart, "ser" + i.ToString(), "Default", dt.Rows[i][1].ToString(), null, SeriesChartType.Line, 3
                                                   , GetChartColor(i), GetChartColor(i), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64)
                                                   );
            ser.MarkerStyle       = GetMarkerStyle(i);
            ser.MarkerColor       = GetMarkerColor(i);
            ser.MarkerBorderColor = GetMarkerBorderColor(i);
            ser.ValueMembersY     = dt.Rows[i][0].ToString();

            if (i == 0)
            {
                ser.ValueMemberX = "YY";
            }
        }

        chart.DataSource = dtData;
        chart.DataBind();
    }
예제 #2
0
    private void DrawingChart(DataTable dt, Dundas.Charting.WebControl.Chart chart)
    {
        DundasCharts.DundasChartBase(chart
                                     , Dundas.Charting.WebControl.ChartImageType.Jpeg
                                     , DataTypeUtility.GetToInt32(chart.Width.Value)
                                     , DataTypeUtility.GetToInt32(chart.Height.Value)
                                     , Dundas.Charting.WebControl.BorderSkinStyle.None
                                     , Color.FromArgb(181, 64, 1)
                                     , 0
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                     , Color.FromArgb(0x20, 0x80, 0xD0)
                                     , Dundas.Charting.WebControl.ChartDashStyle.Solid
                                     , -1
                                     , Dundas.Charting.WebControl.ChartHatchStyle.None
                                     , GradientType.TopBottom
                                     , AntiAliasing.None);


        chart.DataSource = dt;



        Dundas.Charting.WebControl.Series[] arr_series = new Dundas.Charting.WebControl.Series[ARR_SRCNAME.Length];

        for (int i = 0; i < ARR_SRCNAME.Length; i++)
        {
            string seriesName = ARR_SRCNAME[i];

            Dundas.Charting.WebControl.Series series = DundasCharts.CreateSeries(chart
                                                                                 , seriesName
                                                                                 , "Default"
                                                                                 , seriesName
                                                                                 , null
                                                                                 , CHART_TYPE[i]
                                                                                 , BORDER_WIDTH
                                                                                 , ARR_SRCCOLOR[i]
                                                                                 , BORDER_COLOR
                                                                                 , SHADOW_COLOR
                                                                                 , SHADOW_OFFSET
                                                                                 , MAKER_SIZE
                                                                                 , MAKER_BORDER_COLOR);
            series.Color         = ARR_SRCCOLOR[i];
            series.BorderWidth   = 0;
            series.BorderColor   = ARR_SRCCOLOR[i];
            series.ShadowOffset  = 0;
            series.ValueMembersY = "VALUE_" + i;
            series.ValueMemberX  = "TERM_" + i;
            series.ToolTip       = "#VALY{N0}";

            if (i > 1)
            {
                series.YAxisType = Dundas.Charting.WebControl.AxisType.Secondary;

                if (i == 3)
                {
                    series.MarkerStyle = Dundas.Charting.WebControl.MarkerStyle.Circle;
                }
                else
                {
                    series.MarkerStyle = Dundas.Charting.WebControl.MarkerStyle.Triangle;
                }

                series.MarkerColor       = ARR_SRCCOLOR[i];
                series.MarkerBorderColor = ARR_SRCCOLOR[i];
                series.MarkerSize        = 5;
            }


            arr_series[i] = series;
        }



        //DundasAnimations.DundasChartBase(chart, AnimationTheme.None, -1, -1, false, 1);

        //for (int i = 0; i < ds.Tables.Count; i++)
        //{
        //    DundasAnimations.GrowingAnimation(chart, arr_series[i], 0.5, 3.0, true);
        //}


        chart.DataBind();
    }
예제 #3
0
        public Chart GerarGraficoColuna(string[,] valorXY, bool isPorcentagem)
        {
            Chart chart = new Dundas.Charting.WebControl.Chart();

            #region configuração
            chart.ImageType            = ChartImageType.Jpeg;
            chart.Height               = new Unit("232px");
            chart.Width                = new Unit("560px");
            chart.BorderLineWidth      = 0;
            chart.BorderLineColor      = Color.Transparent;
            chart.BackColor            = (Color)(new ColorConverter().ConvertFromString("#EEF2F4"));
            chart.BackGradientEndColor = Color.White;
            chart.Palette              = ChartColorPalette.Dundas;
            #endregion

            #region legenda

            chart.Legends.Add("default1");
            chart.Legends[0].Enabled = false;

            /*
             * chart.Legends[0].BorderColor = Color.Black;
             * chart.Legends[0].BackColor = Color.Transparent;
             * chart.Legends[0].Alignment = StringAlignment.Center;
             */
            #endregion

            #region BorderSkin
            chart.BorderSkin.FrameBackColor            = Color.MediumTurquoise;
            chart.BorderSkin.FrameBackGradientEndColor = Color.Teal;
            chart.BorderSkin.PageColor = Color.AliceBlue;
            #endregion

            #region ChartAreas
            chart.ChartAreas.Add("default1");
            chart.ChartAreas[0].BorderStyle  = ChartDashStyle.NotSet;
            chart.ChartAreas[0].BackColor    = Color.White;
            chart.ChartAreas[0].ShadowOffset = 2;

            chart.ChartAreas[0].Area3DStyle.Enable3D  = true;
            chart.ChartAreas[0].Area3DStyle.YAngle    = 15;
            chart.ChartAreas[0].Area3DStyle.XAngle    = 15;
            chart.ChartAreas[0].Area3DStyle.WallWidth = 2;

            chart.ChartAreas[0].AxisY.MajorGrid.LineColor = Color.Silver;
            chart.ChartAreas[0].AxisY.MinorGrid.LineColor = Color.Silver;

            if (isPorcentagem)
            {
                chart.ChartAreas[0].AxisY.LabelStyle.Format = "P0";
            }

            chart.ChartAreas[0].AxisY2.MajorGrid.LineColor = Color.Silver;
            chart.ChartAreas[0].AxisY2.MinorGrid.LineColor = Color.Silver;

            chart.ChartAreas[0].AxisX2.MajorGrid.LineColor = Color.Silver;
            chart.ChartAreas[0].AxisX2.MinorGrid.LineColor = Color.Silver;

            chart.ChartAreas[0].AxisX.MajorGrid.LineColor = Color.Silver;
            chart.ChartAreas[0].AxisX.MinorGrid.LineColor = Color.Silver;
            #endregion

            #region Series
            chart.Series.Clear();

            for (int i = 0; i <= valorXY.GetUpperBound(0); i++)
            {
                string serie = "Series" + i.ToString();

                chart.Series.Add(serie);

                chart.Series[serie].ShadowOffset = 2;
                chart.Series[serie].Type         = Dundas.Charting.WebControl.SeriesChartType.Column;
                //chart.Series[serie].LegendText = valorXY[i, 2];
                if (valorXY[i, 2] != "")
                {
                    chart.Series[serie].AxisLabel = valorXY[i, 2];
                }

                chart.Series[serie].Points.AddXY(i + 1, int.Parse(valorXY[i, 0]));//(int.Parse(valorXY[i, 0]) == 0 ? 1 : int.Parse(valorXY[i, 0])));

                chart.Series[serie].Points[chart.Series[serie].Points.Count - 1].Label      = valorXY[i, 1];
                chart.Series[serie].Points[chart.Series[serie].Points.Count - 1].LegendText = valorXY[i, 2];
            }

            chart.DataBind();
            #endregion

            return(chart);
        }
예제 #4
0
        public Chart GerarGraficoLinha(string[,] valorXY, string labelX, string labelY, bool isPorcentagem, double limiteGrafico)
        {
            Chart chart = new Dundas.Charting.WebControl.Chart();

            #region configuração
            chart.ImageType       = ChartImageType.Jpeg;
            chart.Height          = new Unit("300px");
            chart.Width           = new Unit("800px");
            chart.BorderLineWidth = 0;
            chart.BorderLineColor = Color.Transparent;
            //chart.BackColor = (Color)(new ColorConverter().ConvertFromString("#EEF2F4"));
            chart.BackColor            = (Color)(new ColorConverter().ConvertFromString("#FFFFFF"));
            chart.BackGradientEndColor = Color.White;
            chart.Palette = ChartColorPalette.Dundas;
            #endregion

            #region legenda

            chart.Legends.Add("default1");
            chart.Legends[0].Enabled = false;

            /*
             * chart.Legends[0].BorderColor = Color.Black;
             * chart.Legends[0].BackColor = Color.Transparent;
             * chart.Legends[0].Alignment = StringAlignment.Center;
             */
            #endregion

            #region BorderSkin
            chart.BorderSkin.FrameBackColor            = Color.MediumTurquoise;
            chart.BorderSkin.FrameBackGradientEndColor = Color.Teal;
            chart.BorderSkin.PageColor = Color.AliceBlue;
            #endregion

            #region ChartAreas
            chart.ChartAreas.Add("default1");
            chart.ChartAreas[0].BorderStyle  = ChartDashStyle.NotSet;
            chart.ChartAreas[0].BackColor    = Color.White;
            chart.ChartAreas[0].ShadowOffset = 0;

            chart.ChartAreas[0].Area3DStyle.Enable3D  = false;
            chart.ChartAreas[0].Area3DStyle.YAngle    = 0;
            chart.ChartAreas[0].Area3DStyle.XAngle    = 0;
            chart.ChartAreas[0].Area3DStyle.WallWidth = 0;

            chart.ChartAreas[0].AxisY.LabelStyle.Font = new Font("Arial", 10);
            chart.ChartAreas[0].AxisX.LabelStyle.Font = new Font("Arial", 8);

            chart.ChartAreas[0].AxisY.MajorGrid.LineColor = Color.Silver;
            chart.ChartAreas[0].AxisY.MinorGrid.LineColor = Color.Silver;

            if (isPorcentagem)
            {
                chart.ChartAreas[0].AxisY.LabelStyle.Format = "P1";
            }

            chart.ChartAreas[0].AxisY2.MajorGrid.LineColor = Color.Silver;
            chart.ChartAreas[0].AxisY2.MinorGrid.LineColor = Color.Silver;

            chart.ChartAreas[0].AxisX2.MajorGrid.LineColor = Color.Silver;
            chart.ChartAreas[0].AxisX2.MinorGrid.LineColor = Color.Silver;

            chart.ChartAreas[0].AxisX.MajorGrid.LineColor = Color.Silver;
            chart.ChartAreas[0].AxisX.MinorGrid.LineColor = Color.Silver;
            #endregion

            #region Series
            chart.Series.Clear();

            string serie = "Series";
            chart.Series.Add(serie);

            chart.Series[serie].ShadowOffset = 0;
            chart.Series[serie].Type         = Dundas.Charting.WebControl.SeriesChartType.Line;
            chart.Series[serie].MarkerStyle  = MarkerStyle.Circle;

            chart.ChartAreas[0].AxisY.Interval = 0.0;
            chart.ChartAreas[0].AxisY.Maximum  = limiteGrafico;

            for (int i = 0; i <= valorXY.GetUpperBound(0); i++)
            {
                chart.Series[serie].Points.AddXY(i + 1, double.Parse(valorXY[i, 0]));

                chart.Series[serie].Points[chart.Series[serie].Points.Count - 1].Label      = valorXY[i, 1];
                chart.Series[serie].Points[chart.Series[serie].Points.Count - 1].LegendText = valorXY[i, 2];
                chart.Series[serie].Points[chart.Series[serie].Points.Count - 1].AxisLabel  = valorXY[i, 2];
            }

            chart.ChartAreas[0].AxisX.Title     = labelX;
            chart.ChartAreas[0].AxisX.TitleFont = new Font("Arial", 10, FontStyle.Bold);

            chart.ChartAreas[0].AxisY.Title     = labelY;
            chart.ChartAreas[0].AxisY.TitleFont = new Font("Arial", 10, FontStyle.Bold);

            chart.DataBind();
            #endregion

            return(chart);
        }
예제 #5
0
        public Chart GerarGraficoPizza(string[,] valorXY)
        {
            Chart chart = new Dundas.Charting.WebControl.Chart();

            #region configuração
            //chart.AnimationDuration = 3;
            //chart.ImageType = ChartImageType.Flash;
            chart.ImageType       = ChartImageType.Jpeg;
            chart.Height          = new Unit("232px");
            chart.Width           = new Unit("560px");
            chart.BorderLineWidth = 0;
            //chart.AnimationTheme = AnimationTheme.Fading;
            chart.BorderLineColor      = Color.Black;
            chart.BackColor            = (Color)(new ColorConverter().ConvertFromString("#EEF2F4"));
            chart.BackGradientEndColor = Color.White;
            chart.Palette = ChartColorPalette.Dundas;
            #endregion

            #region legenda

            chart.Legends.Add("default1");
            chart.Legends[0].Enabled = false;

            /*
             * chart.Legends[0].BorderColor = Color.Black;
             * chart.Legends[0].BackColor = Color.Transparent;
             * chart.Legends[0].Alignment = StringAlignment.Center;
             */

            #endregion

            #region BorderSkin
            chart.BorderSkin.FrameBackColor            = Color.MediumTurquoise;
            chart.BorderSkin.FrameBackGradientEndColor = Color.Teal;
            chart.BorderSkin.PageColor = Color.AliceBlue;
            #endregion

            #region ChartAreas
            chart.ChartAreas.Add("default1");
            chart.ChartAreas[0].BorderColor          = Color.Transparent;
            chart.ChartAreas[0].BorderStyle          = ChartDashStyle.Solid;
            chart.ChartAreas[0].BackColor            = Color.Transparent;
            chart.ChartAreas[0].Area3DStyle.Enable3D = true;
            chart.ChartAreas[0].Area3DStyle.YAngle   = 63;
            chart.ChartAreas[0].Area3DStyle.XAngle   = 53;
            #endregion

            #region Series
            chart.Series.Clear();
            chart.Series.Add("Series1");
            chart.Series["Series1"].Type             = Dundas.Charting.WebControl.SeriesChartType.Pie;
            chart.Series["Series1"].ShowLabelAsValue = true;
            chart.Series["Series1"].ShowInLegend     = false;
            chart.Series["Series1"].CustomAttributes = "LabelStyle=Outside";

            for (int i = 0; i <= valorXY.GetUpperBound(0); i++)
            {
                chart.Series["Series1"].Points.AddY(int.Parse(valorXY[i, 0]));
                chart.Series["Series1"].Points[chart.Series["Series1"].Points.Count - 1].Label = valorXY[i, 2] + System.Environment.NewLine + valorXY[i, 1];
            }

            chart.DataBind();
            #endregion

            return(chart);
        }
예제 #6
0
        public Chart GerarGraficoColuna(string[, ,] valorXY, bool isPorcentagem, double maior_valor)
        {
            Chart chart = new Dundas.Charting.WebControl.Chart();

            #region configuração
            chart.ImageType            = ChartImageType.Jpeg;
            chart.Height               = new Unit("332px");
            chart.Width                = new Unit("900px");
            chart.BorderLineWidth      = 0;
            chart.BorderLineColor      = Color.Transparent;
            chart.BackColor            = (Color)(new ColorConverter().ConvertFromString("#EEF2F4"));
            chart.BackGradientEndColor = Color.White;
            chart.Palette              = ChartColorPalette.Dundas;
            #endregion

            #region legenda

            chart.Legends.Add("default1");
            chart.Legends[0].Enabled = true;

            /*chart.Legends[0].Position.Y = float.Parse(chart.Height.Value.ToString()) - (chart.Legends[0].Position.Height + 10);
             * chart.Legends[0].Position.X = (float.Parse(chart.Width.Value.ToString()) - (chart.Legends[0].Position.Width + 10))/2;
             * chart.Legends[0].Position.Width = float.Parse( chart.Width.Value.ToString());*/


            chart.Legends[0].BorderColor = Color.Black;
            chart.Legends[0].BackColor   = Color.Transparent;
            chart.Legends[0].Alignment   = StringAlignment.Center;

            #endregion

            #region BorderSkin
            chart.BorderSkin.FrameBackColor            = Color.MediumTurquoise;
            chart.BorderSkin.FrameBackGradientEndColor = Color.Teal;
            chart.BorderSkin.PageColor = Color.AliceBlue;
            #endregion

            #region ChartAreas
            chart.ChartAreas.Add("default1");
            chart.ChartAreas[0].BorderStyle  = ChartDashStyle.NotSet;
            chart.ChartAreas[0].BackColor    = Color.White;
            chart.ChartAreas[0].ShadowOffset = 2;

            chart.ChartAreas[0].Area3DStyle.Enable3D  = true;
            chart.ChartAreas[0].Area3DStyle.YAngle    = 15;
            chart.ChartAreas[0].Area3DStyle.XAngle    = 15;
            chart.ChartAreas[0].Area3DStyle.WallWidth = 2;

            chart.ChartAreas[0].AxisY.MajorGrid.LineColor = Color.Silver;
            chart.ChartAreas[0].AxisY.MinorGrid.LineColor = Color.Silver;

            if (isPorcentagem)
            {
                chart.ChartAreas[0].AxisY.LabelStyle.Format = "P0";
                chart.ChartAreas[0].AxisY.Interval          = 10;

                if (maior_valor > 70)
                {
                    chart.ChartAreas[0].AxisY.Maximum = 100;
                }
            }

            chart.ChartAreas[0].AxisY2.MajorGrid.LineColor = Color.Silver;
            chart.ChartAreas[0].AxisY2.MinorGrid.LineColor = Color.Silver;

            chart.ChartAreas[0].AxisX2.MajorGrid.LineColor = Color.Silver;
            chart.ChartAreas[0].AxisX2.MinorGrid.LineColor = Color.Silver;

            chart.ChartAreas[0].AxisX.MajorGrid.LineColor = Color.Silver;
            chart.ChartAreas[0].AxisX.MinorGrid.LineColor = Color.Silver;
            chart.ChartAreas[0].AxisX.Interval            = 1;
            #endregion

            #region Series
            chart.Series.Clear();

            for (int i = 0; i <= valorXY.GetUpperBound(0); i++)
            {
                string serie = "Series" + i.ToString();

                chart.Series.Add(serie);

                chart.Series[serie].ShadowOffset = 2;
                chart.Series[serie].Type         = Dundas.Charting.WebControl.SeriesChartType.Column;

                switch (i)
                {
                case 0:
                    chart.Series[serie].LegendText = "Inscritas";
                    break;

                case 1:
                    chart.Series[serie].LegendText = "Candidatas";
                    break;

                case 2:
                    chart.Series[serie].LegendText = "Classificadas";
                    break;

                case 3:
                    chart.Series[serie].LegendText = "Finalistas Gestão";
                    break;

                case 4:
                    chart.Series[serie].LegendText = "Finalistas Responsabilidade Social";
                    break;

                case 5:
                    chart.Series[serie].LegendText = "Finalistas Inovação";
                    break;

                case 6:
                    chart.Series[serie].LegendText = "Vencedora Gestão";
                    break;

                case 7:
                    chart.Series[serie].LegendText = "Vencedora Responsabilidade Social";
                    break;

                case 8:
                    chart.Series[serie].LegendText = "Vencedora Inovação";
                    break;
                }

                for (int j = 0; j <= valorXY.GetUpperBound(1); j++)
                {
                    if (!string.IsNullOrEmpty(valorXY[i, j, 0]))
                    {
                        chart.Series[serie].Points.AddXY(j + 1, double.Parse(valorXY[i, j, 0]));//(int.Parse(valorXY[i, 0]) == 0 ? 1 : int.Parse(valorXY[i, 0])));
                    }
                    else
                    {
                        chart.Series[serie].Points.AddXY(j + 1, 0);
                    }

                    chart.Series[serie].Points[chart.Series[serie].Points.Count - 1].Label = valorXY[i, j, 1];


                    if (valorXY[i, j, 2] != "")
                    {
                        chart.Series[serie].Points[chart.Series[serie].Points.Count - 1].AxisLabel = valorXY[i, j, 2];
                    }

                    if (valorXY.GetUpperBound(2) == 3)
                    {
                        chart.Series[serie].Points[chart.Series[serie].Points.Count - 1].ToolTip = valorXY[i, j, 3];
                    }
                    else
                    {
                        chart.Series[serie].Points[chart.Series[serie].Points.Count - 1].ToolTip = valorXY[i, j, 1];
                    }
                }
            }

            chart.DataBind();
            #endregion

            return(chart);
        }
예제 #7
0
    private void SetKpiStatusGraph2()
    {
        MicroBSC.BSC.Biz.Biz_Bsc_Score_Card objBSC = new MicroBSC.BSC.Biz.Biz_Bsc_Score_Card();

        DataSet       dsGraph  = new DataSet();
        List <string> listYMDs = new List <string>();

        Dundas.Charting.WebControl.Chart objChart = this.chtPart;

        //dsGraph = TempData3();

        //관점별 1년치데이타
        foreach (string str in GetBeforeMonth(listYMDs))
        {
            dsGraph.Merge(objBSC.GetEstDeptKpiViewTypeList
                              (this.IEstTermRefID
                              , str
                              , this.ISumType
                              , this.IEstDeptID));
        }

        dsGraph.AcceptChanges();
        dsGraph = this.ModifyData(dsGraph);

        if (dsGraph.Tables[0].Rows.Count > 0)
        {
            DundasCharts.DundasChartBase(objChart
                                         , Dundas.Charting.WebControl.ChartImageType.Flash
                                         , 680, 180
                                         , Dundas.Charting.WebControl.BorderSkinStyle.None
                                         , Color.FromArgb(181, 64, 1)
                                         , 1
                                         , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                         , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                         , Color.FromArgb(0x20, 0x80, 0xD0)
                                         , Dundas.Charting.WebControl.ChartDashStyle.Solid
                                         , -1
                                         , Dundas.Charting.WebControl.ChartHatchStyle.None
                                         , Dundas.Charting.WebControl.GradientType.TopBottom
                                         , Dundas.Charting.WebControl.AntiAliasing.None);

            objChart.DataSource = dsGraph;
            objChart.Series.Clear();

            MicroBSC.BSC.Biz.Biz_Bsc_View_Info objViewInfo = new MicroBSC.BSC.Biz.Biz_Bsc_View_Info();
            DataSet rDs = objViewInfo.GetAllList();

            if (rDs.Tables != null && rDs.Tables[0].Rows.Count == 4)
            {
                Dundas.Charting.WebControl.Series series1 = DundasCharts.CreateSeries(objChart, "sp1", "AreaView", rDs.Tables[0].Rows[0]["VIEW_NAME"].ToString(), null, Dundas.Charting.WebControl.SeriesChartType.Line, 1, Color.FromArgb(240, 224, 64, 10), Color.FromArgb(180, 26, 59, 105), Color.Transparent, 1, 5, Color.FromArgb(64, 64, 64));
                Dundas.Charting.WebControl.Series series2 = DundasCharts.CreateSeries(objChart, "sp2", "AreaView", rDs.Tables[0].Rows[1]["VIEW_NAME"].ToString(), null, Dundas.Charting.WebControl.SeriesChartType.Line, 1, Color.FromArgb(240, 192, 192, 192), Color.FromArgb(180, 26, 59, 105), Color.Transparent, 1, 5, Color.FromArgb(64, 64, 64));
                Dundas.Charting.WebControl.Series series3 = DundasCharts.CreateSeries(objChart, "sp3", "AreaView", rDs.Tables[0].Rows[2]["VIEW_NAME"].ToString(), null, Dundas.Charting.WebControl.SeriesChartType.Line, 1, Color.FromArgb(240, 65, 140, 240), Color.FromArgb(180, 26, 59, 105), Color.Transparent, 1, 5, Color.FromArgb(64, 64, 64));

                Dundas.Charting.WebControl.Series series4 = DundasCharts.CreateSeries(objChart, "sp4", "AreaView", rDs.Tables[0].Rows[3]["VIEW_NAME"].ToString(), null, Dundas.Charting.WebControl.SeriesChartType.Line, 1, Color.FromArgb(240, 252, 180, 65), Color.FromArgb(180, 26, 59, 105), Color.Transparent, 1, 5, Color.FromArgb(64, 64, 64));

                series1.MarkerStyle       = Dundas.Charting.WebControl.MarkerStyle.Circle;
                series2.MarkerStyle       = Dundas.Charting.WebControl.MarkerStyle.Circle;
                series3.MarkerStyle       = Dundas.Charting.WebControl.MarkerStyle.Circle;
                series4.MarkerStyle       = Dundas.Charting.WebControl.MarkerStyle.Circle;
                series1.MarkerBorderColor = Color.FromArgb(240, 224, 64, 10);
                series1.MarkerColor       = Color.FromArgb(240, 224, 64, 10);
                series2.MarkerBorderColor = Color.FromArgb(240, 192, 192, 192);
                series2.MarkerColor       = Color.FromArgb(240, 192, 192, 192);
                series3.MarkerBorderColor = Color.FromArgb(240, 65, 140, 240);
                series3.MarkerColor       = Color.FromArgb(240, 65, 140, 240);
                series4.MarkerBorderColor = Color.FromArgb(240, 252, 180, 65);
                series4.MarkerColor       = Color.FromArgb(240, 252, 180, 65);

                series1.ValueMembersY = "ACHV_RATE1";
                series2.ValueMembersY = "ACHV_RATE2";
                series3.ValueMembersY = "ACHV_RATE3";
                series4.ValueMembersY = "ACHV_RATE4";
                series1.ValueMemberX  = "YMD";

                foreach (Dundas.Charting.WebControl.Series series in objChart.Series)
                {
                    //objChart.ChartAreas[objChart.Series[series.Name].ChartArea].AxisX.Margin = false;
                    //objChart.ChartAreas[objChart.Series[series.Name].ChartArea].AxisY2.Enabled = AxisEnabled.False;
                    //objChart.ChartAreas[objChart.Series[series.Name].ChartArea].AxisY.Interval = 30;
                    //series.Url = HttpContext.Current.Request.Url.ToString().Substring(0, HttpContext.Current.Request.Url.ToString().LastIndexOf('/')) + "/BSC0404S1.ASPX";
                }

                DundasAnimations.DundasChartBase(objChart, AnimationTheme.None, -1, -1, false, 1);
                DundasAnimations.GrowingAnimation(objChart, series1, 0.5, 2.0, true);
                DundasAnimations.GrowingAnimation(objChart, series2, 0.5, 2.0, true);
                DundasAnimations.GrowingAnimation(objChart, series3, 0.5, 2.0, true);
                DundasAnimations.GrowingAnimation(objChart, series4, 0.5, 2.0, true);

                objChart.DataBind();
            }
        }
    }
예제 #8
0
    //private void SetResultGrid()
    //{

    //    Biz_Bsc_Kpi_Info objBSC = new Biz_Bsc_Kpi_Info();



    //    DataSet ds = objBSC.GetKpiListForResultAnalysis(this.IEstTermRefID
    //                                                                   , this.IYmd
    //                                                                   , ""
    //                                                                   , ""
    //                                                                   , ""
    //                                                                   , ""
    //                                                                   , this.IDeptID
    //                                                                   , 1 // 우수
    //                                                                   , this.ISumType
    //                                                                   , ""
    //                                                                   , "");

    //    if (ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
    //    {
    //        ds.Tables[0].Columns.Add("RANK", typeof(int));
    //        ds.Tables[0].Columns.Add("SORT_TYPE", typeof(string));

    //        DataTable dataTable = null;

    //        // 순위정렬 성격에 따라 처리 내용
    //        dataTable = PageUtility.FilterSortData(ds.Tables[0], "", "ACHIEVE_RATE_DIFF DESC");
    //        SetRowNum(dataTable, "H");

    //        // DataRow 삭제
    //        DeleteExtraRowsByRowNum(dataTable, 10);

    //        ugrdResultStatus.Clear();
    //        ugrdResultStatus.DataSource = dataTable;
    //        ugrdResultStatus.DataBind();
    //    }

    //}

    private void SetKpiStatusGraph()
    {
        this.SetParameter();

        MicroBSC.BSC.Biz.Biz_Bsc_Kpi_Dashboard objBSC = new MicroBSC.BSC.Biz.Biz_Bsc_Kpi_Dashboard();
        DataSet rDs = objBSC.GetAllList(this.IEstTermRefID);

        int cntRow = 0;
        int cntCol = 0;


        int    intEsttermRefID = 0;
        int    intKpiRefID     = 0;
        string strTrendType    = "";
        string strKpiName      = "";
        string strTypeName     = "";

        cntRow = rDs.Tables[0].Rows.Count;
        cntCol = rDs.Tables[0].Columns.Count;
        Dundas.Charting.WebControl.Chart objChart = null;

        for (int i = 0; i < cntRow; i++)
        {
            intEsttermRefID = Convert.ToInt32(rDs.Tables[0].Rows[i]["ESTTERM_REF_ID"].ToString());
            intKpiRefID     = Convert.ToInt32(rDs.Tables[0].Rows[i]["KPI_REF_ID"].ToString());
            strTrendType    = Convert.ToString(rDs.Tables[0].Rows[i]["SELECT_TYPE"].ToString());
            strKpiName      = Convert.ToString(rDs.Tables[0].Rows[i]["KPI_NAME"].ToString());
            strTypeName     = Convert.ToString(rDs.Tables[0].Rows[i]["SELECT_TYPE_NAME"].ToString());

            DataSet dsGraph = objBSC.GetDashBoardForKpiAnalysis(intEsttermRefID, intKpiRefID, "00000000", this.IYmd, this.ISumType);
            //DataSet dsGraph = objBSC.GetDashBoardForKpiAnalysis(intEsttermRefID, intKpiRefID, this.IYmd, "99999999", this.ISumType);



            switch (i)
            {
            case 0:
                objChart         = chtKPI1;
                objChart.Visible = true;
                break;

            case 1:
                objChart         = chtKPI2;
                objChart.Visible = true;
                break;

            case 2:
                objChart         = chtKPI3;
                objChart.Visible = true;
                break;

            case 3:
                objChart         = chtKPI4;
                objChart.Visible = true;
                break;

            case 4:
                objChart         = chtKPI5;
                objChart.Visible = true;
                break;

            case 5:
                objChart         = chtKPI6;
                objChart.Visible = true;
                break;

            default:
                return;
            }

            DundasCharts.DundasChartBase(objChart
                                         , Dundas.Charting.WebControl.ChartImageType.Flash
                                         , 400, 200
                                         , Dundas.Charting.WebControl.BorderSkinStyle.None
                                         , Color.FromArgb(181, 64, 1)
                                         , 0
                                         , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                         , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                         , Color.FromArgb(0x20, 0x80, 0xD0)
                                         , Dundas.Charting.WebControl.ChartDashStyle.Solid
                                         , -1
                                         , Dundas.Charting.WebControl.ChartHatchStyle.None
                                         , Dundas.Charting.WebControl.GradientType.TopBottom
                                         , Dundas.Charting.WebControl.AntiAliasing.None);

            //MSCharts.DundasChartBase(objChart, ChartImageType.Jpeg, 400, 300
            //    , BorderSkinStyle.Emboss, Color.FromArgb(26, 59, 105), 2
            //    , Color.FromArgb(211, 223, 240)
            //    , Color.FromArgb(255, 255, 255), Color.FromArgb(37, 58, 118), ChartDashStyle.Solid
            //    , -1
            //    , ChartHatchStyle.None, MsGradientType.TopBottom, MsAntiAliasing.None);



            objChart.DataSource = dsGraph;

            Dundas.Charting.WebControl.Series series1 = DundasCharts.CreateSeries(objChart, objChart.ChartAreas[0].Name,
                                                                                  "Default",
                                                                                  strKpiName, null, Dundas.Charting.WebControl.SeriesChartType.Column, 1,
                                                                                  GetSignalColor(i), GetChartColor2(i), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));


            objChart.ChartAreas[0].AxisX.Interval = 1;

            string strHerf = HttpContext.Current.Request.Url.ToString().Substring(0, HttpContext.Current.Request.Url.ToString().LastIndexOf('/')) + "/BSC0304S2.aspx?ESTTERM_REF_ID=" + intEsttermRefID.ToString() + "&KPI_REF_ID=" + intKpiRefID.ToString() + "&YMD=" + this.IYmd;


            series1.Color        = GetChartColor2(i);
            series1.BorderWidth  = 0;
            series1.ShadowOffset = 0;
            //series1.BorderColor = GetChartColor2(0);
            series1.Label = "#VALY{N0}";

            series1.ValueMembersY = "RESULT_VALUE";
            series1.ValueMemberX  = "YMD";


            series1.ToolTip = "#VALY{N0}";

            objChart.Series[objChart.ChartAreas[0].Name]["PointWidth"] = "0.5";

            //string sChartArea2 = chart.Series[series2.Name].ChartArea;
            //chart.ChartAreas[sChartArea2].AxisY.LabelStyle.Format = "P0";
            //chart.ChartAreas[sChartArea2].AxisY.IsStartedFromZero = false;
            //chart.ChartAreas[sChartArea2].AxisX.IsMarginVisible = true;
            //chart.ChartAreas[sChartArea2].AxisY2.Enabled = AxisEnabled.False;

            //DoSettingChartStyles(chart,"#%");

            // Show as 3D
            //if (rdoChartType.SelectedIndex == 0)
            //    chart.ChartAreas[sChartArea2].Area3DStyle.Enable3D = false;
            //else
            //    chart.ChartAreas[sChartArea2].Area3DStyle.Enable3D = true;

            DundasAnimations.DundasChartBase(objChart, AnimationTheme.None, -1, -1, false, 1);
            DundasAnimations.GrowingAnimation(objChart, series1, 0.5, 2.0, true);

            objChart.DataBind();

            dsGraph = null;

            objChart = null;
        }
    }