コード例 #1
0
ファイル: BSC1005S2.aspx.cs プロジェクト: schifflee/bscgit
    private void DrawChart(DataTable dt)
    {
        DataTable dtGrph = dt.Copy();

        dtGrph.Columns.Add("YMD_NAME");

        for (int i = 0; i < dtGrph.Rows.Count; i++)
        {
            string ymd = DataTypeUtility.GetString(dtGrph.Rows[i]["YMD"]);

            string year  = ymd.Substring(0, 4);
            string month = ymd.Replace(year, "");

            dtGrph.Rows[i]["YMD_NAME"] = DataTypeUtility.GetToInt32(month).ToString() + "월";
        }

        DundasCharts.DundasChartBase(chart_score
                                     , Dundas.Charting.WebControl.ChartImageType.Flash
                                     , DataTypeUtility.GetToInt32(Math.Ceiling(chart_score.Width.Value))
                                     , DataTypeUtility.GetToInt32(Math.Ceiling(chart_score.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_score.DataSource = dtGrph;

        string y_value_col_name = "SCORE";

        Dundas.Charting.WebControl.Series series1 = DundasCharts.CreateSeries(chart_score, y_value_col_name, "Default", "점수", null, Dundas.Charting.WebControl.SeriesChartType.Line, 1, GetChartColor2(0), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));


        series1.MarkerStyle = Dundas.Charting.WebControl.MarkerStyle.Circle;

        series1.ValueMemberX  = "YMD_NAME";
        series1.ValueMembersY = y_value_col_name;

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

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

        chart_score.DataBind();
    }
コード例 #2
0
    private void DrawChart(DataTable dt)
    {
        DataTable dtGrph = dt.Copy();

        dtGrph.Columns.Add("YMD_NAME");

        for (int i = 0; i < dtGrph.Rows.Count; i++)
        {
            string cr_month = DataTypeUtility.GetString(dtGrph.Rows[i]["CR_MONTH"]);


            dtGrph.Rows[i]["YMD_NAME"] = DataTypeUtility.GetToInt32(cr_month).ToString() + "월";
        }

        DundasCharts.DundasChartBase(this.chart1
                                     , Dundas.Charting.WebControl.ChartImageType.Flash
                                     , 1100
                                     , 300
                                     , 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);


        chart1.DataSource = dtGrph;

        string y_value_col_name = "";

        Dundas.Charting.WebControl.Series series1 = DundasCharts.CreateSeries(chart1, "ME_RATE", "Default", "매출액", null, Dundas.Charting.WebControl.SeriesChartType.Column, 1, GetChartColor2(0), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
        Dundas.Charting.WebControl.Series series2 = DundasCharts.CreateSeries(chart1, "YG_RATE", "Default", "영업이익", null, Dundas.Charting.WebControl.SeriesChartType.Column, 1, GetChartColor2(3), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
        Dundas.Charting.WebControl.Series series3 = DundasCharts.CreateSeries(chart1, "DN_RATE", "Default", "당기순이익", null, Dundas.Charting.WebControl.SeriesChartType.Column, 1, GetChartColor2(1), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));

        series1.ValueMemberX  = "YMD_NAME";
        series1.ValueMembersY = "ME_RATE";
        series2.ValueMembersY = "YG_RATE";
        series3.ValueMembersY = "DN_RATE";

        series1.MarkerStyle       = Dundas.Charting.WebControl.MarkerStyle.Circle;
        series1.MarkerSize        = 5;
        series1.MarkerColor       = GetChartColor2(0);
        series1.MarkerBorderColor = GetChartColor2(0);
        series2.MarkerStyle       = Dundas.Charting.WebControl.MarkerStyle.Circle;
        series2.MarkerSize        = 5;
        series2.MarkerColor       = GetChartColor2(3);
        series2.MarkerBorderColor = GetChartColor2(3);
        series3.MarkerStyle       = Dundas.Charting.WebControl.MarkerStyle.Circle;
        series3.MarkerSize        = 5;
        series3.MarkerColor       = GetChartColor2(1);
        series3.MarkerBorderColor = GetChartColor2(1);

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

        DundasAnimations.DundasChartBase(chart1, AnimationTheme.None, -1, -1, false, 1);
        DundasAnimations.GrowingAnimation(chart1, series1, 0.5, 3.0, true);
        DundasAnimations.GrowingAnimation(chart1, series2, 0.5, 3.0, true);
        DundasAnimations.GrowingAnimation(chart1, series3, 0.5, 3.0, true);

        chart1.DataBind();
    }
コード例 #3
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();
    }
コード例 #4
0
    private void DoDrawingChart2(DataTable dtChart, Dundas.Charting.WebControl.Chart chart)
    {
        int chartWidth  = 300;
        int chartHeight = 270;

        // 당월그래프
        DundasCharts.DundasChartBase(chart
                                     , Dundas.Charting.WebControl.ChartImageType.Flash
                                     , chartWidth
                                     , chartHeight
                                     , Dundas.Charting.WebControl.BorderSkinStyle.Emboss
                                     , CHART_BORDER_BLUE
                                     , 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
                                     , GradientType.Center
                                     , AntiAliasing.Graphics);

        chart.DataSource = dtChart;

        Dundas.Charting.WebControl.Series series1 = DundasCharts.CreateSeries(chart, "serPlan", "Default", "등급", null, Dundas.Charting.WebControl.SeriesChartType.Column, 1
                                                                              , GetChartColor2(3)
                                                                              , 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  = GetChartColor2(3);
        series1.ShadowOffset = 0;
        chart.Series["serPlan"]["PointWidth"] = "0.5";
        //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.ValueMembersY = "GRADE_COUNT";
        //series2.YValueMembers = "GRADE_COUNT";
        series1.ValueMemberX = "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;
        //}
        DundasAnimations.DundasChartBase(chart2, AnimationTheme.None, -1, -1, false, 1);
        DundasAnimations.GrowingAnimation(chart2, series1, 0.5, 3.0, true);

        // chart.DataBind();
    }
コード例 #5
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();
            }
        }
    }
コード例 #6
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;
        }
    }
コード例 #7
0
    private void SetResutlGraph(DataSet iDs)
    {
        Font fntDefault = new Font("Tahoma", 9f, FontStyle.Regular, GraphicsUnit.Pixel);

        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());
        }

        // 당월그래프
        DundasCharts.DundasChartBase(chartMM, Dundas.Charting.WebControl.ChartImageType.Flash, 385, 230
                                     , Dundas.Charting.WebControl.BorderSkinStyle.Emboss
                                     , Color.FromArgb(87, 123, 210)
                                     , 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, GradientType.TopBottom, AntiAliasing.None);

        chartMM.DataSource = dsGrph;


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

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

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

        series3.MarkerStyle = Dundas.Charting.WebControl.MarkerStyle.Circle;
        string sChartArea = chartMM.Series[series2.Name].ChartArea;

        chartMM.ChartAreas[sChartArea].AxisY.LabelStyle.Format  = "N0";
        chartMM.ChartAreas[sChartArea].AxisY2.LabelStyle.Format = "P";
        chartMM.ChartAreas[sChartArea].AxisY2.LabelStyle.Font   = fntDefault;

        chartMM.ChartAreas[sChartArea].Area3DStyle.Enable3D = false;

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

        chartMM.DataBind();

        // 누계그래프
        DundasCharts.DundasChartBase(chartTM,
                                     Dundas.Charting.WebControl.ChartImageType.Flash, 385, 230
                                     , Dundas.Charting.WebControl.BorderSkinStyle.Emboss
                                     , Color.FromArgb(87, 123, 210)
                                     , 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, GradientType.TopBottom, AntiAliasing.None);

        chartTM.DataSource = dsGrph;

        Dundas.Charting.WebControl.Series series4 = DundasCharts.CreateSeries(chartTM, "serPlan", "Default", "누적계획", null, Dundas.Charting.WebControl.SeriesChartType.Column, 1, GetChartColor2(3), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
        Dundas.Charting.WebControl.Series series5 = DundasCharts.CreateSeries(chartTM, "serActl", "Default", "누적실적", null, Dundas.Charting.WebControl.SeriesChartType.Column, 1, GetChartColor2(4), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
        Dundas.Charting.WebControl.Series series6 = DundasCharts.CreateSeries(chartTM, "serRate", "Default", (kpiType == "BTY" ? "한계초과율" : "달성율"), null, Dundas.Charting.WebControl.SeriesChartType.Line, 1, GetChartColor2(2), GetChartColor2(2), Color.FromArgb(64, 0, 0, 0), 1, 3, Color.FromArgb(64, 64, 64));
        series6.YAxisType = Dundas.Charting.WebControl.AxisType.Secondary;

        series4.ValueMembersY = "TARGET_TS";
        series5.ValueMembersY = "RESULT_TS";
        series6.ValueMembersY = "GR_RATE_TS";
        series4.ValueMemberX  = "MM";

        series4.ToolTip = "#VALY{N0}";
        series5.ToolTip = "#VALY{N0}";
        series6.ToolTip = "#VALY{P}";

        sChartArea = chartTM.Series[series4.Name].ChartArea;
        chartTM.ChartAreas[sChartArea].AxisY.LabelStyle.Format  = "N0";
        chartTM.ChartAreas[sChartArea].AxisY2.LabelStyle.Format = "P";
        chartTM.ChartAreas[sChartArea].AxisY2.LabelStyle.Font   = fntDefault;
        chartTM.ChartAreas[sChartArea].Area3DStyle.Enable3D     = false;

        series6.MarkerStyle = Dundas.Charting.WebControl.MarkerStyle.Circle;
        DundasAnimations.DundasChartBase(chartTM, AnimationTheme.None, -1, -1, false, 1);
        DundasAnimations.GrowingAnimation(chartTM, series4, 0.5, 2.0, true);
        DundasAnimations.GrowingAnimation(chartTM, series5, 0.5, 2.0, true);
        DundasAnimations.GrowingAnimation(chartTM, series6, 0.5, 2.0, true);

        chartTM.DataBind();
    }
コード例 #8
0
        /// <summary>
        /// A cleanup method that ensures the XValues are sorted accordingly and set explicitly.
        /// It will also create the totals for the DUMMY series.
        /// </summary>
        private void AdjustXValues(Dundas.Charting.WebControl.Series series)
        {
            bool AddDummyPoints = true;

            if (series.Name == "DUMMY")
            {
                return;
            }
            else if (ChartObj.Series["DUMMY"].Points.Count > 0)
            {
                AddDummyPoints = false;
            }

            // sort the series
            series.Sort(PointsSortOrder.Ascending, "X");

            bool IsIndexed = false;

            if (series.XValueIndexed)
            {
                IsIndexed = true;
            }
            else
            {
                bool IsFirstPoint    = true;
                bool IsLastPointZero = false;

                // the series X values must be set and greater than zero
                foreach (DataPoint pt in series.Points)
                {
                    if (pt.XValue == 0 && !IsFirstPoint && IsLastPointZero)
                    {
                        IsIndexed = true;
                        break;
                    }
                    else if (pt.XValue == 0 && IsFirstPoint)
                    {
                        IsLastPointZero = true;
                    }

                    IsFirstPoint = false;
                }
            }

            if (IsIndexed)
            {
                series.XValueIndexed = false;
                int XValue = 0;

                foreach (DataPoint pt in series.Points)
                {
                    pt.XValue = ++XValue;
                }
            }

            series.Points.AddXY(series.Points[series.Points.Count - 1].XValue + 1, 0);
            series.Points[series.Points.Count - 1].AxisLabel   = "Total";
            series.Points[series.Points.Count - 1].Color       = Color.Transparent;
            series.Points[series.Points.Count - 1].BorderColor = Color.Transparent;

            int index = 0;

            foreach (DataPoint pt in series.Points)
            {
                if (AddDummyPoints)
                {
                    ChartObj.Series["DUMMY"].Points.AddXY(pt.XValue, pt.YValues[0]);
                }
                else
                {
                    ChartObj.Series["DUMMY"].Points[index].YValues[0] += pt.YValues[0];
                }

                index++;
            }
        }