Ejemplo n.º 1
0
    private void BindingChartOneYear(Dundas.Charting.WebControl.Chart chart, string yearStr, string monthStr, string type, string gubn)
    {
        chart.DataSource = GetChartDataTableOneYear(yearStr, monthStr, type, gubn).DefaultView;

        DundasCharts.DundasChartBase(chart, ChartImageType.Flash, 400, 300
                                     , BorderSkinStyle.Emboss, Color.FromArgb(181, 64, 1), 2
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE), Color.FromArgb(0x20, 0x80, 0xD0), ChartDashStyle.Solid
                                     , -1
                                     , ChartHatchStyle.None, GradientType.TopBottom, AntiAliasing.None);

        Series series1 = DundasCharts.CreateSeries(chart, "Series1", "Default", "차이량", null, 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 series2 = DundasCharts.CreateSeries(chart, "Series2", "Default", "차이비율", null, SeriesChartType.Line, 3, Color.FromArgb(0xFF, 0x8A, 0x00), Color.FromArgb(0xD7, 0x41, 0x01), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));

        series1.ValueMemberX  = "MONTH";
        series1.ValueMembersY = "DIFF_ADJUST_QNT";
        series2.ValueMembersY = "RATE_ADJUST";

        series2.YAxisType = AxisType.Secondary;

        DundasAnimations.DundasChartBase(chart, AnimationTheme.None, -1, -1, false, 1);
        DundasAnimations.GrowingAnimation(chart, series1, 0.0, 5.0, false);
        DundasAnimations.GrowingAnimation(chart, series2, 1.0, 2.0, true);

        series2.MarkerStyle = MarkerStyle.Diamond;

        series2.MarkerColor = Color.FromArgb(0xFF, 0xAA, 0x20);

        series2.MarkerBorderColor = Color.FromArgb(0xD7, 0x41, 0x01);
    }
    public void SetChartStyle(Dundas.Charting.WebControl.Chart chart)
    {
        if (chart == null)
        {
            return;
        }

        chart.Width   = 750;
        chart.Height  = 350;
        chart.Palette = ChartColorPalette.Dundas;
        chart.BackGradientEndColor = System.Drawing.Color.White;
        chart.BackGradientType     = GradientType.TopBottom;
        chart.BorderLineWidth      = 0;
        chart.BorderLineStyle      = ChartDashStyle.Solid;
        chart.BackColor            = System.Drawing.Color.FromArgb(222, 230, 240);
        chart.BorderLineColor      = System.Drawing.Color.FromArgb(64, 0, 0, 0);

        chart.BorderSkin.FrameBackColor            = System.Drawing.Color.CornflowerBlue;
        chart.BorderSkin.FrameBackGradientEndColor = System.Drawing.Color.CornflowerBlue;
        chart.BorderSkin.SkinStyle = BorderSkinStyle.Emboss;

        chart.Legends["Default"].LegendStyle = LegendStyle.Table;
        chart.Legends["Default"].Docking     = LegendDocking.Top;
        chart.Legends["Default"].Alignment   = System.Drawing.StringAlignment.Center;
        chart.Legends["Default"].TableStyle  = LegendTableStyle.Auto;
    }
Ejemplo n.º 3
0
    private void BindingChart(Dundas.Charting.WebControl.Chart chart, DataTable dtData)
    {
        DundasCharts.DundasChartBase(chart, ChartImageType.Flash, 800, 300
                                     , BorderSkinStyle.Emboss, Color.FromArgb(181, 64, 1), 2
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE), Color.FromArgb(0x20, 0x80, 0xD0), ChartDashStyle.Solid
                                     , -1
                                     , ChartHatchStyle.None, GradientType.TopBottom, AntiAliasing.None);

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

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

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

        chart.DataSource = dtData;
        chart.DataBind();
    }
Ejemplo n.º 4
0
    private void BindingColumChart_2(Dundas.Charting.WebControl.Chart chart, string dateStr)
    {
        chart.DataSource = GetChartDataTable_2(dateStr).DefaultView;

        DundasCharts.DundasChartBase(chart, ChartImageType.Flash, 400, 180
                                     , BorderSkinStyle.Emboss, Color.FromArgb(181, 64, 1), 2
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE), Color.FromArgb(0x20, 0x80, 0xD0), ChartDashStyle.Solid
                                     , -1
                                     , ChartHatchStyle.None, GradientType.TopBottom, AntiAliasing.None);

        Series series1 = DundasCharts.CreateSeries(chart, "Series4", "Default", "판매실적", null, 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 series2 = DundasCharts.CreateSeries(chart, "Series2", "Default", "생산량", null, 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 series3 = DundasCharts.CreateSeries(chart, "Series3", "Default", "부하율", null, SeriesChartType.Column, 1, Color.FromArgb(0x00, 0xC4, 0xCB), Color.FromArgb(0x00, 0xC4, 0xCB), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
        //Series series4 = DundasCharts.CreateSeries(chart, "Series4", "Default", "협력업체", null, SeriesChartType.Line, 1, Color.FromArgb(0xE4, 0xE4, 0xE4), Color.FromArgb(0xE4, 0xE4, 0xE4), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));

        series1.ValueMemberX  = "PAN_ITMNM";
        series1.ValueMembersY = "PAN_QTY";
        series1.ToolTip       = "#VALY{N0}";
        //series2.ValueMembersY = "PROD_QTY";
        //series3.ValueMembersY = "BUHA";

        DundasAnimations.DundasChartBase(chart, AnimationTheme.None, -1, -1, false, 1);
        DundasAnimations.GrowingAnimation(chart, series1, 0.0, 3.0, false);
        //DundasAnimations.GrowingAnimation(chart, series2, 3.0, 4.0, true);
        //DundasAnimations.GrowingAnimation(chart, series3, 4.0, 6.0, true);
        series1.ShowLabelAsValue = true;
        series1.LabelFormat      = "N0";
    }
Ejemplo n.º 5
0
    private void BindingChart(Dundas.Charting.WebControl.Chart chart, string areaStr)
    {
        string query_jikgub = GetJikGubQuery();

        dbAgent = new DBAgent(System.Configuration.ConfigurationManager.ConnectionStrings["EISDB"].ConnectionString);
        DataSet ds_jikgub = dbAgent.FillDataSet(query_jikgub, "Data");

        //chart.DataSource = GetChartDataTable(areaStr).DefaultView;

        DataTable dt = GetChartDataTable(areaStr);

        DundasCharts.DundasChartBase(chart, ChartImageType.Flash, 800, 390
                                     , BorderSkinStyle.Emboss, Color.FromArgb(181, 64, 1), 2
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE), Color.FromArgb(0x20, 0x80, 0xD0), ChartDashStyle.Solid
                                     , -1
                                     , ChartHatchStyle.None, GradientType.TopBottom, AntiAliasing.None);

        Series series = null;

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

        for (int i = 0; i < ds_jikgub.Tables[0].Rows.Count; i++)
        {
            series = DundasCharts.CreateSeries(chart, "Series" + i.ToString(), "Default", ds_jikgub.Tables[0].Rows[i]["JIKGUB_NM"].ToString(), null, SeriesChartType.StackedColumn, 1, GetChartColor(i), Color.FromArgb(0x4A, 0x58, 0x7E), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
            //series.ValueMembersY = "C_" + ds_jikgub.Tables[0].Rows[i]["JIKGUB_NM"].ToString();
            DatabaseBindingXY(series, "TEAM_NM", "C_" + ds_jikgub.Tables[0].Rows[i]["JIKGUB_NM"].ToString(), dt);
            series["DrawingStyle"] = "Cylinder";
            DundasAnimations.FadingAnimation(chart, series, 0.5 * i, 0.5 * (i + 1), false, false);
            series.ShowLabelAsValue = true;
            series.ToolTip          = "#VALY{N0}";

            SetVisibleZeroLabelText(chart);
        }
    }
Ejemplo n.º 6
0
    private void BindingChart(Dundas.Charting.WebControl.Chart chart, string yearStr, string monthStr, string type)
    {
        string typeStr = "";

        chart.DataSource = GetChartDataTable(yearStr, monthStr, type).DefaultView;

        DundasCharts.DundasChartBase(chart, ChartImageType.Flash, 800, 300
                                     , BorderSkinStyle.Emboss, Color.FromArgb(181, 64, 1), 2
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE), Color.FromArgb(0x20, 0x80, 0xD0), ChartDashStyle.Solid
                                     , -1
                                     , ChartHatchStyle.None, GradientType.TopBottom, AntiAliasing.None);

        Series series1 = DundasCharts.CreateSeries(chart, "Series1", "Default", "계획", null, SeriesChartType.Column, 1, GetChartColor(0), GetChartColor(0), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
        Series series2 = DundasCharts.CreateSeries(chart, "Series2", "Default", "실적", null, SeriesChartType.Column, 1, GetChartColor(1), GetChartColor(1), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
        Series series3 = DundasCharts.CreateSeries(chart, "Series3", "Default", "집행율", null, SeriesChartType.Line, 3, GetChartColor(2), GetChartColor(2), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));

        //Series series4 = DundasCharts.CreateSeries(chart, "Series4", "Default", "협력업체", null, SeriesChartType.Line, 1, Color.FromArgb(0xE4, 0xE4, 0xE4), Color.FromArgb(0xE4, 0xE4, 0xE4), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));

        if (type.Equals("1"))
        {
            typeStr = "";
        }
        else
        {
            typeStr = "SUM_";
        }

        series1.ValueMemberX  = "MONTH";
        series1.ValueMembersY = "EMP_" + typeStr + "PLAN";
        series2.ValueMembersY = "EMP_" + typeStr + "ACTUAL";
        series3.ValueMembersY = "EMP_" + typeStr + "ACHIVE";

        series3.YAxisType = AxisType.Secondary;

        //series3.ValueMembersY = "T_" + Convert.ToString(int.Parse(yearStr) - 1);
        //series4.ValueMembersY = "T_40000";

        DundasAnimations.DundasChartBase(chart, AnimationTheme.None, -1, -1, false, 1);
        DundasAnimations.GrowingAnimation(chart, series1, 0.0, 2.0, false);
        DundasAnimations.GrowingAnimation(chart, series2, 1.0, 3.0, true);
        DundasAnimations.GrowingAnimation(chart, series3, 0.5, 1.0, true);
        //DundasAnimations.GrowingAnimation(chart, series4, 6.0, 8.0, true);

        //series1.MarkerStyle = MarkerStyle.Circle;
        //series2.MarkerStyle = MarkerStyle.Diamond;
        //series3.MarkerStyle = MarkerStyle.Triangle;
        //series4.MarkerStyle = MarkerStyle.Square;
        //series1.MarkerColor = Color.FromArgb(0x7A, 0x9D, 0xFE);
        //series2.MarkerColor = Color.FromArgb(0xFF, 0xAA, 0x20);
        //series3.MarkerColor = Color.FromArgb(0x20, 0xE4, 0xEB);
        //series4.MarkerColor = Color.FromArgb(0xE4, 0xE4, 0xE4);
        //series1.MarkerBorderColor = Color.FromArgb(0x4A, 0x58, 0x7E);
        //series2.MarkerBorderColor = Color.FromArgb(0xD7, 0x41, 0x01);
        //series3.MarkerBorderColor = Color.FromArgb(0x00, 0xC4, 0xCB);
        //series4.MarkerBorderColor = Color.FromArgb(0xE4, 0xE4, 0xE4);

        chart.ChartAreas["Default"].AxisY2.LabelStyle.Format = "P0";
    }
Ejemplo n.º 7
0
    //private void SetDropDownListItem(System.Web.UI.WebControls.DropDownList ddlItem)
    //{
    //    string query = @"SELECT DISTINCT ITMU_IDX, ITMU_NAME FROM D_ITEM_UTIL";
    //    dbAgent = new DBAgent(System.Configuration.ConfigurationManager.ConnectionStrings["EISDB"].ConnectionString);
    //    DataSet ds = dbAgent.FillDataSet(query, "Data");
    //    ddlItem.DataSource = ds;
    //    ddlItem.DataValueField  = "ITMU_IDX";
    //    ddlItem.DataTextField   = "ITMU_NAME";
    //    ddlItem.DataBind();
    //}
    private void BindingChart_1(Dundas.Charting.WebControl.Chart chart, string yearStr)
    {
        string query_item = @"SELECT PAN_ITMNM from D_ITEM_PANMAE WHERE PAN_ITMNM LIKE '%락탐%' GROUP BY PAN_ITMNM";

        dbAgent = new DBAgent(System.Configuration.ConfigurationManager.ConnectionStrings["EISDB"].ConnectionString);
        DataSet ds_item = dbAgent.FillDataSet(query_item, "Data");

        //chart.DataSource = GetChartDataTable_1(yearStr).DefaultView;
        //DataGrid1.DataSource = GetChartDataTable(yearStr).DefaultView;
        //DataGrid1.DataBind();

        DataTable dt = GetChartDataTable_1(yearStr);

        DundasCharts.DundasChartBase(chart, ChartImageType.Flash, 800, 182
                                     , BorderSkinStyle.Emboss, Color.FromArgb(181, 64, 1), 2
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE), Color.FromArgb(0x20, 0x80, 0xD0), ChartDashStyle.Solid
                                     , -1
                                     , ChartHatchStyle.None, GradientType.TopBottom, AntiAliasing.None);

        Series series = null;

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

        for (int i = 0; i < ds_item.Tables[0].Rows.Count; i++)
        {
            series = DundasCharts.CreateSeries(chart, "Series" + i.ToString(), "Default", ds_item.Tables[0].Rows[i]["PAN_ITMNM"].ToString(), null, SeriesChartType.Line, 3, GetChartColor(i), GetChartColor(i), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
            //series.ValueMembersY = "C_" + ds_item.Tables[0].Rows[i]["PAN_IDX"].ToString();
            DatabaseBindingXY(series, "MONTH", "C_" + ds_item.Tables[0].Rows[i]["PAN_ITMNM"].ToString(), dt);
            DundasAnimations.GrowingAnimation(chart, series, i, (i + 1), false);
            if (ds_item.Tables[0].Rows[i]["PAN_ITMNM"].ToString() == "용융락탐")
            {
                series.YAxisType = AxisType.Secondary;
            }
            series.MarkerStyle       = GetMarkerStyle(i);
            series.MarkerColor       = GetChartColor(i);
            series.MarkerBorderColor = GetChartColor(i);
            series.ToolTip           = "#VALY{N0}";

            //if (ds_item.Tables[0].Rows[i]["PAN_ITMNM"].ToString().IndexOf("공업용유안25Kg(Pk)") < 0)
            //    series.YAxisType = AxisType.Secondary;

            string sChartArea = chart.Series[series.Name].ChartArea;
            chart.ChartAreas[sChartArea].AxisY.LabelStyle.Format  = "N0";
            chart.ChartAreas[sChartArea].AxisY2.LabelStyle.Format = "N0";

            //SetZeroPoint(chart, int.Parse(ddlYear.SelectedValue));
        }

        SetVisibleZeroPoint(chart, Convert.ToInt32(PageUtility.GetByValueDropDownList(ddlYear)));

        Font   font1  = new Font("Gulim", 9, FontStyle.Regular);
        Legend legend = DundasCharts.CreateLegend(chart, "Default", Color.Transparent, Color.Empty, Color.Empty, font1, true, -1, -1, -1, -1);

        DundasCharts.SetChartArea(chart.ChartAreas["Default"], false);
    }
Ejemplo n.º 8
0
    //private void SetDropDownListItem(System.Web.UI.WebControls.DropDownList ddlItem)
    //{
    //    string query = @"SELECT DISTINCT ITMU_IDX, ITMU_NAME FROM D_ITEM_UTIL";
    //    dbAgent = new DBAgent(System.Configuration.ConfigurationManager.ConnectionStrings["EISDB"].ConnectionString);
    //    DataSet ds = dbAgent.FillDataSet(query, "Data");
    //    ddlItem.DataSource = ds;
    //    ddlItem.DataValueField  = "ITMU_IDX";
    //    ddlItem.DataTextField   = "ITMU_NAME";
    //    ddlItem.DataBind();
    //}
    private void BindingChart(Dundas.Charting.WebControl.Chart chart, string yearStr)
    {
        string query_item = @"SELECT PAN_IDX, PAN_ITMNM from D_ITEM_PANMAE WHERE PAN_ITMNM LIKE '%유안%'";

        dbAgent = new DBAgent(System.Configuration.ConfigurationManager.ConnectionStrings["EISDB"].ConnectionString);
        DataSet ds_item = dbAgent.FillDataSet(query_item, "Data");

        chart.DataSource = GetChartDataTable(yearStr).DefaultView;
        //DataGrid1.DataSource = GetChartDataTable(yearStr).DefaultView;
        //DataGrid1.DataBind();

        DundasCharts.DundasChartBase(chart, ChartImageType.Flash, 800, 450
                                     , BorderSkinStyle.Emboss, Color.FromArgb(181, 64, 1), 2
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE), Color.FromArgb(0x20, 0x80, 0xD0), ChartDashStyle.Solid
                                     , -1
                                     , ChartHatchStyle.None, GradientType.TopBottom, AntiAliasing.None);

        Series series = null;

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

        for (int i = 0; i < ds_item.Tables[0].Rows.Count; i++)
        {
            series = DundasCharts.CreateSeries(chart, "Series" + i.ToString(), "Default", ds_item.Tables[0].Rows[i]["PAN_ITMNM"].ToString(), null, SeriesChartType.Line, 3, GetChartColor(i), GetChartColor(i), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
            series.ValueMembersY = "C_" + ds_item.Tables[0].Rows[i]["PAN_IDX"].ToString();
            DundasAnimations.GrowingAnimation(chart, series, 2 * i, 2 * (i + 1), false);
            series.MarkerStyle       = GetMarkerStyle(i);
            series.MarkerColor       = GetChartColor(i);
            series.MarkerBorderColor = GetChartColor(i);

            //if (ds_item.Tables[0].Rows[i]["PAN_ITMNM"].ToString().IndexOf("공업용유안25Kg(Pk)") < 0)
            //    series.YAxisType = AxisType.Secondary;

            if (i == 0)
            {
                series.ValueMemberX = "MONTH";
            }
        }

        chart.Legends.Add(new Legend("test"));
        Chart1.Legends["test"].Alignment    = StringAlignment.Center;
        Chart1.Legends["test"].Docking      = LegendDocking.Top;
        Chart1.Legends["test"].ShadowOffset = 0;
        Chart1.Legends["test"].LegendStyle  = LegendStyle.Row;
        Chart1.Legends["test"].Font         = new Font(Chart1.Legends["Default"].Font.FontFamily, 9);

        Font   font1  = new Font("Gulim", 9, FontStyle.Regular);
        Legend legend = DundasCharts.CreateLegend(Chart1, "Default", Color.Transparent, Color.Empty, Color.Empty, font1, true, -1, -1, -1, -1);

        DundasCharts.SetChartArea(Chart1.ChartAreas["Default"], false);
    }
Ejemplo n.º 9
0
        /// <summary>
        /// Initialize the specified ChartArea with a table.
        /// </summary>
        public void Initialize(Dundas.Charting.WebControl.Chart chartObj, string chartAreaName)
        {
            ChartObj = chartObj;

            AddDataTable(chartAreaName);

            if (!Initialized)
            {
                ChartObj.PostPaint += new Dundas.Charting.WebControl.PaintEventHandler(this.Chart_PostPaint);
            }

            Initialized = true;
        }
Ejemplo n.º 10
0
        /// <summary>
        /// Initialize all ChartAreas with a table.
        /// </summary>
        public void Initialize(Dundas.Charting.WebControl.Chart chartObj)
        {
            ChartObj = chartObj;

            foreach (ChartArea area in ChartObj.ChartAreas)
            {
                AddDataTable(area.Name);
            }

            if (!Initialized)
            {
                ChartObj.PostPaint += new Dundas.Charting.WebControl.PaintEventHandler(this.Chart_PostPaint);
            }

            Initialized = true;
        }
Ejemplo n.º 11
0
    private void BindingChart(Dundas.Charting.WebControl.Chart chart, string yearStr)
    {
        //DataSet ds = GetDataSet(GetChartQuery(yearStr));
        chart.DataSource = GetDataTable(yearStr).DefaultView;

        int cYear = int.Parse(yearStr.Substring(0, 4));
        int pYear = cYear - 1;

        DundasCharts.DundasChartBase(chart, ChartImageType.Flash, 800, 300
                                     , BorderSkinStyle.Emboss, Color.FromArgb(181, 64, 1), 2
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE), Color.FromArgb(0x20, 0x80, 0xD0), ChartDashStyle.Solid
                                     , -1
                                     , ChartHatchStyle.None, GradientType.TopBottom, AntiAliasing.None);

        Series series1 = DundasCharts.CreateSeries(chart, "Series1", "Default", pYear.ToString() + "상반기", null, SeriesChartType.Line, 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 series2 = DundasCharts.CreateSeries(chart, "Series2", "Default", pYear.ToString() + "하반기", null, SeriesChartType.Line, 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 series3 = DundasCharts.CreateSeries(chart, "Series3", "Default", cYear.ToString() + "상반기", null, SeriesChartType.Line, 3, Color.FromArgb(0x00, 0xC4, 0xCB), Color.FromArgb(0x00, 0xC4, 0xCB), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
        Series series4 = DundasCharts.CreateSeries(chart, "Series4", "Default", cYear.ToString() + "하반기", null, SeriesChartType.Line, 3, Color.FromArgb(0xE4, 0xE4, 0xE4), Color.FromArgb(0xE4, 0xE4, 0xE4), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));

        series1.ValueMemberX  = "SEM_CODE2_NAME";
        series1.ValueMembersY = "T_" + pYear + "_1";
        series2.ValueMembersY = "T_" + pYear + "_2";
        series3.ValueMembersY = "T_" + cYear + "_3";
        series4.ValueMembersY = "T_" + cYear + "_4";

        DundasAnimations.DundasChartBase(chart, AnimationTheme.None, -1, -1, false, 1);
        DundasAnimations.GrowingAnimation(chart, series1, 0.0, 2.0, false);
        DundasAnimations.GrowingAnimation(chart, series2, 2.0, 3.0, true);
        DundasAnimations.GrowingAnimation(chart, series3, 3.0, 5.0, true);
        DundasAnimations.GrowingAnimation(chart, series4, 5.0, 6.0, true);

        series1.MarkerStyle       = MarkerStyle.Circle;
        series2.MarkerStyle       = MarkerStyle.Diamond;
        series3.MarkerStyle       = MarkerStyle.Triangle;
        series4.MarkerStyle       = MarkerStyle.Square;
        series1.MarkerColor       = Color.FromArgb(0x7A, 0x9D, 0xFE);
        series2.MarkerColor       = Color.FromArgb(0xFF, 0xAA, 0x20);
        series3.MarkerColor       = Color.FromArgb(0x20, 0xE4, 0xEB);
        series4.MarkerColor       = Color.FromArgb(0xE4, 0xE4, 0xE4);
        series1.MarkerBorderColor = Color.FromArgb(0x4A, 0x58, 0x7E);
        series2.MarkerBorderColor = Color.FromArgb(0xD7, 0x41, 0x01);
        series3.MarkerBorderColor = Color.FromArgb(0x00, 0xC4, 0xCB);
        series4.MarkerBorderColor = Color.FromArgb(0xE4, 0xE4, 0xE4);
    }
Ejemplo n.º 12
0
    private void BindingChart(Dundas.Charting.WebControl.Chart chart, string yearStr, string monthStr)
    {
        //DataGrid1.DataSource = GetChartDataTable(yearStr, monthStr);
        //DataGrid1.DataBind();

        chart.DataSource = GetChartDataTable(yearStr, monthStr).DefaultView;

        DundasCharts.DundasChartBase(chart, ChartImageType.Flash, 800, 300
                                     , BorderSkinStyle.Emboss, Color.FromArgb(181, 64, 1), 2
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE), Color.FromArgb(0x20, 0x80, 0xD0), ChartDashStyle.Solid
                                     , -1
                                     , ChartHatchStyle.None, GradientType.TopBottom, AntiAliasing.None);

        Series series1 = DundasCharts.CreateSeries(chart, "Series1", "Default", "당년 실적", null, SeriesChartType.Line, 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 series2 = DundasCharts.CreateSeries(chart, "Series2", "Default", "전년 실적", null, SeriesChartType.Line, 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 series4 = DundasCharts.CreateSeries(chart, "Series4", "Default", "협력업체", null, SeriesChartType.Line, 1, Color.FromArgb(0xE4, 0xE4, 0xE4), Color.FromArgb(0xE4, 0xE4, 0xE4), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));

        series1.ValueMemberX  = "Month";
        series1.ValueMembersY = "T_1";
        series2.ValueMembersY = "T_2";
        //series3.ValueMembersY = "T_" + Convert.ToString(int.Parse(yearStr) - 1);
        //series4.ValueMembersY = "T_40000";

        DundasAnimations.DundasChartBase(chart, AnimationTheme.None, -1, -1, false, 1);
        DundasAnimations.GrowingAnimation(chart, series1, 0.0, 1.0, false);
        DundasAnimations.GrowingAnimation(chart, series2, 0.5, 1.0, true);
        //DundasAnimations.GrowingAnimation(chart, series3, 4.0, 6.0, true);
        //DundasAnimations.GrowingAnimation(chart, series4, 6.0, 8.0, true);

        series1.MarkerStyle = MarkerStyle.Circle;
        series2.MarkerStyle = MarkerStyle.Diamond;
        //series3.MarkerStyle = MarkerStyle.Triangle;
        //series4.MarkerStyle = MarkerStyle.Square;
        series1.MarkerColor = Color.FromArgb(0x7A, 0x9D, 0xFE);
        series2.MarkerColor = Color.FromArgb(0xFF, 0xAA, 0x20);
        //series3.MarkerColor = Color.FromArgb(0x20, 0xE4, 0xEB);
        //series4.MarkerColor = Color.FromArgb(0xE4, 0xE4, 0xE4);
        series1.MarkerBorderColor = Color.FromArgb(0x4A, 0x58, 0x7E);
        series2.MarkerBorderColor = Color.FromArgb(0xD7, 0x41, 0x01);
        //series3.MarkerBorderColor = Color.FromArgb(0x00, 0xC4, 0xCB);
        //series4.MarkerBorderColor = Color.FromArgb(0xE4, 0xE4, 0xE4);
    }
Ejemplo n.º 13
0
    private void BindingChart(Dundas.Charting.WebControl.Chart chart, string yearStr, string monthStr, string areaStr, string type)
    {
        chart.DataSource = GetChartDataTable(yearStr, monthStr, areaStr, type).DefaultView;

        DundasCharts.DundasChartBase(chart, ChartImageType.Flash, 800, 300
                                     , BorderSkinStyle.Emboss, Color.FromArgb(181, 64, 1), 2
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE), Color.FromArgb(0x20, 0x80, 0xD0), ChartDashStyle.Solid
                                     , -1
                                     , ChartHatchStyle.None, GradientType.TopBottom, AntiAliasing.None);

        Series series1 = DundasCharts.CreateSeries(chart, "Series1", "Default", "예산", null, 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 series2 = DundasCharts.CreateSeries(chart, "Series2", "Default", "실적", null, 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 series3 = DundasCharts.CreateSeries(chart, "Series3", "Default", "집행률", null, SeriesChartType.Line, 3, Color.FromArgb(0x00, 0xC4, 0xCB), Color.FromArgb(0x00, 0xC4, 0xCB), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));

        //Series series4 = DundasCharts.CreateSeries(chart, "Series4", "Default", "협력업체", null, SeriesChartType.Line, 1, Color.FromArgb(0xE4, 0xE4, 0xE4), Color.FromArgb(0xE4, 0xE4, 0xE4), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));

        series1.ValueMemberX  = "MONTH_NAME";
        series1.ValueMembersY = "BUDGET";
        series2.ValueMembersY = "ACTUAL";
        series3.ValueMembersY = "RATE";
        //series4.ValueMembersY = "T_40000";

        DundasAnimations.DundasChartBase(chart, AnimationTheme.None, -1, -1, false, 1);
        DundasAnimations.GrowingAnimation(chart, series1, 0.5, 1.0, false);
        DundasAnimations.GrowingAnimation(chart, series2, 1.0, 2.0, true);
        DundasAnimations.GrowingAnimation(chart, series3, 1.0, 2.0, true);
        //DundasAnimations.GrowingAnimation(chart, series4, 6.0, 8.0, true);

        //series1.MarkerStyle = MarkerStyle.Circle;
        //series2.MarkerStyle = MarkerStyle.Diamond;
        //series3.MarkerStyle = MarkerStyle.Triangle;
        //series4.MarkerStyle = MarkerStyle.Square;
        //series1.MarkerColor = Color.FromArgb(0x7A, 0x9D, 0xFE);
        //series2.MarkerColor = Color.FromArgb(0xFF, 0xAA, 0x20);
        //series3.MarkerColor = Color.FromArgb(0x20, 0xE4, 0xEB);
        //series4.MarkerColor = Color.FromArgb(0xE4, 0xE4, 0xE4);
        //series1.MarkerBorderColor = Color.FromArgb(0x4A, 0x58, 0x7E);
        //series2.MarkerBorderColor = Color.FromArgb(0xD7, 0x41, 0x01);
        //series3.MarkerBorderColor = Color.FromArgb(0x00, 0xC4, 0xCB);
        //series4.MarkerBorderColor = Color.FromArgb(0xE4, 0xE4, 0xE4);
    }
Ejemplo n.º 14
0
    private void BindingChartThreeYear(Dundas.Charting.WebControl.Chart chart, string yearStr, string monthStr, string type, string gubn)
    {
        chart.DataSource = GetChartDataTableThreeYear(yearStr, monthStr, type, gubn).DefaultView;

        DundasCharts.DundasChartBase(chart, ChartImageType.Flash, 400, 300
                                     , BorderSkinStyle.Emboss, Color.FromArgb(181, 64, 1), 2
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE), Color.FromArgb(0x20, 0x80, 0xD0), ChartDashStyle.Solid
                                     , -1
                                     , ChartHatchStyle.None, GradientType.TopBottom, AntiAliasing.None);

        Series series1 = DundasCharts.CreateSeries(chart, "Series4", "Default", Convert.ToString(int.Parse(yearStr) - 0) + "년", null, SeriesChartType.Line, 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 series2 = DundasCharts.CreateSeries(chart, "Series5", "Default", Convert.ToString(int.Parse(yearStr) - 1) + "년", null, SeriesChartType.Line, 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 series3 = DundasCharts.CreateSeries(chart, "Series6", "Default", Convert.ToString(int.Parse(yearStr) - 2) + "년", null, SeriesChartType.Line, 3, Color.FromArgb(0x00, 0xC4, 0xCB), Color.FromArgb(0x00, 0xC4, 0xCB), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));

        //Series series4 = DundasCharts.CreateSeries(chart, "Series4", "Default", "협력업체", null, SeriesChartType.Line, 1, Color.FromArgb(0xE4, 0xE4, 0xE4), Color.FromArgb(0xE4, 0xE4, 0xE4), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));

        series1.ValueMemberX  = "MONTH";
        series1.ValueMembersY = "RATE_ADJUST" + Convert.ToString(int.Parse(yearStr) - 0);
        series2.ValueMembersY = "RATE_ADJUST" + Convert.ToString(int.Parse(yearStr) - 1);
        series3.ValueMembersY = "RATE_ADJUST" + Convert.ToString(int.Parse(yearStr) - 2);


        DundasAnimations.DundasChartBase(chart, AnimationTheme.None, -1, -1, false, 1);
        DundasAnimations.GrowingAnimation(chart, series1, 0.0, 1.0, false);
        DundasAnimations.GrowingAnimation(chart, series2, 1.0, 1.5, true);
        DundasAnimations.GrowingAnimation(chart, series3, 1.0, 2.0, true);

        series1.MarkerStyle = MarkerStyle.Circle;
        series2.MarkerStyle = MarkerStyle.Diamond;
        series3.MarkerStyle = MarkerStyle.Triangle;

        series1.MarkerColor = Color.FromArgb(0x7A, 0x9D, 0xFE);
        series2.MarkerColor = Color.FromArgb(0xFF, 0xAA, 0x20);
        series3.MarkerColor = Color.FromArgb(0x20, 0xE4, 0xEB);

        series1.MarkerBorderColor = Color.FromArgb(0x4A, 0x58, 0x7E);
        series2.MarkerBorderColor = Color.FromArgb(0xD7, 0x41, 0x01);
        series3.MarkerBorderColor = Color.FromArgb(0x00, 0xC4, 0xCB);
    }
Ejemplo n.º 15
0
        public Chart GerarGraficoColuna(string[,] valorXY, bool isPorcentagem)
        {
            Chart chart = new Dundas.Charting.WebControl.Chart();

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

            #region legenda

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

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

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

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

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

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

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

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

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

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

            #region Series
            chart.Series.Clear();

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

                chart.Series.Add(serie);

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

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

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

            chart.DataBind();
            #endregion

            return(chart);
        }
Ejemplo n.º 16
0
        public Chart GerarGraficoLinha(string[,] valorXY, string labelX, string labelY, bool isPorcentagem, double limiteGrafico)
        {
            Chart chart = new Dundas.Charting.WebControl.Chart();

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

            #region legenda

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

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

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

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

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

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

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

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

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

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

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

            #region Series
            chart.Series.Clear();

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

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

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

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

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

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

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

            chart.DataBind();
            #endregion

            return(chart);
        }
Ejemplo n.º 17
0
        public Chart GerarGraficoPizza(string[,] valorXY)
        {
            Chart chart = new Dundas.Charting.WebControl.Chart();

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

            #region legenda

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

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

            #endregion

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

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

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

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

            chart.DataBind();
            #endregion

            return(chart);
        }
Ejemplo n.º 18
0
        public Chart GerarGraficoColuna(string[, ,] valorXY, bool isPorcentagem, double maior_valor)
        {
            Chart chart = new Dundas.Charting.WebControl.Chart();

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

            #region legenda

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

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


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

            #endregion

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

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

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

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

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

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

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

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

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

            #region Series
            chart.Series.Clear();

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

                chart.Series.Add(serie);

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

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

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

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

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

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

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

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

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

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

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

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


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

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

            chart.DataBind();
            #endregion

            return(chart);
        }
Ejemplo n.º 19
0
 /// <summary>
 /// Initialize all ChartAreas with a table and
 /// set a boolean to show or hide total columns.
 /// </summary>
 public void Initialize(Dundas.Charting.WebControl.Chart chartObj, bool addTableTotals)
 {
     AddTableTotals = addTableTotals;
     Initialize(chartObj);
 }
Ejemplo n.º 20
0
        private Dundas.Charting.WebControl.Chart GetGroupedBarEstadualEstadoChart(List <RelParticipantesPorEtapa> lista)
        {
            double maior_valor = double.MinValue;

            string[, ,] valorXY = new string[9, lista.Count, 4];
            int i = 0;

            foreach (RelParticipantesPorEtapa item in lista)
            {
                int inscritas    = item.TotalInscritas;
                int candidatas   = item.TotalCandidatas;
                int classificada = item.TotalClassificadas;
                int finalista    = item.TotalFinalistasGestao;
                int vencedora    = item.TotalVencedoraGestao;

                int total_total = item.TotalInscritasPorTurma;

                decimal valor_perc = 0;
                String  estado     = item.Estado.Estado;
                //Inscritas
                Int32 k = 0;
                valor_perc       = (inscritas * decimal.Parse("100.00", enUS) / total_total);
                valorXY[k, i, 0] = valor_perc.ToString(); //inscritas.ToString();
                valorXY[k, i, 1] = "";                    //valor_perc.ToString("N2", enUS) + "%";
                valorXY[k, i, 2] = estado;
                valorXY[k, i, 3] = inscritas.ToString() + " - " + valor_perc.ToString("N2", enUS) + "% - " + estado;

                if (maior_valor < double.Parse(valor_perc.ToString()))
                {
                    maior_valor = double.Parse(valor_perc.ToString());
                }

                //Candidatas
                k++;
                valor_perc       = (candidatas * decimal.Parse("100.00", enUS) / total_total);
                valorXY[k, i, 0] = valor_perc.ToString(); //candidatas.ToString();
                valorXY[k, i, 1] = "";                    // valor_perc.ToString("N2", enUS) + "%";
                valorXY[k, i, 2] = estado;
                valorXY[k, i, 3] = candidatas.ToString() + " - " + valor_perc.ToString("N2", enUS) + "% - " + estado;

                if (maior_valor < double.Parse(valor_perc.ToString()))
                {
                    maior_valor = double.Parse(valor_perc.ToString());
                }

                //Classificada
                k++;
                valor_perc       = (classificada * decimal.Parse("100.00", enUS) / total_total);
                valorXY[k, i, 0] = valor_perc.ToString();
                valorXY[k, i, 1] = "";
                valorXY[k, i, 2] = estado;
                valorXY[k, i, 3] = classificada.ToString() + " - " + valor_perc.ToString("N2", enUS) + "% - " + estado;

                if (maior_valor < double.Parse(valor_perc.ToString()))
                {
                    maior_valor = double.Parse(valor_perc.ToString());
                }

                //FinalistasGestao
                k++;
                valor_perc       = (item.TotalFinalistasGestao * decimal.Parse("100.00", enUS) / total_total);
                valorXY[k, i, 0] = valor_perc.ToString();
                valorXY[k, i, 1] = "";
                valorXY[k, i, 2] = estado;
                valorXY[k, i, 3] = item.TotalFinalistasGestao.ToString() + " - " + valor_perc.ToString("N2", enUS) + "% - " + estado;

                if (maior_valor < double.Parse(valor_perc.ToString()))
                {
                    maior_valor = double.Parse(valor_perc.ToString());
                }

                //FinalistasRespSocial
                k++;
                valor_perc       = (item.TotalFinalistasRespSocial * decimal.Parse("100.00", enUS) / total_total);
                valorXY[k, i, 0] = valor_perc.ToString();
                valorXY[k, i, 1] = "";
                valorXY[k, i, 2] = estado;
                valorXY[k, i, 3] = item.TotalFinalistasRespSocial.ToString() + " - " + valor_perc.ToString("N2", enUS) + "% - " + estado;

                if (maior_valor < double.Parse(valor_perc.ToString()))
                {
                    maior_valor = double.Parse(valor_perc.ToString());
                }

                //FinalistasInovacao
                k++;
                valor_perc       = (item.TotalFinalistasInovacao * decimal.Parse("100.00", enUS) / total_total);
                valorXY[k, i, 0] = valor_perc.ToString();
                valorXY[k, i, 1] = "";
                valorXY[k, i, 2] = estado;
                valorXY[k, i, 3] = item.TotalFinalistasInovacao.ToString() + " - " + valor_perc.ToString("N2", enUS) + "% - " + estado;

                if (maior_valor < double.Parse(valor_perc.ToString()))
                {
                    maior_valor = double.Parse(valor_perc.ToString());
                }

                //VencedoraGestao
                k++;
                valor_perc       = (item.TotalVencedoraGestao * decimal.Parse("100.00", enUS) / total_total);
                valorXY[k, i, 0] = valor_perc.ToString();
                valorXY[k, i, 1] = "";
                valorXY[k, i, 2] = estado;
                valorXY[k, i, 3] = item.TotalVencedoraGestao.ToString() + " - " + valor_perc.ToString("N2", enUS) + "% - " + estado;

                if (maior_valor < double.Parse(valor_perc.ToString()))
                {
                    maior_valor = double.Parse(valor_perc.ToString());
                }

                //VencedoraRespSocial
                k++;
                valor_perc       = (item.TotalVencedoraRespSocial * decimal.Parse("100.00", enUS) / total_total);
                valorXY[k, i, 0] = valor_perc.ToString();
                valorXY[k, i, 1] = "";
                valorXY[k, i, 2] = estado;
                valorXY[k, i, 3] = item.TotalVencedoraRespSocial.ToString() + " - " + valor_perc.ToString("N2", enUS) + "% - " + estado;

                if (maior_valor < double.Parse(valor_perc.ToString()))
                {
                    maior_valor = double.Parse(valor_perc.ToString());
                }

                //VencedoraInovacao
                k++;
                valor_perc       = (item.TotalVencedoraInovacao * decimal.Parse("100.00", enUS) / total_total);
                valorXY[k, i, 0] = valor_perc.ToString();
                valorXY[k, i, 1] = "";
                valorXY[k, i, 2] = estado;
                valorXY[k, i, 3] = item.TotalVencedoraInovacao.ToString() + " - " + valor_perc.ToString("N2", enUS) + "% - " + estado;

                if (maior_valor < double.Parse(valor_perc.ToString()))
                {
                    maior_valor = double.Parse(valor_perc.ToString());
                }

                i++;
            }

            Grafico grafico = new Grafico();

            Dundas.Charting.WebControl.Chart chart = grafico.GerarGraficoColuna(valorXY, true, maior_valor);

            return(chart);
        }
Ejemplo n.º 21
0
 /// <summary>
 /// Construct a ChartDataTableHelper instance.
 /// </summary>
 public ChartDataTableHelper()
 {
     ChartObj   = null;
     ChartAreas = new ArrayList();
 }
    protected Dundas.Charting.WebControl.Chart DoChart(DataTable inDT, string sType, string product_type)
    {
        Dundas.Charting.WebControl.Chart chart = new Dundas.Charting.WebControl.Chart();
        DataTable dataSource = inDT.Copy();
        DataView  dv         = dataSource.DefaultView;

        this.SetChartStyle(chart);

        ChartArea chartarea;

        chartarea = chart.ChartAreas.Add("DoChart");
        chartarea.AxisX.Interval = 2;
        chartarea.AxisY.Title    = "CYCLE_TIME";
        //chartarea.AxisY2.Title = "TARGET";

        chartarea.AxisY.LabelStyle.Format = "N0";
        //chartarea.AxisY2.LabelStyle.Format = "N0";
        chartarea.AxisX.MajorGrid.LineColor = System.Drawing.Color.Silver;
        chartarea.AxisX.MinorGrid.LineColor = System.Drawing.Color.Silver;
        chartarea.AxisY.MajorGrid.LineColor = System.Drawing.Color.Silver;
        chartarea.AxisY.MinorGrid.LineColor = System.Drawing.Color.Silver;
        //chartarea.AxisY2.MajorGrid.Enabled = false;
        //chartarea.AxisY2.MinorGrid.Enabled = false;

        //設定Chart的Title
        DataTable dtDistinct = dataSource.DefaultView.ToTable(true, "SHOP");
        string    sShop      = dtDistinct.Rows[0]["SHOP"].ToString();

        sShop = sShop.Replace("T0", "C2");

        //chart.Titles.Add(sShop + "_" + sType + "PUT");
        chart.Titles.Add(sShop + "_" + product_type + "_" + sType);

        //設定Series(DAILY_PLAN_QTY,MTD_PLAN_QTY,DAILY_ACTUAL_QTY,MTD_ACTUAL_QTY)
        for (int i = 0; i < dataSource.Columns.Count; i++)
        {
            if (dataSource.Columns[i].ColumnName.ToUpper().Contains("CYCLE_TIME") || dataSource.Columns[i].ColumnName.ToUpper().Contains("TARGET"))
            {
                Series series;
                series           = chart.Series.Add(dataSource.Columns[i].ColumnName);
                series.ChartArea = chartarea.Name;
                series.EmptyPointStyle.BorderWidth = 0;
                series.ShowLabelAsValue            = false;

                if (dataSource.Columns[i].ColumnName.ToUpper().Contains("TARGET"))
                {
                    series.Type              = SeriesChartType.Line;
                    series.MarkerStyle       = MarkerStyle.Circle;
                    series.MarkerSize        = 6;
                    series.MarkerBorderWidth = 1;
                    series.MarkerBorderColor = System.Drawing.Color.Black;
                    series.BorderWidth       = 1;
                    //series.YAxisType = AxisType.Secondary;
                    series.ToolTip     = "#VALX #SERIESNAME:#VAL{N0}";
                    series.LabelFormat = "N0";
                }
                else
                {
                    series.Type        = SeriesChartType.Column;
                    series.YAxisType   = AxisType.Primary;
                    series.BorderColor = System.Drawing.Color.Black;
                    series.BorderWidth = 1;
                    series.ToolTip     = "#VALX #SERIESNAME:#VAL{N0}";
                    series.LabelFormat = "N0";
                }
            }
        }

        //日期迴圈,補足月初到月底的每一天都要呈現在Chart上面
        //因為來源的Table有些會缺少月中的某些天(MPS沒有modeling)
        System.DateTime dt = System.DateTime.Now;
        System.DateTime ThisMonBeginDay = new System.DateTime(dt.Year, dt.Month, 1);
        System.DateTime ThisMonEndDay   = ThisMonBeginDay.AddMonths(1).AddDays(-1);

        while (DateDiff(ThisMonBeginDay, ThisMonEndDay) >= 0)
        {
            foreach (Series series in chart.Series)
            {
                //用dataview來作rowfilter,有存在dv中的shift_date就呈現該column的值,不然就畫0
                //dv.RowFilter = "shift_date='" + ThisMonBeginDay.ToString("yyyyMMdd") + "' and type='" + sType + "'";
                dv.RowFilter = "shift_date='" + ThisMonBeginDay.ToString("yyyyMMdd") + "'";
                if (dv.Count > 0)
                {
                    series.Points.AddXY(ThisMonBeginDay.ToString("yyyyMMdd"), dv[0][series.Name].ToString());
                }
                else
                {
                    series.Points.AddXY(ThisMonBeginDay.ToString("yyyyMMdd"), Double.NaN);
                }
            }
            ThisMonBeginDay = ThisMonBeginDay.AddDays(1);
        }
        return(chart);
    }
Ejemplo n.º 23
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();
            }
        }
    }
Ejemplo n.º 24
0
    private void BindingChart(Dundas.Charting.WebControl.Chart chart, string yearStr, string util, string sGongjang)
    {
        //chart.DataSource = GetChartDataTable(yearStr, util).DefaultView;
        // Code -> 1:  전기 : 2, 고압증기 : 3, 중압증기

        DataTable dt = GetChartDataTable(yearStr, util, sGongjang);

        DundasCharts.DundasChartBase(chart, ChartImageType.Flash, 800, 255
                                     , BorderSkinStyle.Emboss, Color.FromArgb(181, 64, 1), 2
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE), Color.FromArgb(0x20, 0x80, 0xD0), ChartDashStyle.Solid
                                     , -1
                                     , ChartHatchStyle.None, GradientType.TopBottom, AntiAliasing.None);

        Series series2 = DundasCharts.CreateSeries(chart, "Series2", "Default", "사용요금", null, SeriesChartType.Column, 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 series1 = DundasCharts.CreateSeries(chart, "Series1", "Default", "사용량", null, SeriesChartType.Line, 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 series3 = DundasCharts.CreateSeries(chart, "Series3", "Default", "중압증기", null, SeriesChartType.Line, 3, Color.FromArgb(0x00, 0xC4, 0xCB), Color.FromArgb(0xD7, 0x41, 0x01),Color.FromArgb(0x00, 0xC4, 0xCB), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
        //Series series4 = DundasCharts.CreateSeries(chart, "Series4", "Default", "협력업체", null, SeriesChartType.Line, 1, Color.FromArgb(0xE4, 0xE4, 0xE4), Color.FromArgb(0xE4, 0xE4, 0xE4), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));

        //series1.ValueMemberX = "MONTH";
        //series1.ValueMembersY = "USEQTY";
        //series2.ValueMembersY = "AMT2";
        DatabaseBindingXY(series2, "MONTH", "AMT3", dt);
        DatabaseBindingXY(series1, "MONTH", "USEQTY", dt);

        series2.YAxisType = AxisType.Secondary;

        series1.ToolTip = "#VALY{N0}";
        series2.ToolTip = "#VALY{N0}";
        //series2.ToolTip = "X value \t= #VALX{d}\nY value \t= #VALY{C}\nRadius \t= #VALY2{P}";

        DundasAnimations.DundasChartBase(chart, AnimationTheme.None, -1, -1, false, 1);
        DundasAnimations.GrowingAnimation(chart, series2, 0.0, 3.0, false);
        DundasAnimations.GrowingAnimation(chart, series1, 3.0, 4.0, true);


        chart.Titles[0].Position.Auto = false;
        FontStyle fontStyle = FontStyle.Bold;

        chart.ChartAreas["Default"].Axes[0].Title     = ddlGongJang.SelectedItem.Text;
        chart.ChartAreas["Default"].Axes[0].TitleFont = new Font("Trebuchet MS", 12, fontStyle);


        //Chart1.ChartAreas["Default"].Axes[int.Parse( Position.SelectedItem.Value )].TitleFont = new Font(Font1.SelectedItem.Text, float.Parse(TitleSize.SelectedItem.Text), fontStyle);



        //DundasAnimations.GrowingAnimation(chart, series3, 4.0, 6.0, true);
        //DundasAnimations.GrowingAnimation(chart, series4, 6.0, 8.0, true);

        series1.MarkerStyle = MarkerStyle.Circle;
        series2.MarkerStyle = MarkerStyle.Diamond;
        //series3.MarkerStyle = MarkerStyle.Triangle;
        //series4.MarkerStyle = MarkerStyle.Square;
        series1.MarkerColor = Color.FromArgb(0x7A, 0x9D, 0xFE);
        series2.MarkerColor = Color.FromArgb(0xFF, 0xAA, 0x20);
        //series3.MarkerColor = Color.FromArgb(0x20, 0xE4, 0xEB);
        //series4.MarkerColor = Color.FromArgb(0xE4, 0xE4, 0xE4);
        series1.MarkerBorderColor = Color.FromArgb(0x4A, 0x58, 0x7E);
        series2.MarkerBorderColor = Color.FromArgb(0xD7, 0x41, 0x01);
        //series3.MarkerBorderColor = Color.FromArgb(0x00, 0xC4, 0xCB);
        //series4.MarkerBorderColor = Color.FromArgb(0xE4, 0xE4, 0xE4);
        //series1.ShowLabelAsValue = true;
        //series2.ShowLabelAsValue = true;
        //series3.ShowLabelAsValue = true;

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

        SetVisibleZeroPoint(chart, Convert.ToInt32(PageUtility.GetByValueDropDownList(ddlYear)));
        //BindingToolTip(chart);
    }
Ejemplo n.º 25
0
        protected void GenerateChart(System.Data.DataTable dataValues, string logic)
        {
            int rowCount = dataValues.Rows.Count;

            if (rowCount >= 1)
            {
                this.AvailibilityChartFleetComparison.Visible = true;
                this.EmptyDataTemplateFleetComparison.Visible = false;
            }
            else
            {
                this.EmptyDataTemplateFleetComparison.Visible = true;
                this.AvailibilityChartFleetComparison.Visible = false;
            }
            Dundas.Charting.WebControl.Chart ChartFleetComparison = (Dundas.Charting.WebControl.Chart) this.AvailibilityChartFleetComparison.FindControl("DundasChartAvailability");
            ChartFleetComparison.Series.Clear();

            ChartFleetComparison.Titles.Clear();
            Dundas.Charting.WebControl.Title ctitle = new Dundas.Charting.WebControl.Title();
            ctitle.Text      = Resources.lang.FleetComparison;
            ctitle.Font      = new System.Drawing.Font("Arial", 10, System.Drawing.FontStyle.Bold);
            ctitle.Alignment = System.Drawing.ContentAlignment.TopLeft;
            ChartFleetComparison.Titles.Add(ctitle);

            //Add a item to reset zoom
            Dundas.Charting.WebControl.Title resetZoomTitle = new Dundas.Charting.WebControl.Title();
            resetZoomTitle.Font              = new System.Drawing.Font("Arial", 10, System.Drawing.FontStyle.Bold);
            resetZoomTitle.Alignment         = System.Drawing.ContentAlignment.BottomRight;
            resetZoomTitle.Docking           = Docking.Bottom;
            resetZoomTitle.ToolTip           = Resources.lang.ChartZoomFeature;
            resetZoomTitle.DockOffset        = 1;
            resetZoomTitle.MapAreaAttributes = "onclick=\"" + ChartFleetComparison.CallbackManager.GetCallbackEventReference("ResetZoom", "ResetZoom") + "\"";
            resetZoomTitle.Text              = Resources.lang.ChartZoomText;
            resetZoomTitle.BackImage         = "~/App.images/reset_zoom.png";
            resetZoomTitle.BackImageMode     = ChartImageWrapMode.Unscaled;
            resetZoomTitle.BackImageAlign    = ChartImageAlign.BottomRight;
            ChartFleetComparison.Titles.Add(resetZoomTitle);

            Series series1 = ChartFleetComparison.Series.Add("Default");

            //Set the chart type
            series1.Type = SeriesChartType.Column;

            // Initializes a new instance of the DataView class
            System.Data.DataView firstView = new System.Data.DataView(dataValues);

            // Since the DataView implements IEnumerable, pass the reader directly into
            // the DataBind method with the name of the Columns selected in the query
            ChartFleetComparison.Series["Default"].Points.DataBindXY(firstView, "car_group", firstView, "car_count");

            //Change the way labels are displayed when there's more columns
            series1.ShowLabelAsValue            = true;
            series1.SmartLabels.Enabled         = true;
            series1.SmartLabels.MovingDirection = LabelAlignment.Top;
            //Set label tooltip to Y value
            series1.LabelToolTip = "#VALX: #VAL";
            //Set series bars tooltip toY value also
            series1.ToolTip = "#VALX: #VAL";
            // Sort series in ascending order by the default Y value.
            ChartFleetComparison.DataManipulator.Sort(PointsSortOrder.Descending, "Default");
            // Sort series in ascending order by the second Y value.


            series1.BackGradientType     = GradientType.TopBottom;
            series1.Color                = System.Drawing.Color.FromArgb(230, 0, 125, 255);
            series1.BackGradientEndColor = System.Drawing.Color.Aqua;

            //If the current number of samples is bigger than 10 make the size of font smaller
            if (dataValues.Rows.Count > 10)
            {
                //Set Data Point Label
                series1["LabelStyle"] = "Top";
                // Set labels font
                series1.Font = new System.Drawing.Font("Arial", 6, System.Drawing.FontStyle.Bold);
                // Set labels color
                series1.FontColor = System.Drawing.Color.Black;
            }
            else
            {
                //Set Data Point Label
                series1["LabelStyle"] = "Bottom";
                // Set labels font
                series1.Font = new System.Drawing.Font("Arial", 8, System.Drawing.FontStyle.Bold);
                // Set labels color
                series1.FontColor = System.Drawing.Color.Black;
                // Set ColumnLabel Style
                series1["ColumnLabelStyle"] = "Horizontal";
            }

            if (logic == "PERCENTAGE")
            {
                // Set Y axis labels format
                ChartFleetComparison.ChartAreas["Default"].AxisY.LabelStyle.Format = "P0";
                // Set series point labels format
                ChartFleetComparison.Series["Default"].LabelFormat = "P2";
            }
            else
            {
                //Restore decimal formatting - since we're using ViewState for charts, formatting won't be reset automatically
                ChartFleetComparison.ChartAreas["Default"].AxisY.LabelStyle.Format = "D";
                ChartFleetComparison.Series["Default"].LabelFormat = "D";
            }

            //Set X Axis style
            ChartFleetComparison.ChartAreas["Default"].AxisX.LabelsAutoFit        = false;
            ChartFleetComparison.ChartAreas["Default"].AxisX.LabelStyle.Font      = new System.Drawing.Font("Arial", 7, System.Drawing.FontStyle.Bold);
            ChartFleetComparison.ChartAreas["Default"].AxisX.LineColor            = System.Drawing.Color.FromArgb(64, 64, 64, 64);
            ChartFleetComparison.ChartAreas["Default"].AxisX.Interlaced           = false;
            ChartFleetComparison.ChartAreas["Default"].AxisX.MajorGrid.LineColor  = System.Drawing.Color.FromArgb(64, 64, 64, 64);
            ChartFleetComparison.ChartAreas["Default"].AxisX.LabelStyle.FontAngle = -45;

            ChartFleetComparison.ChartAreas["Default"].AxisY.LabelStyle.Font     = new System.Drawing.Font("Arial", 7, System.Drawing.FontStyle.Bold);
            ChartFleetComparison.ChartAreas["Default"].AxisY.LineColor           = System.Drawing.Color.Gray;
            ChartFleetComparison.ChartAreas["Default"].AxisY.Interlaced          = true;
            ChartFleetComparison.ChartAreas["Default"].AxisY.InterlacedColor     = System.Drawing.Color.FromArgb(20, 20, 20, 20);
            ChartFleetComparison.ChartAreas["Default"].AxisY.MajorGrid.LineColor = System.Drawing.Color.FromArgb(64, 64, 64, 64);

            //Disable Variable Label Intervals - force showing every X Value
            ChartFleetComparison.ChartAreas["Default"].AxisX.Interval = 1;

            // Enable AntiAliasing for either Text and Graphics or just Graphics
            ChartFleetComparison.AntiAliasing = AntiAliasing.All;
        }
Ejemplo n.º 26
0
        protected void GenerateChart(System.Data.DataTable dataValues, int dateRangeValue, string logic)
        {
            int rowCount = dataValues.Rows.Count;

            if (rowCount >= 1)
            {
                this.AvailibilityChartHistoricalTrend.Visible = true;
                this.EmptyDataTemplateHistoricalTrend.Visible = false;
            }
            else
            {
                this.EmptyDataTemplateHistoricalTrend.Visible = true;
                this.AvailibilityChartHistoricalTrend.Visible = false;
            }
            Dundas.Charting.WebControl.Chart ChartHistoricalTrend = (Dundas.Charting.WebControl.Chart) this.AvailibilityChartHistoricalTrend.FindControl("DundasChartAvailability");
            ChartHistoricalTrend.Series.Clear();
            ChartHistoricalTrend.Legends.Clear();
            ChartHistoricalTrend.Legends.Add("Default");
            ChartHistoricalTrend.Legends["Default"].LegendStyle = LegendStyle.Column;
            ChartHistoricalTrend.Visible = true;

            //reset chart title
            ChartHistoricalTrend.Titles.Clear();
            Dundas.Charting.WebControl.Title ctitle = new Dundas.Charting.WebControl.Title();
            ctitle.Text      = Resources.lang.HistoricalTrend;
            ctitle.Font      = new System.Drawing.Font("Arial", 10, System.Drawing.FontStyle.Bold);
            ctitle.Alignment = System.Drawing.ContentAlignment.TopLeft;
            ChartHistoricalTrend.Titles.Add(ctitle);

            //Add a item to reset zoom
            Dundas.Charting.WebControl.Title resetZoomTitle = new Dundas.Charting.WebControl.Title();
            resetZoomTitle.Font              = new System.Drawing.Font("Arial", 10, System.Drawing.FontStyle.Bold);
            resetZoomTitle.Alignment         = System.Drawing.ContentAlignment.BottomRight;
            resetZoomTitle.Docking           = Docking.Bottom;
            resetZoomTitle.ToolTip           = Resources.lang.ChartZoomFeature;
            resetZoomTitle.DockOffset        = 1;
            resetZoomTitle.MapAreaAttributes = "onclick=\"" + ChartHistoricalTrend.CallbackManager.GetCallbackEventReference("ResetZoom", "ResetZoom") + "\"";
            resetZoomTitle.Text              = Resources.lang.ChartZoomText;
            resetZoomTitle.BackImage         = "~/App.Images/reset_zoom.png";
            resetZoomTitle.BackImageMode     = ChartImageWrapMode.Unscaled;
            resetZoomTitle.BackImageAlign    = ChartImageAlign.BottomRight;
            ChartHistoricalTrend.Titles.Add(resetZoomTitle);

            //Declare chart series
            // remove carsales, gold and predelivery from the dataview
            Series series1 = ChartHistoricalTrend.Series.Add("TOTAL FLEET");
            //Series series2 = ChartHistoricalTrend.Series.Add("CARSALES"); // removed to protect the innocent
            Series series3  = ChartHistoricalTrend.Series.Add("CU");
            Series series4  = ChartHistoricalTrend.Series.Add("HA");
            Series series5  = ChartHistoricalTrend.Series.Add("HL");
            Series series6  = ChartHistoricalTrend.Series.Add("LL");
            Series series7  = ChartHistoricalTrend.Series.Add("NC");
            Series series8  = ChartHistoricalTrend.Series.Add("PL");
            Series series9  = ChartHistoricalTrend.Series.Add("TC");
            Series series10 = ChartHistoricalTrend.Series.Add("SV");
            Series series11 = ChartHistoricalTrend.Series.Add("WS");
            Series series12 = ChartHistoricalTrend.Series.Add("OPERATIONAL FLEET");
            Series series13 = ChartHistoricalTrend.Series.Add("BD");
            Series series14 = ChartHistoricalTrend.Series.Add("MM");
            Series series15 = ChartHistoricalTrend.Series.Add("TW");
            Series series16 = ChartHistoricalTrend.Series.Add("TB");
            Series series17 = ChartHistoricalTrend.Series.Add("FS");
            Series series18 = ChartHistoricalTrend.Series.Add("RL");
            Series series19 = ChartHistoricalTrend.Series.Add("RP");
            Series series20 = ChartHistoricalTrend.Series.Add("TN");
            Series series21 = ChartHistoricalTrend.Series.Add("AVAILABLE FLEET");
            Series series22 = ChartHistoricalTrend.Series.Add("RT");
            Series series23 = ChartHistoricalTrend.Series.Add("SU");
            //Series series24 = ChartHistoricalTrend.Series.Add("GOLD");
            //Series series25 = ChartHistoricalTrend.Series.Add("PREDELIVERY");
            Series series26 = ChartHistoricalTrend.Series.Add("OVERDUE");
            Series series27 = ChartHistoricalTrend.Series.Add("ON RENT");

            string xAxisValue = "REP_DATE"; // set to default

            if (dateRangeValue < -30 && dateRangeValue >= -90)
            {
                xAxisValue = "REP_WEEK_OF_YEAR";
            }
            if (dateRangeValue < -90)
            {
                xAxisValue = "REP_MONTH";
            }

            // Initializes a new instance of the DataView class
            System.Data.DataView firstView = new System.Data.DataView(dataValues);

            // Since the DataView implements IEnumerable, pass the reader directly into
            // the DataBind method with the name of the Columns selected in the query
            //Set series properties
            int index = 0;

            foreach (Series chartSeries in ChartHistoricalTrend.Series)
            {
                chartSeries.Points.DataBindXY(firstView, xAxisValue, firstView, chartSeries.Name.Replace(" ", "_"));
                if (logic == "PERCENTAGE")
                {
                    foreach (DataPoint p in chartSeries.Points)
                    {
                        //p.YValues[0] = Math.Round(p.YValues[0], 2);
                        p.LabelFormat = "P";
                    }
                }

                chartSeries.Color = Charts.GetColourForColumn(chartSeries.Name, (int)ReportSettings.ReportSettingsTool.Availability);
                switch (chartSeries.Name)
                {
                case "AVAILABLE FLEET":
                case "RT":
                case "SU":
                //case "GOLD":
                //case "PREDELIVERY":
                case "OVERDUE":
                case "ON RENT":
                    chartSeries.Enabled = true;
                    break;

                default:
                    chartSeries.Enabled = false;
                    break;
                }

                // Set range column chart type
                chartSeries.Type = SeriesChartType.Line;

                //Set series tooltip
                chartSeries.ToolTip = "#VALX: #VAL, #SERIESNAME";

                // Set the side-by-side drawing style
                chartSeries["DrawSideBySide"] = "false";

                chartSeries.BorderWidth = 2;


                //Set x value type
                if (xAxisValue == "REP_DATE")
                {
                    chartSeries.XValueType = ChartValueTypes.DateTime;
                }
                else
                {
                    chartSeries.XValueType = ChartValueTypes.Int;
                }

                chartSeries.Color = Charts.GetColourForColumn(chartSeries.Name, (int)ReportSettings.ReportSettingsTool.Availability);

                chartSeries.ShowInLegend = false;
                // Add custom legend item with image
                LegendItem legendItem  = new LegendItem();
                LegendCell legendCell1 = new LegendCell();
                LegendCell legendCell2 = new LegendCell();

                legendItem.BackImageTranspColor = System.Drawing.Color.Red;
                legendCell1.CellType            = LegendCellType.Image;
                if (chartSeries.Enabled == true)
                {
                    legendCell1.Image = "~/App.Images/chk_checked.png";
                }
                else
                {
                    legendCell1.Image = "~/App.Images/chk_unchecked.png";
                }
                legendCell1.ImageTranspColor = System.Drawing.Color.Red;
                legendCell2.CellType         = LegendCellType.Text;
                legendCell2.Font             = new System.Drawing.Font("Arial", 8, System.Drawing.FontStyle.Regular);
                legendCell2.Text             = chartSeries.Name;
                legendCell2.TextColor        = chartSeries.Color;
                legendItem.Cells.Add(legendCell1);
                legendItem.Cells.Add(legendCell2);
                legendItem.MapAreaAttributes = "onclick=\"" + ChartHistoricalTrend.CallbackManager.GetCallbackEventReference("LegendClick", index.ToString()) + "\"";

                legendItem.BorderWidth = 0;
                ChartHistoricalTrend.Legends["Default"].CustomItems.Add(legendItem);
                index += 1;
            }

            var yLabelStyle = string.Empty;

            switch (logic)
            {
            case "PERCENTAGE":
                yLabelStyle = "P";
                break;

            case "NUMERIC":
                yLabelStyle = "D";
                break;

            default:
                yLabelStyle = "P0";
                break;
            }
            ChartHistoricalTrend.ChartAreas["Default"].AxisY.LabelStyle.Format = yLabelStyle;



            //Set X Axis style
            ChartHistoricalTrend.ChartAreas["Default"].AxisX.LabelsAutoFit        = false;
            ChartHistoricalTrend.ChartAreas["Default"].AxisX.LabelStyle.Font      = new System.Drawing.Font("Arial", 7, System.Drawing.FontStyle.Bold);
            ChartHistoricalTrend.ChartAreas["Default"].AxisX.LineColor            = System.Drawing.Color.FromArgb(64, 64, 64, 64);
            ChartHistoricalTrend.ChartAreas["Default"].AxisX.Interlaced           = false;
            ChartHistoricalTrend.ChartAreas["Default"].AxisX.MajorGrid.LineColor  = System.Drawing.Color.FromArgb(64, 64, 64, 64);
            ChartHistoricalTrend.ChartAreas["Default"].AxisX.LabelStyle.FontAngle = -45;

            ChartHistoricalTrend.ChartAreas["Default"].AxisY.LabelStyle.Font     = new System.Drawing.Font("Arial", 7, System.Drawing.FontStyle.Bold);
            ChartHistoricalTrend.ChartAreas["Default"].AxisY.LineColor           = System.Drawing.Color.Gray;
            ChartHistoricalTrend.ChartAreas["Default"].AxisY.Interlaced          = true;
            ChartHistoricalTrend.ChartAreas["Default"].AxisY.InterlacedColor     = System.Drawing.Color.FromArgb(20, 20, 20, 20);
            ChartHistoricalTrend.ChartAreas["Default"].AxisY.MajorGrid.LineColor = System.Drawing.Color.FromArgb(64, 64, 64, 64);

            //Disable Variable Label Intervals - force showing every X Value
            ChartHistoricalTrend.ChartAreas["Default"].AxisX.Interval = 1;

            // Enable AntiAliasing for either Text and Graphics or just Graphics
            ChartHistoricalTrend.AntiAliasing = AntiAliasing.All;
        }
Ejemplo n.º 27
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();
    }
Ejemplo n.º 28
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;
        }
    }
Ejemplo n.º 29
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();
    }
Ejemplo n.º 30
0
 /// <summary>
 /// Construct a ChartDataTableHelper instance, Initialize the specified ChartArea with a table and
 /// set a boolean to show or hide total columns.
 /// </summary>
 public ChartDataTableHelper(Dundas.Charting.WebControl.Chart chartObj, string chartAreaName, bool addTableTotals)
 {
     ChartAreas = new ArrayList();
     Initialize(chartObj, chartAreaName, addTableTotals);
 }