Exemplo n.º 1
0
 public static void DundasChartBase(Chart chart
                                    , ChartImageType chartImageType
                                    , int width
                                    , int height
                                    , BorderSkinStyle borderSkinStyle
                                    , Color borderLineColor
                                    , int borderLineWidth
                                    , Color backColor
                                    , Color backGradientEndColor
                                    )
 {
     DundasChartBase(chart
                     , chartImageType
                     , width
                     , height
                     , borderSkinStyle
                     , borderLineColor
                     , borderLineWidth
                     , backColor
                     , backGradientEndColor
                     , Color.Empty
                     , ChartDashStyle.NotSet
                     , -1
                     , ChartHatchStyle.None
                     , GradientType.None
                     , AntiAliasing.None
                     , null
                     , ChartImageWrapMode.Unscaled
                     , ChartImageAlign.TopRight
                     , Color.Empty);
 }
Exemplo n.º 2
0
    private void BindRangeColumnChart(Chart chart
                                      , string query
                                      , BiasType biasType
                                      , ChartImageType chartImageType)
    {
        //DundasCharts.DundasChartBase(chart
        //                            , chartImageType
        //                            , 800
        //                            , 400
        //                            , 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);
        Biz_DundasCharts.DundasChartBase(chart
                                         , chartImageType
                                         , 800
                                         , 400
                                         , 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.RangeColumn
        //                                        , 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 series1 = Biz_DundasCharts.CreateSeries(chart
                                                       , "Series1"
                                                       , "Default"
                                                       , "최대.최소값"
                                                       , null
                                                       , SeriesChartType.RangeColumn
                                                       , 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));
        Series series2 = Biz_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.ToolTip = "#VALY{#,##0,00}";
        series2.ToolTip = "#VALY{#,##0}";

        ArrayList yValues1;
        ArrayList yValues2;
        ArrayList yValues3;
        ArrayList xValues;

        Biz_DundasCharts.SetDataFieldsX1(query
                                         , "EST_EMP_NAME"
                                         , out xValues
                                         , "PNT_MAX"
                                         , out yValues1
                                         , "PNT_MIN"
                                         , out yValues2
                                         , "PNT_AVG"
                                         , out yValues3);

        series1.Points.DataBindY(yValues2, yValues1);
        series2.Points.DataBindY(yValues3, "PNT_AVG");

        for (int i = 0; i < xValues.Count; i++)
        {
            series1.Points[i].AxisLabel = xValues[i].ToString();
        }

        if (chartImageType == ChartImageType.Flash)
        {
            DundasAnimations.DundasChartBase(chart, AnimationTheme.None, -1, -1, false, 5);
            DundasAnimations.GrowingAnimation(chart, series1, 0.0, 3.0, false);
            DundasAnimations.GrowingAnimation(chart, series2, 3.0, 6.0, true);
        }

        series2.MarkerStyle       = MarkerStyle.Circle;
        series2.MarkerColor       = Color.FromArgb(0xFF, 0xAA, 0x20);
        series2.MarkerBorderColor = Color.FromArgb(0xD7, 0x41, 0x01);

        string titleStr = "";

        if (biasType == BiasType.ORG)
        {
            titleStr = "원시 점수";
        }
        else if (biasType == BiasType.AVG)
        {
            titleStr = "평균조정 점수";
        }
        else if (biasType == BiasType.STD)
        {
            titleStr = "평균편차조정 점수";
        }

        Font font  = new Font("Gulim", 13, FontStyle.Regular);
        Font font1 = new Font("Gulim", 9, FontStyle.Regular);

        Dundas.Charting.WebControl.Title title = Biz_DundasCharts.CreateTitle(chart
                                                                              , "Title1"
                                                                              , titleStr
                                                                              , font
                                                                              , Color.FromArgb(26, 59, 105)
                                                                              , Color.Empty
                                                                              , Color.Empty
                                                                              , ContentAlignment.TopCenter
                                                                              , null
                                                                              , Color.FromArgb(32, 0, 0, 0)
                                                                              , 3
                                                                              , false
                                                                              , 5
                                                                              , 5
                                                                              , 91
                                                                              , 6);

        Legend legend = Biz_DundasCharts.CreateLegend(chart
                                                      , "Default"
                                                      , Color.Transparent
                                                      , Color.Empty
                                                      , Color.Empty);

        Biz_DundasCharts.SetChartArea(chart.ChartAreas["Default"], false);
    }
Exemplo n.º 3
0
    private void BindRadarChart(Chart chart
                                , string query
                                , BiasType biasType
                                , ChartImageType chartImageType)
    {
        //DundasCharts.DundasChartBase(chart
        //                            , chartImageType
        //                            , 800
        //                            , 400
        //                            , 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);
        Biz_DundasCharts.DundasChartBase(chart
                                         , chartImageType
                                         , 800
                                         , 400
                                         , 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.Radar
        //                                        , 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 series1 = Biz_DundasCharts.CreateSeries(chart
                                                       , "Series1"
                                                       , "Default"
                                                       , "최대값"
                                                       , null
                                                       , SeriesChartType.Radar
                                                       , 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.Radar
        //                                        , 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 series2 = Biz_DundasCharts.CreateSeries(chart
                                                       , "Series2"
                                                       , "Default"
                                                       , "최소값"
                                                       , null
                                                       , SeriesChartType.Radar
                                                       , 1
                                                       , Color.FromArgb(0xFF, 0x8A, 0x00)
                                                       , Color.FromArgb(0xD7, 0x41, 0x01)
                                                       , Color.FromArgb(64, 0, 0, 0)
                                                       , 1
                                                       , 9
                                                       , Color.FromArgb(64, 64, 64));



        series1.ToolTip = "#VALY{#,##0}";
        series2.ToolTip = "#VALY{#,##0}";

        series1.MarkerStyle       = MarkerStyle.Circle;
        series2.MarkerStyle       = MarkerStyle.Diamond;
        series1.MarkerColor       = Color.FromArgb(0x7A, 0x9D, 0xFE);
        series2.MarkerColor       = Color.FromArgb(0xFF, 0xAA, 0x20);
        series1.MarkerBorderColor = Color.FromArgb(0x4A, 0x58, 0x7E);
        series2.MarkerBorderColor = Color.FromArgb(0xD7, 0x41, 0x01);

        ArrayList yValues1;
        ArrayList yValues2;
        ArrayList xValues;

        //DundasCharts.SetDataFieldsX1(query
        //                            , "EST_EMP_NAME"
        //                            , out xValues
        //                            , "PNT_MAX"
        //                            , out yValues1
        //                            , "PNT_MIN"
        //                            , out yValues2);
        Biz_DundasCharts.SetDataFieldsX1(query
                                         , "EST_EMP_NAME"
                                         , out xValues
                                         , "PNT_MAX"
                                         , out yValues1
                                         , "PNT_MIN"
                                         , out yValues2);



        series1.Points.DataBindXY(xValues, yValues1);
        series2.Points.DataBindXY(xValues, yValues2);

        if (chartImageType == ChartImageType.Flash)
        {
            DundasAnimations.DundasChartBase(chart, AnimationTheme.None, -1, -1, false, 1);
            DundasAnimations.GrowingAnimation(chart, series1, 0.0, 3.0, false);
            DundasAnimations.GrowingAnimation(chart, series2, 3.0, 6.0, true);
        }

        // Set radar chart style Line, Area, Marker
        series1["RadarDrawingStyle"] = "Line";
        series2["RadarDrawingStyle"] = "Line";

        // Set circular area drawing style //Circle, Polygon
        series1["AreaDrawingStyle"] = "Polygon";
        series2["AreaDrawingStyle"] = "Polygon";

        // Set labels style //Horizontal, Circular, Radial
        series1["CircularLabelsStyle"] = "Horizontal";
        series2["CircularLabelsStyle"] = "Horizontal";

        string titleStr = "";

        if (biasType == BiasType.ORG)
        {
            titleStr = "원시 점수";
        }
        else if (biasType == BiasType.AVG)
        {
            titleStr = "평균조정 점수";
        }
        else if (biasType == BiasType.STD)
        {
            titleStr = "평균편차조정 점수";
        }

        Font font  = new Font("Gulim", 13, FontStyle.Regular);
        Font font1 = new Font("Gulim", 9, FontStyle.Regular);

        //Dundas.Charting.WebControl.Title title = DundasCharts.CreateTitle(chart
        //                                                                , "Title1"
        //                                                                , titleStr, font
        //                                                                , Color.FromArgb(26, 59, 105)
        //                                                                , Color.Empty
        //                                                                , Color.Empty
        //                                                                , ContentAlignment.TopCenter
        //                                                                , null
        //                                                                , Color.FromArgb(32, 0, 0, 0)
        //                                                                , 3
        //                                                                , false
        //                                                                , 5
        //                                                                , 5
        //                                                                , 91
        //                                                                , 6);
        Dundas.Charting.WebControl.Title title = Biz_DundasCharts.CreateTitle(chart
                                                                              , "Title1"
                                                                              , titleStr, font
                                                                              , Color.FromArgb(26, 59, 105)
                                                                              , Color.Empty
                                                                              , Color.Empty
                                                                              , ContentAlignment.TopCenter
                                                                              , null
                                                                              , Color.FromArgb(32, 0, 0, 0)
                                                                              , 3
                                                                              , false
                                                                              , 5
                                                                              , 5
                                                                              , 91
                                                                              , 6);



        //Legend legend = DundasCharts.CreateLegend(chart
        //                                        , "Default"
        //                                        , Color.Transparent
        //                                        , Color.Empty
        //                                        , Color.Empty
        //                                        , font1
        //                                        , false
        //                                        , 75
        //                                        , 75
        //                                        , 20
        //                                        , 15);
        Legend legend = Biz_DundasCharts.CreateLegend(chart
                                                      , "Default"
                                                      , Color.Transparent
                                                      , Color.Empty
                                                      , Color.Empty
                                                      , font1
                                                      , false
                                                      , 75
                                                      , 75
                                                      , 20
                                                      , 15);



        //DundasCharts.SetChartArea(chart.ChartAreas["Default"], false);
        Biz_DundasCharts.SetChartArea(chart.ChartAreas["Default"], false);
    }
Exemplo n.º 4
0
        public static void GetDefaultChart(Chart iChart, ChartImageType chtImgType, int iWidth, int iHeight, bool bEnable3D, bool bEnableLegend, bool bChartAreaAutoPosition)
        {
            // Chart Setting
            iChart.ImageType = chtImgType;
            iChart.Width     = iWidth;
            iChart.Height    = iHeight;

            iChart.BorderWidth          = 1;
            iChart.BorderSkin.SkinStyle = BorderSkinStyle.Raised;
            iChart.BorderLineColor      = ColorTranslator.FromHtml("#B0B4BF");
            iChart.BackColor            = ColorTranslator.FromHtml("#D3DEEF");
            iChart.BackGradientEndColor = ColorTranslator.FromHtml("#F9FAFC");
            iChart.BorderColor          = Color.FromArgb(0x20, 0x80, 0xD0);
            iChart.BorderStyle          = ChartDashStyle.Solid;
            iChart.BorderWidth          = 0;
            iChart.BackHatchStyle       = ChartHatchStyle.None;
            iChart.BackGradientType     = GradientType.TopBottom;
            iChart.AntiAliasing         = AntiAliasing.Graphics;
            iChart.Palette = ChartColorPalette.Dundas;

            // Chart Legend Setting
            //iChart.Legends.Clear();
            if (bEnableLegend)
            {
                iChart.Legends.Add("Legend");
                Legend FstLegend = iChart.Legends[0];

                FstLegend.Enabled     = true;
                FstLegend.BackColor   = Color.Transparent;
                FstLegend.Docking     = LegendDocking.Top;
                FstLegend.Alignment   = StringAlignment.Far;
                FstLegend.LegendStyle = LegendStyle.Column;
            }
            else
            {
                iChart.Legends.Clear();
            }

            // ChartArea Setting
            iChart.ChartAreas.Clear();
            iChart.ChartAreas.Add("Default");
            ChartArea FstChtArea = iChart.ChartAreas["Default"];

            FstChtArea.BackColor            = ColorTranslator.FromHtml("#CFDCEF");
            FstChtArea.BackGradientEndColor = ColorTranslator.FromHtml("#EFF3F9");
            FstChtArea.BorderColor          = Color.Transparent;
            FstChtArea.BorderStyle          = ChartDashStyle.NotSet;
            FstChtArea.BorderWidth          = 0;
            FstChtArea.BackHatchStyle       = ChartHatchStyle.None;
            FstChtArea.BackGradientType     = GradientType.TopBottom;
            FstChtArea.ShadowOffset         = 0;
            FstChtArea.ShadowColor          = Color.Transparent;
            FstChtArea.Area3DStyle.Enable3D = true;
            FstChtArea.BackImage            = "";
            FstChtArea.BackImageAlign       = ChartImageAlign.Left;
            FstChtArea.BackImageMode        = ChartImageWrapMode.Scaled;
            FstChtArea.BackImageTranspColor = Color.Transparent;

            FstChtArea.Position.Auto = bChartAreaAutoPosition;
            if (!bChartAreaAutoPosition)
            {
                FstChtArea.Position.X      = 0;
                FstChtArea.Position.Y      = 30;
                FstChtArea.Position.Height = float.Parse("98");
                FstChtArea.Position.Width  = float.Parse("98");
            }

            FstChtArea.Area3DStyle.Enable3D  = bEnable3D;
            FstChtArea.Area3DStyle.WallWidth = 3;
            FstChtArea.Area3DStyle.XAngle    = 15;
            FstChtArea.Area3DStyle.YAngle    = 10;
            FstChtArea.Area3DStyle.Light     = LightStyle.Realistic;

            // Setting AXis
            iChart.Titles.Clear();
            Font fnt = new Font("Tahoma", 10F, GraphicsUnit.Pixel);

            foreach (Axis ax in FstChtArea.Axes)
            {
                ax.Enabled             = AxisEnabled.Auto;
                ax.LabelsAutoFit       = false;
                ax.LabelStyle.Font     = fnt;
                ax.LineColor           = ColorTranslator.FromHtml("#C4C4C4");
                ax.LineWidth           = 1;
                ax.MajorGrid.Enabled   = true;
                ax.MajorGrid.LineColor = ColorTranslator.FromHtml("#C4C4C4");
                ax.LineStyle           = ChartDashStyle.Solid;
            }
        }
Exemplo n.º 5
0
        public static void DundasChartBase(Chart chart
                                           , ChartImageType chartImageType
                                           , int width
                                           , int height
                                           , BorderSkinStyle borderSkinStyle
                                           , Color borderLineColor
                                           , int borderLineWidth
                                           , Color backColor
                                           , Color backGradientEndColor
                                           , Color borderColor
                                           , ChartDashStyle borderStyle
                                           , int borderWidth
                                           , ChartHatchStyle chartHatchStyle
                                           , GradientType gradientType
                                           , AntiAliasing antiAliasing
                                           , string backImage
                                           , ChartImageWrapMode backImageMode
                                           , ChartImageAlign backImageAlign
                                           , Color backImageTranspColor)
        {
            chart.ImageType = chartImageType;

            if (width != -1)
            {
                chart.Width = width;
            }

            if (height != -1)
            {
                chart.Height = height;
            }

            if (borderSkinStyle != BorderSkinStyle.None)
            {
                chart.BorderSkin.SkinStyle = borderSkinStyle;
            }

            if (!borderLineColor.Equals(Color.Empty))
            {
                chart.BorderLineColor = borderLineColor;
            }

            if (borderLineWidth != -1)
            {
                chart.BorderLineWidth = borderLineWidth;
            }

            if (!backColor.Equals(Color.Empty))
            {
                chart.BackColor = backColor;
            }
            // Set Back Gradient End Color
            if (!backGradientEndColor.Equals(Color.Empty))
            {
                chart.BackGradientEndColor = backGradientEndColor;
            }

            // Set Hatch Style
            // Set Border Color
            if (!borderColor.Equals(Color.Empty))
            {
                chart.BorderColor = borderColor;
            }
            // Set Border Style
            if (borderStyle != ChartDashStyle.NotSet)
            {
                chart.BorderStyle = borderStyle;
            }
            // Set Border Width
            if (borderWidth != -1)
            {
                chart.BorderWidth = borderWidth;
            }

            if (chartHatchStyle != ChartHatchStyle.None)
            {
                chart.BackHatchStyle = chartHatchStyle;
            }
            if (gradientType != GradientType.None)
            {
                chart.BackGradientType = gradientType;
            }

            if (antiAliasing != AntiAliasing.None)
            {
                chart.AntiAliasing = antiAliasing;
            }

            if (backImage != null)
            {
                chart.BackImage      = backImage;
                chart.BackImageMode  = backImageMode;
                chart.BackImageAlign = backImageAlign;

                if (!backImageTranspColor.Equals(Color.Empty))
                {
                    chart.BackImageTranspColor = backImageTranspColor;
                }
            }
        }