//Main code for creating chart.
        //Note: the argument chartIndex is unused because this demo only has 1 chart.
        public void createChart(WinChartViewer viewer, int chartIndex)
        {
            // The XYZ data for the 3D scatter chart as 3 random data series
            RanSeries r = new RanSeries(3);

            double[] xData = r.getSeries2(20, 100, -10, 10);
            double[] yData = r.getSeries2(20, 100, -10, 10);
            double[] zData = r.getSeries2(20, 100, -10, 10);

            // Create a ThreeDScatterChart object of size 720 x 520 pixels
            ThreeDScatterChart c = new ThreeDScatterChart(720, 520);

            // Add a title to the chart using 20 points Times New Roman Italic font
            c.addTitle("3D Scatter Chart (2)  ", "Times New Roman Italic", 20);

            // Set the center of the plot region at (350, 240), and set width x depth x height to
            // 360 x 360 x 270 pixels
            c.setPlotRegion(350, 240, 360, 360, 270);

            // Set the elevation and rotation angles to 15 and 30 degrees
            c.setViewAngle(15, 30);

            // Add a scatter group to the chart using 13 pixels glass sphere symbols, in which the
            // color depends on the z value of the symbol
            ThreeDScatterGroup g = c.addScatterGroup(xData, yData, zData, "",
                                                     Chart.GlassSphere2Shape, 13, Chart.SameAsMainColor);

            // Add grey (888888) drop lines to the symbols
            g.setDropLine(0x888888);

            // Add a color axis (the legend) in which the left center is anchored at (645, 220). Set
            // the length to 200 pixels and the labels on the right side. Use smooth gradient
            // coloring.
            c.setColorAxis(645, 220, Chart.Left, 200, Chart.Right).setColorGradient();

            // Set the x, y and z axis titles using 10 points Arial Bold font
            c.xAxis().setTitle("X-Axis Place Holder", "Arial Bold", 10);
            c.yAxis().setTitle("Y-Axis Place Holder", "Arial Bold", 10);
            c.zAxis().setTitle("Z-Axis Place Holder", "Arial Bold", 10);

            // Output the chart
            viewer.Chart = c;

            //include tool tip for the chart
            viewer.ImageMap = c.getHTMLImageMap("clickable", "",
                                                "title='(x={x|p}, y={y|p}, z={z|p}'");
        }
        //Main code for creating chart.
        //Note: the argument chartIndex is unused because this demo only has 1 chart.
        public void createChart(WinChartViewer viewer, int chartIndex, int minvalue, int maxvalue)
        {
            ThreeDScatterChart c = new ThreeDScatterChart(1188, 757); //전체 크기수정(하얀부분)

            winchart = viewer;
            min      = minvalue;    //좌표값의 최소값, 최대값을 정할수있게 만들어뒀습니다.
            max      = maxvalue;

            double[] xData1 = { minvalue, minvalue, minvalue, minvalue };
            double[] yData1 = { minvalue, minvalue, minvalue, minvalue };
            double[] zData1 = { minvalue, minvalue, minvalue, minvalue };

            double[] xData2 = { maxvalue, maxvalue, maxvalue, maxvalue };
            double[] yData2 = { maxvalue, maxvalue, maxvalue, maxvalue };
            double[] zData2 = { maxvalue, maxvalue, maxvalue, maxvalue };
            // 필독===========================================
            //
            // 데이터는 세로방향으로 점하나씩 만들어지게 되있습니다. 한마디로 double[] 하나당 점이 4개씩찍히니 값을 일치시켜주는게 좋습니다.
            //
            //================================================


            c.addTitle("Data Visualization", "Times New Roman", 12); // 제목, 폰트, 크기

            // Set the center of the plot region at (350, 240), and set width x depth x height to
            // 360 x 360 x 270 pixels

            c.setPlotRegion(600, 300, 600, 600, 350); //이것을 이용해서 그래프의 크기를 조절할수있습니다.
            c.setBackground(0xffffff, 0x000000);
            c.setViewAngle(15, 30);                   // 보는각도입니다.


            ThreeDScatterGroup g = c.addScatterGroup(xData1, yData1, zData1, "",
                                                     Chart.GlassSphere2Shape, 0, Chart.SameAsMainColor);

            c.addScatterGroup(xData2, yData2, zData2, "",
                              Chart.GlassSphere2Shape, 0, Chart.SameAsMainColor); // 점 추가시키는부분

            //g 없어도 잘돌아갑니다.

            for (int i = 0; i < PL.Count(); i++)
            {
                c.addScatterGroup(PL[i].Xd, PL[i].Yd, PL[i].Zd, "",
                                  Chart.GlassSphere2Shape, 10, Chart.SameAsMainColor);
            }//좌표를 추가하면 List에 저장되서 새로그리는것

            //GlassSphere2Shape
            // Add grey (888888) drop lines to the symbols
            g.setDropLine(0x888888); //뭔지모름 없어도잘돌아감

            // Add a color axis (the legend) in which the left center is anchored at (645, 220). Set
            // the length to 200 pixels and the labels on the right side. Use smooth gradient
            // coloring.


            // Set the x, y and z axis titles using 10 points Arial Bold font
            c.xAxis().setTitle("X-Axis Place Holder", "Arial Bold", 10);
            c.yAxis().setTitle("Y-Axis Place Holder", "Arial Bold", 10);
            c.zAxis().setTitle("Z-Axis Place Holder", "Arial Bold", 10);

            c.xAxis().setColors(0xffffff, 0x000000);
            c.yAxis().setColors(0xffffff, 0x000000);
            c.zAxis().setColors(0xffffff, 0x000000);

            // Output the chart
            viewer.Chart = c;


            //include tool tip for the chart
            viewer.ImageMap = c.getHTMLImageMap("clickable", "",
                                                "title='(x={x|p}, y={y|p}, z={z|p})'");
        }
        //Main code for creating chart.
        //Note: the argument chartIndex is unused because this demo only has 1 chart.
        public void createChart(WPFChartViewer viewer, int chartIndex)
        {
            // The x coordinates for the 2 scatter groups
            DateTime[] dataX = { new DateTime(2011,                                                                                       9,  1), new DateTime(2011,                 9, 2), new DateTime(
                                     2011,                                                                                                9,  3), new DateTime(2011,                 9, 4), new DateTime(2011,  9,5), new DateTime(2011,
                                                                                                                                                                                                                  9,                    6), new DateTime(2011,   9,                7), new DateTime(2011,9,                8),new DateTime(2011,9, 9),
                                 new DateTime(2011,                                                                                       9, 10), new DateTime(2011,                 9, 11) };

            // The y and z coordinates for the first scatter group
            double[] dataY0 = { 0.4, 0.2, 0.5, 0.4, 0.7, 1.3, 1.1, 1.0, 0.6, 0.4, 0.5 };
            double[] dataZ0 = { 43, 38, 33, 23.4, 28, 36, 34, 47, 53, 45, 40 };

            // The y and z coordinates for the second scatter group
            double[] dataY1 = { 1.4, 1.0, 1.8, 1.9, 1.5, 1.0, 0.6, 0.7, 1.2, 1.7, 1.5 };
            double[] dataZ1 = { 46, 41, 33, 37, 28, 29, 34, 37, 41, 52, 50 };

            // Instead of displaying numeric values, labels are used for the y-axis
            string[] labelsY = { "Low", "Medium", "High" };

            // Create a ThreeDScatterChart object of size 760 x 520 pixels
            ThreeDScatterChart c = new ThreeDScatterChart(760, 520);

            // Add a title to the chart using 18 points Arial font
            c.addTitle("3D Scatter Chart Axis Types", "Arial", 18);

            // Set the center of the plot region at (385, 270), and set width x depth x height to
            // 480 x 240 x 240 pixels
            c.setPlotRegion(385, 270, 480, 240, 240);

            // Set the elevation and rotation angles to 30 and -10 degrees
            c.setViewAngle(30, -10);

            // Add a legend box at (380, 40) with horizontal layout. Use 9pt Arial Bold font.
            LegendBox b = c.addLegend(380, 40, false, "Arial Bold", 9);

            b.setAlignment(Chart.TopCenter);
            b.setRoundedCorners();

            // Add a scatter group to the chart using 13 pixels red (ff0000) glass sphere symbols,
            // with dotted drop lines
            ThreeDScatterGroup g0 = c.addScatterGroup(Chart.CTime(dataX), dataY0, dataZ0,
                                                      "Alpha Series", Chart.GlassSphere2Shape, 13, 0xff0000);

            g0.setDropLine(c.dashLineColor(Chart.SameAsMainColor, Chart.DotLine));

            // Add a scatter group to the chart using 13 pixels blue (00cc00) cross symbols, with
            // dotted drop lines
            ThreeDScatterGroup g1 = c.addScatterGroup(Chart.CTime(dataX), dataY1, dataZ1,
                                                      "Beta Series", Chart.Cross2Shape(), 13, 0x00cc00);

            g1.setDropLine(c.dashLineColor(Chart.SameAsMainColor, Chart.DotLine));

            // Set x-axis tick density to 50 pixels. ChartDirector auto-scaling will use this as the
            // guideline when putting ticks on the x-axis.
            c.xAxis().setTickDensity(50);

            // Set the y-axis labels
            c.yAxis().setLabels(labelsY);

            // Set label style to Arial bold for all axes
            c.xAxis().setLabelStyle("Arial Bold");
            c.yAxis().setLabelStyle("Arial Bold");
            c.zAxis().setLabelStyle("Arial Bold");

            // Set the x, y and z axis titles using deep blue (000088) 15 points Arial font
            c.xAxis().setTitle("Date/Time Axis", "Arial Italic", 15, 0x000088);
            c.yAxis().setTitle("Label\nBased\nAxis", "Arial Italic", 15, 0x000088);
            c.zAxis().setTitle("Numeric Axis", "Arial Italic", 15, 0x000088);

            // Output the chart
            viewer.Chart = c;
        }