private void SetResutlGraph(DataSet iDs)
    {
        DataSet dsGrph = iDs.Copy();

        dsGrph.Tables[0].Columns.Add("GR_RATE_MS", typeof(double));
        dsGrph.Tables[0].Columns.Add("GR_RATE_TS", typeof(double));

        for (int i = 0; i < dsGrph.Tables[0].Rows.Count; i++)
        {
            if (dsGrph.Tables[0].Rows[i]["AC_RATE_MS"].ToString() == "-")
            {
                dsGrph.Tables[0].Rows[i]["AC_RATE_MS"] = "0";
            }
            dsGrph.Tables[0].Rows[i]["GR_RATE_MS"] = Convert.ToDouble(dsGrph.Tables[0].Rows[i]["AC_RATE_MS"].ToString());

            if (dsGrph.Tables[0].Rows[i]["AC_RATE_TS"].ToString() == "-")
            {
                dsGrph.Tables[0].Rows[i]["AC_RATE_TS"] = "0";
            }
            dsGrph.Tables[0].Rows[i]["GR_RATE_TS"] = Convert.ToDouble(dsGrph.Tables[0].Rows[i]["AC_RATE_TS"].ToString());
        }

        // 당월그래프
        MSCharts.DundasChartBase(chartMM, ChartImageType.Jpeg, 385, 230
                                 , BorderSkinStyle.Emboss, ChartBorderLineColor, 2
                                 , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                 , Color.FromArgb(0xFF, 0xFF, 0xFE), Color.FromArgb(0x20, 0x80, 0xD0), ChartDashStyle.Solid
                                 , -1
                                 , ChartHatchStyle.None, MsGradientType.TopBottom, MsAntiAliasing.None);

        chartMM.DataSource = dsGrph;

        Series series1 = MSCharts.CreateSeries(chartMM, "serPlan", "Default", "계획", null, SeriesChartType.Column, 1, GetChartColor2(0), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
        Series series2 = MSCharts.CreateSeries(chartMM, "serActl", "Default", "실적", null, SeriesChartType.Column, 1, GetChartColor2(1), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
        Series series3 = MSCharts.CreateSeries(chartMM, "serRate", "Default", (kpiType == "BTY" ? "한계초과율" : "달성율"), null, SeriesChartType.Line, 1, GetChartColor2(2), GetChartColor2(2), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));

        series3.YAxisType = AxisType.Secondary;

        series1.YValueMembers = "TARGET_MS";
        series2.YValueMembers = "RESULT_MS";
        series3.YValueMembers = "GR_RATE_MS";
        series1.XValueMember  = "MM";

        series1.ToolTip = "#VALY{N0}";
        series2.ToolTip = "#VALY{N0}";
        series3.ToolTip = "#VALY{P0}";

        string sChartArea = chartMM.Series[series2.Name].ChartArea;

        chartMM.ChartAreas[sChartArea].AxisY.LabelStyle.Format  = "N0";
        chartMM.ChartAreas[sChartArea].AxisY2.LabelStyle.Format = "P0";

        //DundasAnimations.DundasChartBase(chartMM, AnimationTheme.None, -1, -1, false, 1);
        //DundasAnimations.GrowingAnimation(chartMM, series1, 1.0, 1.0, true);
        //DundasAnimations.GrowingAnimation(chartMM, series2, 2.0, 2.0, true);
        //DundasAnimations.GrowingAnimation(chartMM, series3, 2.0, 1.0, true);

        chartMM.DataBind();
    }
Beispiel #2
0
    // 전사 현재월 등급구성비
    public void SetEntGradeRate(Chart iChart)
    {
        MicroBSC.BSC.Biz.Biz_Bsc_Score_Card objBSC = new MicroBSC.BSC.Biz.Biz_Bsc_Score_Card();
        DataSet dsGrd = objBSC.GetKpiEntGradeStatus
                            (this.IYmd
                            , this.IYmd
                            , this.ISumType
                            , this.IEstDeptID);

        MSCharts.GetDefaultChart(iChart, ChartImageType.Jpeg, 230, chartHeight, true, false, true);
        ChartArea FstChtArea = iChart.ChartAreas[0];

        FstChtArea.Position.Auto = true;

        string sTitle = PageUtility.GetByTextDropDownList(ddlMonthInfo) + " 현재 지표등급 구성비";

        MSCharts.CreateTitle(iChart, sTitle);


        if (dsGrd.Tables[0].Rows.Count > 0)
        {
            Series serCRate = MSCharts.CreateSeries(iChart, "serA", iChart.ChartAreas[0].Name, "달성율", null, SeriesChartType.Pie, 0, GetChartColor(0), Color.FromArgb(chartHeight, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
            iChart.DataSource = dsGrd;

            iRow = dsGrd.Tables[0].Rows.Count;
            for (int i = 0; i < iRow; i++)
            {
                string sValue = dsGrd.Tables[0].Rows[i]["COMP_RATE"].ToString();
                string sColor = dsGrd.Tables[0].Rows[i]["THRESHOLD_COLOR"].ToString();
                serCRate.Points.Add(double.Parse(sValue));
                serCRate.Points[i].Color = ColorTranslator.FromHtml(sColor);
                if (sValue.IndexOf('.') > 0)
                {
                    serCRate.Points[i].Label = sValue.Substring(0, sValue.IndexOf('.')) + "%";
                }
                else
                {
                    serCRate.Points[i].Label = sValue + "%";
                }
            }

            //serCRate.ToolTip = "X value \t= #VALX{d}\nY value \t= #VALY{C}\nRadius \t= #VALY2{P}";
            serCRate.ToolTip = "#VALY{P}";
        }
    }
Beispiel #3
0
    public void SetEntStatus(Chart iChart)
    {
        //전사점수
        Biz_Bsc_Score_Card objBSC  = new Biz_Bsc_Score_Card();
        DataSet            dsScore = objBSC.GetEstDeptTotalScore(this.IEstTermRefID, this.IYmd, this.ISumType, this.IEstDeptID);

        if (dsScore.Tables.Count > 0)
        {
            if (dsScore.Tables[0].Rows.Count > 0)
            {
                lblEntScore.Text = Math.Round(decimal.Parse(dsScore.Tables[0].Rows[0]["POINT"].ToString()), 0).ToString();
            }
        }
        else
        {
            lblEntScore.Text = "0";
        }

        // 관점별 달성도
        DataSet dsViw = objBSC.GetEstDeptKpiViewTypeList(this.IEstTermRefID, this.IYmd, this.ISumType, this.IEstDeptID);

        MSCharts.GetDefaultChart(iChart, ChartImageType.Jpeg, 300, 178, true, false, true);
        //iChart.Titles.Add("전사 관점별 달성도", Docking.Top);

        iRow = dsViw.Tables[0].Rows.Count;

        if (iRow > 0)
        {
            Series serARate = MSCharts.CreateSeries(iChart, "1", iChart.ChartAreas[0].Name, "달성율", null, SeriesChartType.Bar, 0, GetChartColor(0), Color.FromArgb(chartHeight, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));

            dsViw.Tables[0].DefaultView.Sort = "VIEW_REF_ID desc";
            iChart.DataSource      = dsViw.Tables[0].DefaultView;
            serARate.YValueMembers = "ACHV_RATE";
            serARate.XValueMember  = "VIEW_NAME";
            iChart.DataBind();

            for (int i = 0; i < serARate.Points.Count; i++)
            {
                serARate.Points[i].Color = GetChartColor(i);
            }

            serARate.ToolTip = "#VALY{P}";
        }
    }
    private void DoDrawingJunsaChart1(DataTable dtChart, Chart chart)
    {
        // 당월그래프
        MSCharts.DundasChartBase(chart
                                 , ChartImageType.Jpeg
                                 , 340
                                 , 250
                                 , 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
                                 , MsGradientType.Center
                                 , MsAntiAliasing.Graphics);

        chart.DataSource = dtChart;

        Series series1 = MSCharts.CreateSeries(chart, "serPlan", "Default", "목표", null, SeriesChartType.Column, 1, GetChartColor2(0), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
        Series series2 = MSCharts.CreateSeries(chart, "serActl", "Default", "실적", null, SeriesChartType.Column, 1, GetChartColor2(1), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));

        //Series series3 = MSCharts.CreateSeries(chart, "serPlan", "Default", "목표", null, SeriesChartType.Column, 1, GetChartColor2(0), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
        //Series series4 = MSCharts.CreateSeries(chart, "serActl", "Default", "실적", null, SeriesChartType.Column, 1, GetChartColor2(1), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
        //Series series5 = MSCharts.CreateSeries(chart, "serActl", "Default", "실적", null, SeriesChartType.Column, 1, GetChartColor2(1), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
        //Series series6 = MSCharts.CreateSeries(chart, "serActl", "Default", "실적", null, SeriesChartType.Column, 1, GetChartColor2(1), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
        //Series series2 = MSCharts.CreateSeries(chart, "serActl", "Default", "실적", null, SeriesChartType.Line, 1, GetChartColor2(2), GetChartColor2(2), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));

        series1.YValueMembers = "TARGET_TS";
        series2.YValueMembers = "RESULT_TS";
        series1.XValueMember  = "GRP_THREE_NAME";

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

        string sChartArea = chart.Series[series2.Name].ChartArea;

        chart.ChartAreas[sChartArea].AxisY.LabelStyle.Format  = "N0";
        chart.ChartAreas[sChartArea].AxisY2.LabelStyle.Format = "N0";

        chart.DataBind();
    }
Beispiel #5
0
    // 전사 관점별 경고지표 구성비
    public void SetEntGradeView(Chart iChart)
    {
        MSCharts.GetDefaultChart(iChart, ChartImageType.Jpeg, 230, chartHeight, true, false, true);
        ChartArea FstChtArea = iChart.ChartAreas[0];

        FstChtArea.Position.Auto = true;

        string sTitle = PageUtility.GetByTextDropDownList(ddlMonthInfo) + " 현재 위험지표 구성비";

        MSCharts.CreateTitle(iChart, sTitle);

        if (this.IThresholdRefID < 1)
        {
            return;
        }

        MicroBSC.BSC.Biz.Biz_Bsc_Score_Card objBSC = new MicroBSC.BSC.Biz.Biz_Bsc_Score_Card();
        DataSet dsGrd = objBSC.GetKpiEntGradeAlert
                            (this.IEstTermRefID
                            , this.IYmd
                            , this.ISumType
                            , this.IThresholdRefID);

        if (dsGrd.Tables[0].Rows.Count > 0)
        {
            Series serCRate = MSCharts.CreateSeries(iChart, "serA", iChart.ChartAreas[0].Name, "달성율", null, SeriesChartType.Pie, 0, GetChartColor(0), Color.FromArgb(chartHeight, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
            iChart.DataSource = dsGrd;

            iRow = dsGrd.Tables[0].Rows.Count;
            for (int i = 0; i < iRow; i++)
            {
                string sValue = dsGrd.Tables[0].Rows[i]["COMP_RATE"].ToString();
                string sText  = dsGrd.Tables[0].Rows[i]["VIEW_NAME"].ToString();
                serCRate.Points.Add(double.Parse(sValue));
                serCRate.Points[i].Color = GetChartColor(i);
                serCRate.Points[i].Label = sText;
            }

            //serCRate.ToolTip = "X value \t= #VALX{d}\nY value \t= #VALY{C}\nRadius \t= #VALY2{P}";
            serCRate.ToolTip = "#VALY{P}";
        }
    }
    private void DoDrawingEtcChart(DataTable dtChart, Chart chart, int colorCode)
    {
        string url = string.Empty;

        string xValue = DataTypeUtility.GetValue(dtChart.Rows[0]["GRP_TWO_NAME"]);


        // 당월그래프
        MSCharts.DundasChartBase(chart
                                 , ChartImageType.Jpeg
                                 , ChartWidth
                                 , ChartHeight
                                 , BorderSkinStyle.Emboss
                                 , ChartBorderLineColor
                                 , 1
                                 , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                 , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                 , Color.FromArgb(0x20, 0x80, 0xD0)
                                 , ChartDashStyle.Solid
                                 , -1
                                 , ChartHatchStyle.None
                                 , MsGradientType.TopBottom
                                 , MsAntiAliasing.None);

        chart.DataSource = dtChart;

        Series series1 = MSCharts.CreateSeries(chart
                                               , "ME1"
                                               , "Default"
                                               , "매출(목표)"
                                               , null
                                               , SeriesChartType.Column
                                               , 1
                                               , GetChartColor2(0)
                                               , Color.FromArgb(180, 26, 59, 105)
                                               , Color.FromArgb(64, 0, 0, 0)
                                               , 1
                                               , 9
                                               , Color.FromArgb(64, 64, 64));

        Series series2 = MSCharts.CreateSeries(chart, "ME2", "Default", "매출(실적)", null, SeriesChartType.Column, 1, GetChartColor2(1), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));

        //Series series3 = MSCharts.CreateSeries(chart, "YG1", "Default", "영업(목표)", null, SeriesChartType.Line, 1, GetChartColor2(4), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
        Series series4 = MSCharts.CreateSeries(chart, "YG2", "Default", "영업(실적)", null, SeriesChartType.Line, 1, GetChartColor2(13), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));



        //series1.IsValueShownAsLabel = true;
        //series1.MarkerStyle = MarkerStyle.Circle;
        //series1.MarkerColor = Color.Magenta;
        //series1.MarkerSize = 3;
        //series1.Label = "#VALY{N0}";

        //series2.IsValueShownAsLabel = true;
        //series2.MarkerStyle = MarkerStyle.Circle;
        //series2.MarkerColor = Color.Magenta;
        //series2.MarkerSize = 3;
        //series2.Label = "#VALY{N0}";

        //series3.IsValueShownAsLabel = true;
        //series3.MarkerStyle = MarkerStyle.Circle;
        //series3.MarkerColor = Color.Magenta;
        //series3.MarkerSize = 3;
        //series3.Label = "#VALY{N0}";

        series4.YAxisType   = AxisType.Secondary;
        series4.BorderWidth = 3;

        series4.IsValueShownAsLabel = true;
        series4.MarkerStyle         = MarkerStyle.Circle;
        series4.MarkerColor         = Color.Magenta;
        series4.MarkerSize          = 3;
        series4.Label = "#VALY{N0}";


        series1.YValueMembers = "ME_TARGET_TS";
        series2.YValueMembers = "ME_RESULT_TS";
        //series3.YValueMembers = "YG_TARGET_TS";
        series4.YValueMembers = "YG_RESULT_TS";
        series1.XValueMember  = "GRP_TWO_NAME";



        series1.ToolTip = "#VALY{N0}";
        series2.ToolTip = "#VALY{N0}";
        //series3.ToolTip = "#VALY{N0}";
        series4.ToolTip = "#VALY{N0}";

        string sChartArea2 = chart.Series[series2.Name].ChartArea;

        chart.ChartAreas[sChartArea2].AxisY.LabelStyle.Format = "N0";
        chart.ChartAreas[sChartArea2].AxisY.Title             = "매출";

        chart.ChartAreas[sChartArea2].AxisY2.LabelStyle.Format = "N0";
        chart.ChartAreas[sChartArea2].AxisY2.Title             = "영업";

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

        chart.DataBind();
    }
    private void DoDrawingInPower(DataTable dtChart, Chart chart)
    {
        // 당월그래프
        MSCharts.DundasChartBase(chart
                                 , ChartImageType.Jpeg
                                 , ChartWidth
                                 , ChartHeight
                                 , BorderSkinStyle.Emboss
                                 , ChartBorderLineColor
                                 , 1
                                 , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                 , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                 , Color.FromArgb(0x20, 0x80, 0xD0)
                                 , ChartDashStyle.Solid
                                 , -1
                                 , ChartHatchStyle.None
                                 , MsGradientType.Center
                                 , MsAntiAliasing.Graphics);

        chart.DataSource = dtChart;

        string target = "-";

        if (dtChart.Rows.Count > 0)
        {
            target = DataTypeUtility.GetValue(dtChart.Rows[0]["TARGET_FULL_RATE"]);
        }


        Series series1 = MSCharts.CreateSeries(chart, "serPlan", "Default", string.Format("목표 가득율 ({0}%)", target), null, SeriesChartType.Line, 1, GetChartColor2(0), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
        Series series2 = MSCharts.CreateSeries(chart, "serActl", "Default", "가득율", null, SeriesChartType.Line, 1, GetChartColor2(1), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 8, Color.FromArgb(64, 64, 64), new Font("Trebuchet MS", 8));//Font="Trebuchet MS, 4pt, style=Bold">



        // Enable data points labels
        //series1.IsValueShownAsLabel = true;
        series2.IsValueShownAsLabel = true;

        series1.BorderWidth = 3;
        series1.BorderColor = GetChartColor2(0);


        // Set spline line tension
        series2["LineTension"] = "0.1";

        // Enable data points markers
        series2.MarkerStyle = MarkerStyle.Circle;
        series2.MarkerSize  = 5;
        series2.MarkerColor = Color.Magenta;

        series2.BorderWidth = 3;
        series2.BorderColor = GetChartColor2(1);

        series1.YValueMembers = "TARGET_FULL_RATE_001";
        series2.YValueMembers = "RESULT_FULL_RATE_001";
        series1.XValueMember  = "CR_MONTH_NAME";

        series2.Label = "#VALY{P0}";

        series1.ToolTip = "#VALY{P0}";
        series2.ToolTip = "#VALY{P0}";


        string sChartArea2 = chart.Series[series2.Name].ChartArea;

        chart.ChartAreas[sChartArea2].AxisY.LabelStyle.Format = "P0";
        chart.ChartAreas[sChartArea2].AxisX.IsMarginVisible   = true;
        chart.ChartAreas[sChartArea2].AxisY2.Enabled          = AxisEnabled.False;


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

        chart.DataBind();
    }
    private void DoDrawingJunsaChart2(DataTable dtChart, Chart chart)
    {
        // 당월그래프
        MSCharts.DundasChartBase(chart
                                 , ChartImageType.Jpeg
                                 , ChartWidth
                                 , ChartHeight
                                 , BorderSkinStyle.Emboss
                                 , GetChartColor2(0)
                                 , 4
                                 , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                 , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                 , Color.FromArgb(0x20, 0x80, 0xD0)
                                 , ChartDashStyle.Solid
                                 , -1
                                 , ChartHatchStyle.None
                                 , MsGradientType.Center
                                 , MsAntiAliasing.Graphics);

        chart.DataSource = dtChart;

        Series series1 = MSCharts.CreateSeries(chart, "serPlan", "Default", "목표", null, SeriesChartType.Line, 1, GetChartColor2(0), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64), new Font("Trebuchet MS", 8));
        Series series2 = MSCharts.CreateSeries(chart, "serActl", "Default", "실적", null, SeriesChartType.Line, 1, GetChartColor2(1), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64), new Font("Trebuchet MS", 8));

        // Enable data points labels
        series1.IsValueShownAsLabel = true;
        series2.IsValueShownAsLabel = true;

        series1.MarkerStyle = MarkerStyle.Circle;
        series1.MarkerSize  = 2;
        series1.MarkerColor = Color.Magenta;

        series1.BorderWidth = 3;
        series1.BorderColor = GetChartColor2(0);
        series1.Label       = "#VALY{N0}";


        // Enable data points markers
        series2.MarkerStyle = MarkerStyle.Circle;
        series2.MarkerSize  = 2;
        series2.MarkerColor = Color.Magenta;

        series2.BorderWidth = 3;
        series2.BorderColor = GetChartColor2(1);
        series2.Label       = "#VALY{N0}";

        series1.YValueMembers = "TARGET_TS";
        series2.YValueMembers = "RESULT_TS";
        series1.XValueMember  = "CR_MONTH_NAME";

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

        string sChartArea2 = chart.Series[series2.Name].ChartArea;

        chart.ChartAreas[sChartArea2].AxisY.LabelStyle.Format = "N0";
        chart.ChartAreas[sChartArea2].AxisX.IsMarginVisible   = true;
        chart.ChartAreas[sChartArea2].AxisY2.Enabled          = AxisEnabled.False;


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

        chart.DataBind();
    }
Beispiel #9
0
    private void DoCharting(int kpi_ref_id, string kpi_name)
    {
        chartMM.Visible  = true;
        chartDal.Visible = true;

        int chartWidth  = 500;
        int chartHeight = 250;


        lblKpiName1.Text = kpi_name;
        lblKpiName2.Text = kpi_name;

        MicroBSC.Integration.BSC.Biz.Biz_Bsc_Kpi_Target bizBscKpiTarget = new MicroBSC.Integration.BSC.Biz.Biz_Bsc_Kpi_Target();
        DataTable dtBscKpiTarget = bizBscKpiTarget.GetBscKpiTargetGoalTongMM_DB(IEstTermRefID
                                                                                , kpi_ref_id
                                                                                , "");

        // 목표 실적 그래프
        MSCharts.DundasChartBase(chartMM
                                 , ChartImageType.Jpeg
                                 , chartWidth
                                 , chartHeight
                                 , 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
                                 , MsGradientType.TopBottom
                                 , MsAntiAliasing.None);

        chartMM.DataSource = dtBscKpiTarget;

        Series series1 = MSCharts.CreateSeries(chartMM, "serTarget", "Default", "Target", null, SeriesChartType.Column, 1, GetChartColor(0), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
        Series series2 = MSCharts.CreateSeries(chartMM, "serGoal", "Default", "Goal", null, SeriesChartType.Column, 1, GetChartColor(1), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
        Series series3 = MSCharts.CreateSeries(chartMM, "serActl", "Default", "실적", null, SeriesChartType.Line, 1, GetChartColor(2), GetChartColor(2), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
        //series3.YAxisType = AxisType.Secondary;

        //series1.ValueMembersY = "TARGET_MS";
        //series2.ValueMembersY = "RESULT_MS";
        //series3.ValueMembersY = "GR_RATE_MS";
        //series1.ValueMemberX = "MM";


        string series2_col = "GOAL_MS";
        string series1_col = "TARGET_MS";
        string series3_col = "RESULT_MS";

        if (rdoMethod.SelectedIndex.Equals(1))
        {
            series2_col = "GOAL_TS";
            series1_col = "TARGET_TS";
            series3_col = "RESULT_TS";
        }


        series1.YValueMembers = series1_col;
        series2.YValueMembers = series2_col;
        series3.YValueMembers = series3_col;
        series1.XValueMember  = "MM";

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

        string sChartArea = chartMM.Series[series2.Name].ChartArea;

        chartMM.ChartAreas[sChartArea].AxisY.LabelStyle.Format = "N0";
        //chartMM.ChartAreas[sChartArea].AxisY2.LabelStyle.Format = "N0";

        //DundasAnimations.DundasChartBase(chartMM, AnimationTheme.None, -1, -1, false, 1);
        //DundasAnimations.GrowingAnimation(chartMM, series1, 1.0, 1.0, true);
        //DundasAnimations.GrowingAnimation(chartMM, series2, 2.0, 2.0, true);
        //DundasAnimations.GrowingAnimation(chartMM, series3, 2.0, 1.0, true);

        chartMM.DataBind();


        // 달성율 그래프
        MSCharts.DundasChartBase(chartDal
                                 , ChartImageType.Jpeg
                                 , chartWidth
                                 , chartHeight
                                 , 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
                                 , MsGradientType.TopBottom
                                 , MsAntiAliasing.None);

        chartDal.DataSource = dtBscKpiTarget;

        Series series1D = MSCharts.CreateSeries(chartDal, "serTarget", "Default", "Target", null, SeriesChartType.Column, 1, GetChartColor(0), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
        Series series2D = MSCharts.CreateSeries(chartDal, "serGoal", "Default", "Goal", null, SeriesChartType.Column, 1, GetChartColor(1), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
        //series3.YAxisType = AxisType.Secondary;

        //series1.ValueMembersY = "TARGET_MS";
        //series2.ValueMembersY = "RESULT_MS";
        //series3.ValueMembersY = "GR_RATE_MS";
        //series1.ValueMemberX = "MM";


        string series2D_col = "GOAL_DAL_MS";
        string series1D_col = "TARGET_DAL_MS";

        if (rdoMethod.SelectedIndex.Equals(1))
        {
            series2D_col = "GOAL_DAL_TS";
            series1D_col = "TARGET_DAL_TS";
        }


        series1D.YValueMembers = series1D_col;
        series2D.YValueMembers = series2D_col;
        series1D.XValueMember  = "MM";

        series1D.ToolTip = "#VALY{N0}";
        series2D.ToolTip = "#VALY{N0}";

        string sChartAreaD = chartDal.Series[series2D.Name].ChartArea;

        chartDal.ChartAreas[sChartAreaD].AxisY.LabelStyle.Format = "N0";
        //chartDal.ChartAreas[sChartAreaD].AxisY2.LabelStyle.Format = "N0";

        //DundasAnimations.DundasChartBase(chartDal, AnimationTheme.None, -1, -1, false, 1);
        //DundasAnimations.GrowingAnimation(chartDal, series1, 1.0, 1.0, true);
        //DundasAnimations.GrowingAnimation(chartDal, series2, 2.0, 2.0, true);
        //DundasAnimations.GrowingAnimation(chartDal, series3, 2.0, 1.0, true);

        chartDal.DataBind();
    }
Beispiel #10
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>();
        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)
        {
            MSCharts.DundasChartBase(objChart, ChartImageType.Jpeg, 680, 130
                                     , 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, MsGradientType.TopBottom, MsAntiAliasing.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)
            {
                Series series4 = MSCharts.CreateSeries(objChart, "sp1", "AreaView", rDs.Tables[0].Rows[0]["VIEW_NAME"].ToString(), null, SeriesChartType.Area, 1, Color.FromArgb(240, 224, 64, 10), Color.FromArgb(180, 26, 59, 105), Color.Transparent, 1, 9, Color.FromArgb(64, 64, 64));
                Series series1 = MSCharts.CreateSeries(objChart, "sp2", "AreaView", rDs.Tables[0].Rows[1]["VIEW_NAME"].ToString(), null, SeriesChartType.Area, 1, Color.FromArgb(240, 192, 192, 192), Color.FromArgb(180, 26, 59, 105), Color.Transparent, 1, 9, Color.FromArgb(64, 64, 64));
                Series series3 = MSCharts.CreateSeries(objChart, "sp3", "AreaView", rDs.Tables[0].Rows[2]["VIEW_NAME"].ToString(), null, SeriesChartType.Area, 1, Color.FromArgb(240, 65, 140, 240), Color.FromArgb(180, 26, 59, 105), Color.Transparent, 1, 9, Color.FromArgb(64, 64, 64));

                Series series2 = MSCharts.CreateSeries(objChart, "sp4", "AreaView", rDs.Tables[0].Rows[3]["VIEW_NAME"].ToString(), null, SeriesChartType.Area, 1, Color.FromArgb(240, 252, 180, 65), Color.FromArgb(180, 26, 59, 105), Color.Transparent, 1, 9, Color.FromArgb(64, 64, 64));

                series1.YValueMembers = "ACHV_RATE1";
                series2.YValueMembers = "ACHV_RATE2";
                series3.YValueMembers = "ACHV_RATE3";
                series4.YValueMembers = "ACHV_RATE4";
                series1.XValueMember  = "YMD";

                foreach (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";
                }

                objChart.DataBind();
            }
        }
    }
Beispiel #11
0
    private void SetGraph()
    {
        int charWidth  = 300;
        int charHeight = 170;

        int    cntRow   = 0;
        int    cntCol   = 0;
        int    intLP    = 0;
        string strSerNm = "";

        //================================================================== 관점별 달성율
        MicroBSC.BSC.Biz.Biz_Bsc_Score_Card objBSC = new MicroBSC.BSC.Biz.Biz_Bsc_Score_Card();
        DataSet dsViw = objBSC.GetEstDeptKpiViewTypeList
                            (this.IEstTermRefID
                            , this.IYmd
                            , this.ISumType
                            , this.IEstDeptID);

        if (dsViw.Tables[0].Rows.Count > 0)
        {
            Chart chartMS = chartView;
            MSCharts.DundasChartBase(chartMS, ChartImageType.Jpeg, charWidth, charHeight
                                     , BorderSkinStyle.Emboss, Color.FromArgb(181, 64, 1), 1
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE), Color.FromArgb(0x20, 0x80, 0xD0), ChartDashStyle.Solid
                                     , -1
                                     , ChartHatchStyle.None, MsGradientType.TopBottom, MsAntiAliasing.None);
            Series serARate = MSCharts.CreateSeries(chartMS, "serA", "AreaView", "달성율", null, SeriesChartType.Bar, 0, GetChartColor(0), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));

            chartMS.Legends[0].Enabled = false;
            serARate.ToolTip           = "#VALY{P}";

            chartMS.ChartAreas["AreaView"].Area3DStyle.Enable3D = false;

            chartMS.DataSource     = dsViw;
            serARate.YValueMembers = "ACHV_RATE";
            serARate.XValueMember  = "VIEW_NAME";
            chartMS.DataBind();
        }

        //================================================================== 등급구간별별 점수현황
        DataSet dsGrd = objBSC.GetKpiGradeStatusForMap
                            (this.IEstTermRefID
                            , this.IYmd
                            , this.ISumType
                            , this.IEstDeptID);

        if (dsGrd.Tables[0].Rows.Count > 0)
        {
            Chart chartGD = chartGrade;
            MSCharts.DundasChartBase(chartGD, ChartImageType.Jpeg, charWidth, charHeight
                                     , BorderSkinStyle.Emboss, Color.FromArgb(181, 64, 1), 1
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE), Color.FromArgb(0x20, 0x80, 0xD0), ChartDashStyle.Solid
                                     , -1
                                     , ChartHatchStyle.None, MsGradientType.TopBottom, MsAntiAliasing.None);

            Series serCRate = MSCharts.CreateSeries(chartGD, "serA", "AreaGrade", "달성율", null, SeriesChartType.Pie, 0, GetChartColor(0), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
            chartGD.Legends[0].Enabled = false;
            serCRate.ToolTip           = "#VALY{P}";

            chartGD.ChartAreas["AreaGrade"].Area3DStyle.Enable3D = true;
            serCRate["PieLabelStyle"] = "Outside";

            chartGD.DataSource     = dsGrd;
            serCRate.YValueMembers = "C_RATE";
            serCRate.XValueMember  = "THRESHOLD_KNAME";
            chartGD.DataBind();
        }

        //================================================================== 지표군별 점수현황
        MicroBSC.BSC.Biz.Biz_Bsc_Kpi_Dashboard objBOR = new MicroBSC.BSC.Biz.Biz_Bsc_Kpi_Dashboard();
        DataSet dsGroup = objBOR.GetDashBoardForKpiGroupScore(this.IEstTermRefID, this.IYmd, this.ISumType);

        if (dsGroup.Tables[0].Rows.Count > 0)
        {
            MSCharts.DundasChartBase(chartGroup, ChartImageType.Jpeg, charWidth, charHeight
                                     , BorderSkinStyle.Emboss, Color.FromArgb(181, 64, 1), 1
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE), Color.FromArgb(0x20, 0x80, 0xD0), ChartDashStyle.Solid
                                     , -1
                                     , ChartHatchStyle.None, MsGradientType.TopBottom, MsAntiAliasing.Graphics);
            Series serGroup = MSCharts.CreateSeries(chartGroup, "serA", "AreaGroup", "점수", null, SeriesChartType.Bar, 0, GetChartColor(1), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));

            chartGroup.Legends[0].Enabled = false;
            serGroup.ToolTip = "#VALY{P}";

            chartGroup.ChartAreas["AreaGroup"].Area3DStyle.Enable3D = false;

            chartGroup.DataSource  = dsGroup;
            serGroup.YValueMembers = "POINTS";
            serGroup.XValueMember  = "KPI_GROUP_NAME";
            chartGroup.DataBind();
        }
    }
Beispiel #12
0
    // 전사 등급추이
    public void SetEntGradeRateTrend(Chart iChart)
    {
        DateTime           startYM = (DateTime.ParseExact(this.IYmd, "yyyyMM", null)).AddYears(-1);
        Biz_Bsc_Score_Card objBSC  = new Biz_Bsc_Score_Card();
        DataSet            dsGrd   = objBSC.GetKpiEntGradeStatus
                                         (base.GetYMDFromDateTime(startYM, "").Substring(0, 6)
                                         , this.IYmd
                                         , this.ISumType
                                         , this.IEstDeptID);

        MSCharts.GetDefaultChart(iChart, ChartImageType.Jpeg, 520, chartHeight, true, true, true);
        ChartArea FstChtArea = iChart.ChartAreas[0];

        iChart.Legends[0].Alignment   = StringAlignment.Near;
        iChart.Legends[0].LegendStyle = LegendStyle.Column;
        iChart.Legends[0].Docking     = Docking.Left;
        //iChart.Legends[0].DockInsideChartArea = false;

        string sTitle = "지표 등급추이분석";

        MSCharts.CreateTitle(iChart, sTitle);

        //FstChtArea.AxisY.Title = "구성비";

        DataTable dtGrade = this.GetGradeSchema();

        if (dsGrd.Tables.Count > 0)
        {
            iRow = dsGrd.Tables[0].Rows.Count;
            for (int i = 0; i < iRow; i++)
            {
                string  sKey = dsGrd.Tables[0].Rows[i]["THRESHOLD_REF_ID"].ToString();
                string  sVal = dsGrd.Tables[0].Rows[i]["THRESHOLD_KNAME"].ToString();
                string  sYmd = dsGrd.Tables[0].Rows[i]["YMD"].ToString();
                decimal dVal = decimal.Parse(dsGrd.Tables[0].Rows[i]["COMP_RATE"].ToString());

                for (int k = 0; k < dtGrade.Rows.Count; k++)
                {
                    if (sYmd.Equals(dtGrade.Rows[k][COL_KEY.KEY_FIELD.ToString()].ToString()) && dtGrade.Columns.Contains(sKey))
                    {
                        dtGrade.Rows[k][sKey] = dVal;
                    }
                }
            }

            FstChtArea.AxisY.LabelStyle.Format = "P0";

            iCol = dtGrade.Columns.Count;
            //DundasAnimations.DundasChartBase(iChart, AnimationTheme.GrowingTogether, -1, -1, false, 1);
            iChart.DataSource = dtGrade;
            for (int m = 1; m < iCol; m++)
            {
                Series serAchv = MSCharts.CreateSeries(iChart, m.ToString(), iChart.ChartAreas[0].Name, dtGrade.Columns[m].Namespace, null,
                                                       SeriesChartType.StackedColumn100, 0, ColorTranslator.FromHtml(dtGrade.Columns[m].Caption),
                                                       Color.FromArgb(0x4A, 0x58, 0x7E), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
                serAchv.ToolTip = "#VALY{P}";

                //DundasAnimations.GrowingAnimation(iChart, serAchv, m, m, true);
                serAchv.YValueMembers = dtGrade.Columns[m].ColumnName;

                if (m == 1)
                {
                    serAchv.XValueMember = dtGrade.Columns[COL_KEY.KEY_FIELD.ToString()].ColumnName;
                }
            }

            iChart.DataBind();
        }
    }
    private void DoDrawingEtcChart(DataTable dtChart, Chart chart, int colorCode)
    {
        // 당월그래프
        MSCharts.DundasChartBase(chart, ChartImageType.Jpeg, 410, 250
                                 , 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, MsGradientType.TopBottom, MsAntiAliasing.None);

        chart.DataSource = dtChart;

        Series series1 = MSCharts.CreateSeries(chart, "ME1", "Default", "매출(목표)", null, SeriesChartType.Column, 1, GetChartColor2(0), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
        Series series2 = MSCharts.CreateSeries(chart, "ME2", "Default", "매출(실적)", null, SeriesChartType.Column, 1, GetChartColor2(1), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));

        Series series3 = MSCharts.CreateSeries(chart, "YG1", "Default", "영업(목표)", null, SeriesChartType.Column, 1, GetChartColor2(4), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
        Series series4 = MSCharts.CreateSeries(chart, "YG2", "Default", "영업(실적)", null, SeriesChartType.Column, 1, GetChartColor2(13), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));

        //Series series2 = MSCharts.CreateSeries(chart, "serActl", "Default", "실적", null, SeriesChartType.Line, 1, GetChartColor2(colorCode), GetChartColor2(colorCode), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));

        if (series2.ChartType == SeriesChartType.Line)
        {
            series2.IsValueShownAsLabel = true;
            series2.MarkerStyle         = MarkerStyle.Circle;
            series2.MarkerSize          = 5;
            series2.MarkerColor         = Color.Magenta;

            series2.BorderWidth = 3;
        }

        series1.YValueMembers = "ME_TARGET_TS";
        series2.YValueMembers = "ME_RESULT_TS";
        series3.YValueMembers = "YG_TARGET_TS";
        series4.YValueMembers = "YG_RESULT_TS";
        series1.XValueMember  = "GRP_TWO_NAME";

        series1.ToolTip = "#VALY{N0}";
        series2.ToolTip = "#VALY{N0}";
        series3.ToolTip = "#VALY{N0}";
        series4.ToolTip = "#VALY{N0}";

        string sChartArea = chart.Series[series2.Name].ChartArea;

        chart.ChartAreas[sChartArea].AxisY.LabelStyle.Format = "N0";

        string sChartArea2 = chart.Series[series3.Name].ChartArea;

        chart.ChartAreas[sChartArea2].AxisY2.LabelStyle.Format = "N0";

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

        chart.DataBind();
    }
    private void DoDrawingInPower(DataTable dtChart, Chart chart)
    {
        // 당월그래프
        MSCharts.DundasChartBase(chart
                                 , ChartImageType.Jpeg
                                 , 450
                                 , 250
                                 , 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
                                 , MsGradientType.Center
                                 , MsAntiAliasing.Graphics);

        chart.DataSource = dtChart;

        Series series1 = MSCharts.CreateSeries(chart, "serPlan", "Default", "목표 가득율", null, SeriesChartType.Line, 1, GetChartColor2(0), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
        Series series2 = MSCharts.CreateSeries(chart, "serActl", "Default", "가득율", null, SeriesChartType.Area, 1, GetChartColor2(1), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));

        // Enable data points labels
        series1.IsValueShownAsLabel = true;
        series2.IsValueShownAsLabel = true;

        series1.BorderWidth = 3;
        series1.BorderColor = GetChartColor2(0);

        // Set SplineArea chart type
        series2.ChartType = SeriesChartType.SplineArea;

        // Set spline line tension
        series2["LineTension"] = "0.1";

        // Enable data points markers
        series2.MarkerStyle = MarkerStyle.Circle;
        series2.MarkerSize  = 5;
        series2.MarkerColor = Color.Magenta;

        series2.BorderWidth = 3;
        series2.BorderColor = GetChartColor2(1);

        //Series series2 = MSCharts.CreateSeries(chart, "serActl", "Default", "실적", null, SeriesChartType.Line, 1, GetChartColor2(2), GetChartColor2(2), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));

        series1.YValueMembers = "TARGET_FULL_RATE";
        series2.YValueMembers = "RESULT_FULL_RATE";
        series1.XValueMember  = "CR_MONTH_NAME";

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

        string sChartArea = chart.Series[series2.Name].ChartArea;

        chart.ChartAreas[sChartArea].AxisY.LabelStyle.Format  = "P0";
        chart.ChartAreas[sChartArea].AxisY2.LabelStyle.Format = "P0";

        // Disable X axis margin
        chart.ChartAreas[sChartArea].AxisX.IsMarginVisible = false;

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

        chart.DataBind();
    }
Beispiel #15
0
    private void SetKpiStatusGraph()
    {
        int charWidth  = 270;
        int charHeight = 170;

        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 intLP  = 0;

        int    intEsttermRefID = 0;
        int    intKpiRefID     = 0;
        string strTrendType    = "";
        string strKpiName      = "";
        string strTypeName     = "TARGET";
        string strGraphType    = "LINE";
        int    intSortOrder    = 0;

        DateTime dsYmd = (DateTime)wdtSYM.Value;
        DateTime deYmd = (DateTime)wdtEYM.Value;

        string sYmd = dsYmd.Year.ToString() + dsYmd.Month.ToString().PadLeft(2, '0');
        string eYmd = deYmd.Year.ToString() + deYmd.Month.ToString().PadLeft(2, '0');
        string sSum = PageUtility.GetByValueDropDownList(ddlSumType);

        cntRow = rDs.Tables[0].Rows.Count;
        cntCol = rDs.Tables[0].Columns.Count;
        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());
            strGraphType    = Convert.ToString(rDs.Tables[0].Rows[i]["GRAPH_TYPE"].ToString());
            intSortOrder    = Convert.ToInt32(rDs.Tables[0].Rows[i]["SORT_ORDER"].ToString());

            DataSet dsGraph = objBSC.GetDashBoardForKpiAnalysis(intEsttermRefID, intKpiRefID, sYmd, eYmd, "TS");

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

            case 1:
                objChart = chtKPI2;
                break;

            case 2:
                objChart = chtKPI3;
                break;

            case 3:
                objChart = chtKPI4;
                break;

            case 4:
                objChart = chtKPI5;
                break;

            case 5:
                objChart = chtKPI6;
                break;

            case 6:
                objChart = chtKPI7;
                break;

            case 7:
                objChart = chtKPI8;
                break;

            default:
                return;
            }



            MSCharts.DundasChartBase(objChart, ChartImageType.Jpeg, charWidth, charHeight
                                     , BorderSkinStyle.Emboss, Color.FromArgb(181, 64, 1), 1
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE), Color.FromArgb(0x20, 0x80, 0xD0), ChartDashStyle.Solid
                                     , -1
                                     , ChartHatchStyle.None, MsGradientType.TopBottom, MsAntiAliasing.None);

            Series serT = MSCharts.CreateSeries
                              (objChart
                              , "T"
                              , objChart.ChartAreas[0].Name
                              , "계획"
                              , "계획"
                              , SeriesChartType.Spline
                              , 3
                              , Color.FromArgb(0x5A, 0x7D, 0xDE), Color.FromArgb(0x4A, 0x58, 0x7E), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));

            Series serR = MSCharts.CreateSeries
                              (objChart
                              , "R"
                              , objChart.ChartAreas[0].Name
                              , "실적"
                              , "실적"
                              , SeriesChartType.Spline
                              , 3
                              , Color.FromArgb(0xFF, 0x8A, 0x00), Color.FromArgb(0xD7, 0x41, 0x01), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));

            Series serA = MSCharts.CreateSeries
                              (objChart
                              , "A"
                              , objChart.ChartAreas[0].Name
                              , "달성율"
                              , "달성율"
                              , SeriesChartType.Spline
                              , 1
                              , Color.FromArgb(0x00, 0xC4, 0xCB), Color.FromArgb(0x00, 0xC4, 0xCB), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));

            int iInterval = (int)(dsGraph.Tables[0].Rows.Count / 4);

            objChart.ChartAreas[objChart.Series[serT.Name].ChartArea].AxisX.Interval = iInterval;

            objChart.ChartAreas[objChart.Series[serT.Name].ChartArea].Area3DStyle.Enable3D    = false;
            objChart.ChartAreas[objChart.Series[serT.Name].ChartArea].AxisY2.Enabled          = AxisEnabled.True;
            objChart.ChartAreas[objChart.Series[serT.Name].ChartArea].AxisY.LabelStyle.Format = "#,##0";

            //serA.MarkerStyle = MarkerStyle.Circle;
            //serA.MarkerSize  = 2;
            serA.YAxisType = AxisType.Secondary;
            serT.ToolTip   = "Target \t= #VALY{d}";
            serR.ToolTip   = "Result \t= #VALY{d}";
            serA.ToolTip   = "Rate \t= #VALY{P}";

            objChart.DataSource = dsGraph;
            serT.YValueMembers  = "TARGET_" + sSum;
            serR.YValueMembers  = "RESULT_" + sSum;
            serA.YValueMembers  = "ACHV_RATE_" + sSum;
            serT.XValueMember   = "YMD";
            objChart.DataBind();
            objChart.Legends[0].Enabled = false;


            objChart.Titles[0].Text = strKpiName;

            dsGraph  = null;
            serT     = null;
            serR     = null;
            serA     = null;
            objChart = null;
        }

        if (cntRow > 1 && cntRow < 3)
        {
            tr01.Visible = true;
            //tr02.Visible = false;
            tr03.Visible = false;
            //tr04.Visible = false;
            return;
        }
        else if (cntRow > 2 && cntRow < 5)
        {
            tr01.Visible = true;
            //tr02.Visible = true;
            tr03.Visible = false;
            //tr04.Visible = false;
            return;
        }
        else if (cntRow > 4 && cntRow < 7)
        {
            tr01.Visible = true;
            //tr02.Visible = true;
            tr03.Visible = true;
            //tr04.Visible = false;
            return;
        }
        else
        {
            tr01.Visible = true;
            //tr02.Visible = true;
            tr03.Visible = true;
            //tr04.Visible = true;
            return;
        }
    }
Beispiel #16
0
    private void DoDrawing3(DataTable dtChart, Chart chart)
    {
        // 당월그래프
        MSCharts.DundasChartBase(chart
                                 , ChartImageType.Jpeg
                                 , ChartWidth
                                 , ChartHeight
                                 , BorderSkinStyle.Emboss
                                 , CHART_BORDER_GRAY
                                 , 1
                                 , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                 , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                 , Color.FromArgb(0x20, 0x80, 0xD0)
                                 , ChartDashStyle.Solid
                                 , -1
                                 , ChartHatchStyle.None
                                 , MsGradientType.Center
                                 , MsAntiAliasing.Graphics);

        chart.DataSource = dtChart;

        Series series1 = MSCharts.CreateSeries(chart
                                               , "ME1"
                                               , "Default"
                                               , "매출(목표)"
                                               , null
                                               , SeriesChartType.Column
                                               , 1
                                               , CHART_COLUMN_GREEN
                                               , Color.FromArgb(180, 26, 59, 105)
                                               , Color.FromArgb(64, 0, 0, 0)
                                               , 1
                                               , 9
                                               , Color.FromArgb(64, 64, 64));

        Series series2 = MSCharts.CreateSeries(chart, "ME2", "Default", "매출(실적)", null, SeriesChartType.Column, 1
                                               , CHART_COLUMN_ORANGE, Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));


        Series series4 = MSCharts.CreateSeries(chart, "serPlan", "Default", "영업이익", null
                                               , SeriesChartType.Line
                                               , 1
                                               , CHART_LINE_BLUE, Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));


        //series1.IsValueShownAsLabel = true;
        //series1.MarkerStyle = MarkerStyle.Circle;
        //series1.MarkerColor = Color.Magenta;
        //series1.MarkerSize = 3;
        series1.Label        = "#VALY{N0}";
        series1.Color        = CHART_COLUMN_GREEN;
        series1.BorderWidth  = 0;
        series1.BorderColor  = CHART_COLUMN_BORDER;
        series1.ShadowOffset = 0;
        //series2.IsValueShownAsLabel = true;
        //series2.MarkerStyle = MarkerStyle.Circle;
        //series2.MarkerColor = Color.Magenta;
        //series2.MarkerSize = 3;
        series2.Label        = "#VALY{N0}";
        series2.Color        = CHART_COLUMN_ORANGE;
        series2.BorderWidth  = 0;
        series2.BorderColor  = CHART_COLUMN_BORDER;
        series2.ShadowOffset = 0;
        //series3.IsValueShownAsLabel = true;
        //series3.MarkerStyle = MarkerStyle.Circle;
        //series3.MarkerColor = Color.Magenta;
        //series3.MarkerSize = 3;
        //series3.Label = "#VALY{N0}";

        //series4.YAxisType = AxisType.Secondary;
        series4.ShadowOffset = 0;
        series4.Color        = CHART_COLUMN_RED;
        series4.BorderColor  = CHART_COLUMN_RED;

        //series4.IsValueShownAsLabel = true;
        //series4.MarkerStyle = MarkerStyle.Circle;
        //series4.MarkerColor = Color.Magenta;
        //series4.MarkerSize = 3;
        series4.Label = "#VALY{N0}";


        series1.YValueMembers = "ME_TARGET_TS";
        series2.YValueMembers = "ME_RESULT_TS";
        //series3.YValueMembers = "YG_TARGET_TS";
        series4.YValueMembers = "YG_RESULT_TS";
        series1.XValueMember  = "GRP_TWO_NAME";



        series1.ToolTip = "#VALY{N0}";
        series2.ToolTip = "#VALY{N0}";
        //series3.ToolTip = "#VALY{N0}";
        series4.ToolTip = "#VALY{N0}";

        ////string sChartArea2 = chart.Series[series2.Name].ChartArea;
        //chart.ChartAreas[sChartArea2].AxisX.IsMarginVisible = true;
        //chart.ChartAreas[sChartArea2].AxisY2.Enabled = AxisEnabled.False;

        ////chart.ChartAreas[sChartArea2].AxisY.LabelStyle.Format = "N0";
        ////chart.ChartAreas[sChartArea2].AxisY.Title = "매출";

        ////chart.ChartAreas[sChartArea2].AxisY2.LabelStyle.Format = "N0";
        ////chart.ChartAreas[sChartArea2].AxisY2.Title = "영업";

        ////LabelStyle lblStyle = new LabelStyle();
        ////lblStyle.ForeColor = Color.FromArgb(127, 127, 127);
        ////lblStyle.Font = new Font("Tahoma", 7.5f, FontStyle.Regular);
        ////lblStyle.Format = "#,##0";

        ////chart.ChartAreas[sChartArea2].AxisY2.LabelStyle = lblStyle;
        ////chart.ChartAreas[sChartArea2].AxisY2.LineColor = Color.FromArgb(127, 127, 127);


        string sChartArea2 = chart.Series[series2.Name].ChartArea;

        chart.ChartAreas[sChartArea2].AxisY.LabelStyle.Format  = "N0";
        chart.ChartAreas[sChartArea2].AxisY2.LabelStyle.Format = "N0";
        chart.ChartAreas[sChartArea2].AxisY2.Enabled           = AxisEnabled.False;

        DoSettingChartStyles(chart, "#,##0");

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

        chart.DataBind();
    }
Beispiel #17
0
    private void SetYearlyResultGraph()
    {
        int charWidth  = 270;
        int charHeight = 170;

        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 cntLop = 0;

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

        for (int i = 0; i < cntRow; i++)
        {
            switch (i)
            {
            case 0:
                objChart = chtKPI1;
                break;

            case 1:
                objChart = chtKPI2;
                break;

            case 2:
                objChart = chtKPI3;
                break;

            case 3:
                objChart = chtKPI4;
                break;

            case 4:
                objChart = chtKPI5;
                break;

            case 5:
                objChart = chtKPI6;
                break;

            case 6:
                objChart = chtKPI7;
                break;

            case 7:
                objChart = chtKPI8;
                break;

            default:
                return;
            }

            int    ikpi_ref_id = int.Parse(rDs.Tables[0].Rows[i]["KPI_REF_ID"].ToString());
            string sKpiName    = rDs.Tables[0].Rows[i]["KPI_NAME"].ToString();

            DataSet dsGraph = objBSC.GetDashBoardKpiYearlyStatusList(this.IEstTermRefID, ikpi_ref_id, this.IYmd, int.Parse(txtYearTerm.Text));

            MSCharts.DundasChartBase(objChart, ChartImageType.Jpeg, charWidth, charHeight
                                     , BorderSkinStyle.Emboss, Color.FromArgb(181, 64, 1), 1
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE), Color.FromArgb(0x20, 0x80, 0xD0), ChartDashStyle.Solid
                                     , -1
                                     , ChartHatchStyle.None, MsGradientType.TopBottom, MsAntiAliasing.None);

            Series serT = MSCharts.CreateSeries
                              (objChart
                              , "T"
                              , objChart.ChartAreas[0].Name
                              , "계획"
                              , "계획"
                              , SeriesChartType.Column
                              , 1
                              , Color.FromArgb(0x5A, 0x7D, 0xDE), Color.FromArgb(0x4A, 0x58, 0x7E), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));

            Series serR = MSCharts.CreateSeries
                              (objChart
                              , "R"
                              , objChart.ChartAreas[0].Name
                              , "실적"
                              , "실적"
                              , SeriesChartType.Column
                              , 1
                              , Color.FromArgb(0xFF, 0x8A, 0x00), Color.FromArgb(0xD7, 0x41, 0x01), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));

            Series serA = MSCharts.CreateSeries
                              (objChart
                              , "A"
                              , objChart.ChartAreas[0].Name
                              , "달성율"
                              , "달성율"
                              , SeriesChartType.Bubble
                              , 0
                              , Color.FromArgb(0x00, 0xC4, 0xCB), Color.FromArgb(0x00, 0xC4, 0xCB), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));


            //objChart.ChartAreas[objChart.Series[serT.Name].ChartArea].AxisX.Interval = 1;

            objChart.ChartAreas[objChart.Series[serT.Name].ChartArea].Area3DStyle.Enable3D    = false;
            objChart.ChartAreas[objChart.Series[serR.Name].ChartArea].AxisY2.Enabled          = AxisEnabled.True;
            objChart.ChartAreas[objChart.Series[serT.Name].ChartArea].AxisY.LabelStyle.Format = "#,##0";
            serA.YAxisType = AxisType.Secondary;
            //serT.ToolTip = "Target \t= #VALY{d}";
            //serR.ToolTip = "Result \t= #VALY{d}";
            //serA.ToolTip = "Rate \t= #VALY{P}";

            serT.ToolTip = "#VALY{d}";
            serR.ToolTip = "#VALY{d}";
            serA.ToolTip = "#VALY{P}";

            objChart.DataSource = dsGraph;
            serT.YValueMembers  = "TARGET_TS";
            serR.YValueMembers  = "RESULT_TS";
            serA.YValueMembers  = "ACHV_RATE_TS";
            serT.XValueMember   = "YMD";
            objChart.DataBind();
            objChart.Legends[0].Enabled = false;

            objChart.Titles[0].Text = sKpiName;

            dsGraph  = null;
            serT     = null;
            serR     = null;
            serA     = null;
            objChart = null;
        }

        if (cntRow > 1 && cntRow < 3)
        {
            tr01.Visible = true;
            //tr02.Visible = false;
            tr03.Visible = false;
            //tr04.Visible = false;
            return;
        }
        else if (cntRow > 2 && cntRow < 5)
        {
            tr01.Visible = true;
            //tr02.Visible = true;
            tr03.Visible = false;
            //tr04.Visible = false;
            return;
        }
        else if (cntRow > 4 && cntRow < 7)
        {
            tr01.Visible = true;
            //tr02.Visible = true;
            tr03.Visible = true;
            //tr04.Visible = false;
            return;
        }
        else
        {
            tr01.Visible = true;
            //tr02.Visible = true;
            tr03.Visible = true;
            //tr04.Visible = true;
            return;
        }
    }
Beispiel #18
0
    /// <summary>
    /// 관점별 / 등급별 현황 그래프
    /// </summary>
    private void SetGraph()
    {
        int chartWidth  = 310;
        int chartHeight = 400;

        double tempWidth  = DataTypeUtility.GetToInt32(hdfScreenWidth.Value) * 0.31;
        double tempHeight = DataTypeUtility.GetToInt32(hdfScreenHeight.Value) * 0.33;

        chartWidth  = DataTypeUtility.GetToInt32(Math.Round(tempWidth, 0));
        chartHeight = DataTypeUtility.GetToInt32(Math.Round(tempHeight, 0));

        chartView.Visible  = false;
        chartGrade.Visible = false;

        this.SetParameter();
        MicroBSC.BSC.Biz.Biz_Bsc_Score_Card objBSC = new MicroBSC.BSC.Biz.Biz_Bsc_Score_Card();

        DataSet dsViw = new DataSet();
        DataSet dsGrd = new DataSet();


        if (rdoGoalTong.SelectedIndex.Equals(0))
        {
            dsViw = objBSC.GetEstDeptKpiViewTypeList
                        (this.IEstTermRefID
                        , this.IYmd
                        , this.ISumType
                        , this.IEstDeptID
                        , this.IExtKpiYN);



            dsGrd = objBSC.GetKpiGradeStatusForMap
                        (this.IEstTermRefID
                        , this.IYmd
                        , this.ISumType
                        , this.IEstDeptID
                        , this.IExtKpiYN);
        }
        else
        {
            dsViw = objBSC.GetEstDeptKpiViewTypeList_Goal
                        (this.IEstTermRefID
                        , this.IYmd
                        , this.ISumType
                        , this.IEstDeptID
                        , this.IExtKpiYN);


            dsGrd = objBSC.GetKpiGradeStatusForMap_Goal
                        (this.IEstTermRefID
                        , this.IYmd
                        , this.ISumType
                        , this.IEstDeptID
                        , this.IExtKpiYN);
        }

        if (dsViw.Tables[0].Rows.Count > 0)
        {
            Chart chartMS = this.ugrdKpiStatusTab.FindControl("chartView") as Chart;

            chartMS.Visible = true;

            MSCharts.DundasChartBase(chartMS, ChartImageType.Jpeg, chartWidth, chartHeight
                                     , BorderSkinStyle.Emboss, Color.FromArgb(181, 64, 1), 1
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE), Color.FromArgb(0x20, 0x80, 0xD0), ChartDashStyle.Solid
                                     , -1
                                     , ChartHatchStyle.None, MsGradientType.TopBottom, MsAntiAliasing.None);
            Series serARate = MSCharts.CreateSeries(chartMS, "serA", "AreaView", "달성율", null, SeriesChartType.Column, 0, GetChartColor(0), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));

            chartMS.Legends[0].Enabled = false;
            serARate.ToolTip           = "#VALY{P}";

            chartMS.ChartAreas["AreaView"].Area3DStyle.Enable3D = true;

            chartMS.DataSource     = dsViw;
            serARate.YValueMembers = "ACHV_RATE";
            serARate.XValueMember  = "VIEW_NAME";
            chartMS.DataBind();
        }



        if (dsGrd.Tables[0].Rows.Count > 0)
        {
            Chart chartGD = this.ugrdKpiStatusTab.FindControl("chartGrade") as Chart;


            DataRow[] rows = dsGrd.Tables[0].Select(" C_RATE <> 0 ");

            if (rows.Length > 0)
            {
                chartGD.Visible = true;
            }

            MSCharts.DundasChartBase(chartGD, ChartImageType.Jpeg, chartWidth, chartHeight
                                     , BorderSkinStyle.Emboss, Color.FromArgb(181, 64, 1), 1
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE), Color.FromArgb(0x20, 0x80, 0xD0), ChartDashStyle.Solid
                                     , -1
                                     , ChartHatchStyle.None, MsGradientType.TopBottom, MsAntiAliasing.None);

            Series serCRate = MSCharts.CreateSeries(chartGD, "serA", "AreaGrade", "달성율", null, SeriesChartType.Doughnut, 0, GetChartColor(0), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
            chartGD.Legends[0].Enabled = false;
            serCRate.ToolTip           = "#VALY{P}";

            chartGD.ChartAreas["AreaGrade"].Area3DStyle.Enable3D = true;

            chartGD.DataSource     = dsGrd;
            serCRate.YValueMembers = "C_RATE";
            serCRate.XValueMember  = "THRESHOLD_ENAME";
            chartGD.DataBind();
        }
    }
Beispiel #19
0
    private void DoDrawingChart2(DataTable dtChart, Chart chart)
    {
        int chartWidth  = 300;
        int chartHeight = 270;

        // 당월그래프
        MSCharts.DundasChartBase(chart
                                 , ChartImageType.Jpeg
                                 , chartWidth
                                 , chartHeight
                                 , BorderSkinStyle.Emboss
                                 , CHART_BORDER_BLUE
                                 , 1
                                 , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                 , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                 , Color.FromArgb(0x20, 0x80, 0xD0)
                                 , ChartDashStyle.Solid
                                 , -1
                                 , ChartHatchStyle.None
                                 , MsGradientType.Center
                                 , MsAntiAliasing.Graphics);

        chart.DataSource = dtChart;

        Series series1 = MSCharts.CreateSeries(chart, "serPlan", "Default", "등급", null, SeriesChartType.Column, 1
                                               , CHART_COLUMN_ORANGE
                                               , Color.FromArgb(180, 26, 59, 105)
                                               , Color.FromArgb(64, 0, 0, 0)
                                               , 1
                                               , 9
                                               , Color.FromArgb(64, 64, 64));

        //Series series2 = MSCharts.CreateSeries(chart, "serActl", "Default", "실적", null, SeriesChartType.Column, 1
        //                                     , CHART_COLUMN_ORANGE
        //                                     , Color.FromArgb(180, 26, 59, 105)
        //                                     , Color.FromArgb(64, 0, 0, 0)
        //                                     , 1, 9, Color.FromArgb(64, 64, 64));


        //Enable data points labels
        //series1.IsValueShownAsLabel = true;
        //series2.IsValueShownAsLabel = true;

        //series1.MarkerStyle = MarkerStyle.Circle;
        //series1.MarkerSize = 2;
        //series1.MarkerColor = Color.Magenta;

        series1.BorderWidth  = 1;
        series1.BorderColor  = CHART_COLUMN_BORDER;
        series1.ShadowOffset = 0;

        //series1.Label = "#VALY{N0}";


        // Enable data points markers
        //series2.MarkerStyle = MarkerStyle.Circle;
        //series2.MarkerSize = 2;
        //series2.MarkerColor = Color.Magenta;

        //series2.BorderWidth = 1;
        //series2.BorderColor = CHART_COLUMN_BORDER;
        //series2.ShadowOffset = 0;
        //series2.Label = "#VALY{N0}";


        series1.YValueMembers = "GRADE_COUNT";
        //series2.YValueMembers = "GRADE_COUNT";
        series1.XValueMember = "TS_GRADE";


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

        string sChartArea2 = chart.Series[series1.Name].ChartArea;

        chart.ChartAreas[sChartArea2].AxisY.LabelStyle.Format  = "N0";
        chart.ChartAreas[sChartArea2].AxisY2.LabelStyle.Format = "N0";
        chart.ChartAreas[sChartArea2].AxisY2.Enabled           = AxisEnabled.False;



        DoSettingChartStyles(chart, "#,##0");



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

        // chart.DataBind();
    }
Beispiel #20
0
    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;
        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;
            }

            MSCharts.DundasChartBase(objChart, ChartImageType.Jpeg, 300, 100
                                     , 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);

            Series serKpi = MSCharts.CreateSeries
                                (objChart, strTypeName, objChart.ChartAreas[0].Name,
                                strTypeName, null, WebCommon.GetMSChartType(rDs.Tables[0].Rows[i]["GRAPH_TYPE"].ToString()), 2,
                                GetSignalColor(i), GetChartColor(i),
                                Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));

            objChart.ChartAreas[objChart.Series[serKpi.Name].ChartArea].AxisX.Interval = 4;


            objChart.ChartAreas[objChart.Series[serKpi.Name].ChartArea].Area3DStyle.Enable3D    = false;
            objChart.ChartAreas[objChart.Series[serKpi.Name].ChartArea].AxisY2.Enabled          = AxisEnabled.False;
            objChart.ChartAreas[objChart.Series[serKpi.Name].ChartArea].AxisY.LabelStyle.Format = "#,##0";

            //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;
            string strHerf = HttpContext.Current.Request.Url.ToString().Substring(0, HttpContext.Current.Request.Url.ToString().LastIndexOf('/')) + "/BSC0304S2.aspx?ITYPE=POP&ESTTERM_REF_ID=" + intEsttermRefID.ToString() + "&KPI_REF_ID=" + intKpiRefID.ToString() + "&YMD=" + this.IYmd;
            string strURL  = "javascript:gfOpenWindow('" + strHerf + "',840,600,'no','no');";



            objChart.DataSource  = dsGraph;
            serKpi.YValueMembers = "RESULT_VALUE";
            serKpi.XValueMember  = "YMD";
            objChart.DataBind();
            objChart.Legends[0].Enabled = false;

            objChart.Titles[0].Text = strKpiName;
            objChart.Titles[0].Url  = strURL;



            dsGraph  = null;
            serKpi   = null;
            objChart = null;
        }
    }