コード例 #1
1
ファイル: AnnotationStyles.cs プロジェクト: YiYingChuang/LinQ
        private void Annotation_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            Chart1.Annotations.Clear();

            AnnotationStyle.Items.Clear();
            AnnotationStyle.Enabled = false;

            AnnotationStyle1.Items.Clear();
            AnnotationStyle1.Enabled = false;
            AnnotationStyle2.Items.Clear();
            AnnotationStyle2.Visible = false;

            if(Annotation.SelectedItem.ToString() == "Line")
            {
                LineAnnotation annotation = new LineAnnotation();
                annotation.AnchorDataPoint = Chart1.Series[0].Points[1];
                annotation.Height = -25;
                annotation.Width = -25;
                annotation.LineWidth = 2;

                Chart1.Annotations.Add(annotation);

                SetLineControls(true);

            }
            else if(Annotation.SelectedItem.ToString() == "Vertical Line")
            {
                VerticalLineAnnotation annotation = new VerticalLineAnnotation();
                annotation.AnchorDataPoint = Chart1.Series[0].Points[1];
                annotation.Height = -25;
                annotation.LineWidth = 2;

                Chart1.Annotations.Add(annotation);

                SetLineControls(true);

            }
            else if(Annotation.SelectedItem.ToString() == "Horizontal Line")
            {
                HorizontalLineAnnotation annotation = new HorizontalLineAnnotation();
                annotation.AnchorDataPoint = Chart1.Series[0].Points[1];
                annotation.Width = -25;
                annotation.LineWidth = 2;

                Chart1.Annotations.Add(annotation);

                SetLineControls(true);
            }
            else if(Annotation.SelectedItem.ToString() == "Polyline")
            {
                PolylineAnnotation annotation = new PolylineAnnotation();
                annotation.AnchorDataPoint = Chart1.Series[0].Points[1];

                // explicitly set the relative height and width
                annotation.Height = 50;
                annotation.Width = 30;

                PointF [] points = new PointF[5];
                points[0].X = 0;
                points[0].Y = 0;

                points[1].X = 100;
                points[1].Y = 0;

                points[2].X = 0;
                points[2].Y = 100;

                points[3].X = 100;
                points[3].Y = 100;

                points[4].X = 0;
                points[4].Y = 50;

                annotation.GraphicsPath.AddPolygon(points);

                Chart1.Annotations.Add(annotation);

                SetLineControls(false);
            }
            else if(Annotation.SelectedItem.ToString() == "Text")
            {
                TextAnnotation annotation = new TextAnnotation();
                annotation.AnchorDataPoint = Chart1.Series[0].Points[1];
                annotation.Text = "I am a TextAnnotation";
                annotation.ForeColor = Color.Black;
                annotation.Font = new Font("Arial", 12);;

                Chart1.Annotations.Add(annotation);
                SetTextControls();

            }
            else if(Annotation.SelectedItem.ToString() == "Rectangle")
            {
                RectangleAnnotation annotation = new RectangleAnnotation();
                annotation.AnchorDataPoint = Chart1.Series[0].Points[1];
                annotation.Text = "I am a\nRectangleAnnotation";
                annotation.ForeColor = Color.Black;
                annotation.Font = new Font("Arial", 12);;
                annotation.LineWidth = 2;

                Chart1.Annotations.Add(annotation);

                SetTextControls();
                SetColorLineControls();
                AnnotationStyle1.SelectedIndex = 2;
            }
            else if(Annotation.SelectedItem.ToString() == "Ellipse")
            {
                EllipseAnnotation annotation = new EllipseAnnotation();
                annotation.AnchorDataPoint = Chart1.Series[0].Points[1];
                annotation.Text = "I am an EllipseAnnotation";
                annotation.ForeColor = Color.Black;
                annotation.Font = new Font("Arial", 12);;
                annotation.LineWidth = 2;
                annotation.Height = 35;
                annotation.Width = 60;

                Chart1.Annotations.Add(annotation);

                SetTextControls();
                SetColorLineControls();
                AnnotationStyle1.SelectedIndex = 2;

            }
            else if(Annotation.SelectedItem.ToString() == "Arrow")
            {
                ArrowAnnotation annotation = new ArrowAnnotation();
                annotation.AnchorDataPoint = Chart1.Series[0].Points[1];
                annotation.Height = -25;
                annotation.Width = -25;
                annotation.LineWidth = 2;

                Chart1.Annotations.Add(annotation);

                SetArrowControls();

            }
            else if(Annotation.SelectedItem.ToString() == "Border3D")
            {
                Border3DAnnotation annotation = new Border3DAnnotation();
                annotation.AnchorDataPoint = Chart1.Series[0].Points[1];
                annotation.Text = "I am a Border3DAnnotation";
                annotation.ForeColor = Color.Black;
                annotation.Font = new Font("Arial", 12);
                annotation.Height = 40;
                annotation.Width = 50;

                Chart1.Annotations.Add(annotation);

                SetBorder3DControls();

            }
            else if(Annotation.SelectedItem.ToString() == "Callout")
            {
                CalloutAnnotation annotation = new CalloutAnnotation();
                annotation.AnchorDataPoint = Chart1.Series[0].Points[1];
                annotation.Text = "I am a\nCalloutAnnotation";
                annotation.ForeColor = Color.Black;
                annotation.Font = new Font("Arial", 10);;
                annotation.Height = 35;
                annotation.Width = 50;

                Chart1.Annotations.Add(annotation);

                SetCalloutControls();

            }
            else if(Annotation.SelectedItem.ToString() == "Polygon")
            {
                PolygonAnnotation annotation = new PolygonAnnotation();
                annotation.AnchorDataPoint = Chart1.Series[0].Points[1];

                // explicitly set the relative height and width
                annotation.Height = 50;
                annotation.Width = 30;

                annotation.BackColor = Color.FromArgb(128, Color.Orange);

                // define relative value points for a polygon
                PointF [] points = new PointF[5];
                points[0].X = 0;
                points[0].Y = 0;

                points[1].X = 100;
                points[1].Y = 0;

                points[2].X = 100;
                points[2].Y = 100;

                points[3].X = 0;
                points[3].Y = 100;

                points[4].X = 50;
                points[4].Y = 50;

                annotation.GraphicsPath.AddPolygon(points);

                Chart1.Annotations.Add(annotation);

                SetColorControl();
                SetColorLineControls();

            }
            else if(Annotation.SelectedItem.ToString() == "Image")
            {
                if(Chart1.Images.IndexOf("MyBmp") < 0)
                {
                    Bitmap Bmp = new Bitmap(200, 75);
                    Graphics g = Graphics.FromImage(Bmp);
                    g.FillRectangle(new SolidBrush(Color.Transparent), 0, 0, Bmp.Width, Bmp.Height);
                    g.FillRectangle(new SolidBrush(Color.PaleGoldenrod), Bmp.Width/2, 0, Bmp.Width/2, Bmp.Height);
                    g.FillRectangle(new SolidBrush(Color.PaleVioletRed), 0, 0, Bmp.Width/2, Bmp.Height);
                    g.FillRectangle(new SolidBrush(Color.FromArgb(128, Color.DarkOrange)), 0, Bmp.Height/2, Bmp.Width, Bmp.Height/2);
                    g.DrawString("I am an ImageAnnotation", new Font("Arial", 12),
                        new SolidBrush(Color.Black),
                        new Rectangle( 0, 0, Bmp.Width, Bmp.Height));

                    g.Dispose();

                    Chart1.Images.Add(new NamedImage("MyBmp", Bmp));
                }

                ImageAnnotation annotation = new ImageAnnotation();
                annotation.AnchorDataPoint = Chart1.Series[0].Points[1];
                annotation.Image = "MyBmp";

                Chart1.Annotations.Add(annotation);
                StyleLabel1.Text = "";
                StyleLabel2.Text = "";
            }
        }
コード例 #2
0
        private void AddCalloutAnnotation()
        {
            // create a callout annotation
            CalloutAnnotation annotation = new CalloutAnnotation();

            // setup visual attributes
            annotation.AnchorDataPoint = Chart1.Series[0].Points[2];
            annotation.Text = "Attached to Point";
            annotation.BackColor = Color.FromArgb(255,255,192);
            annotation.ClipToChartArea = "Default";

            // prevent moving or selecting
            annotation.AllowMoving = false;
            annotation.AllowAnchorMoving = false;
            annotation.AllowSelecting = false;

            // add the annotation to the collection
            Chart1.Annotations.Add(annotation);
        }
コード例 #3
0
 /// <summary> 
 /// Required method for Designer support - do not modify 
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.Windows.Forms.DataVisualization.Charting.CalloutAnnotation calloutAnnotation1 = new System.Windows.Forms.DataVisualization.Charting.CalloutAnnotation();
     System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
     System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend();
     System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series();
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint1 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 21);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint2 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 14);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint3 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 33);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint4 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 57);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint5 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 35);
     System.Windows.Forms.DataVisualization.Charting.Series series2 = new System.Windows.Forms.DataVisualization.Charting.Series();
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint6 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 74);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint7 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 25);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint8 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 82);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint9 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 21);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint10 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 56);
     System.Windows.Forms.DataVisualization.Charting.Series series3 = new System.Windows.Forms.DataVisualization.Charting.Series();
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint11 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 29);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint12 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 77);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint13 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 89);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint14 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 44);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint15 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 12);
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AnnotationSmartLabels));
     this.chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart();
     this.labelSampleComment = new System.Windows.Forms.Label();
     this.panel1 = new System.Windows.Forms.Panel();
     this.checkBoxEnable = new System.Windows.Forms.CheckBox();
     this.label1 = new System.Windows.Forms.Label();
     ((System.ComponentModel.ISupportInitialize)(this.chart1)).BeginInit();
     this.panel1.SuspendLayout();
     this.SuspendLayout();
     //
     // chart1
     //
     calloutAnnotation1.AllowAnchorMoving = true;
     calloutAnnotation1.AllowSelecting = true;
     calloutAnnotation1.AnchorDataPointName = "Default\\r2";
     calloutAnnotation1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(200)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
     calloutAnnotation1.CalloutStyle = System.Windows.Forms.DataVisualization.Charting.CalloutStyle.Cloud;
     calloutAnnotation1.Font = new System.Drawing.Font("Trebuchet MS", 9F);
     calloutAnnotation1.Name = "Callout2";
     calloutAnnotation1.SmartLabelStyle.IsOverlappedHidden = false;
     calloutAnnotation1.Text = "Cloud Annotation";
     this.chart1.Annotations.Add(calloutAnnotation1);
     this.chart1.BackColor = System.Drawing.Color.WhiteSmoke;
     this.chart1.BackGradientStyle = System.Windows.Forms.DataVisualization.Charting.GradientStyle.TopBottom;
     this.chart1.BackSecondaryColor = System.Drawing.Color.White;
     this.chart1.BorderlineColor = System.Drawing.Color.FromArgb(((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
     this.chart1.BorderlineDashStyle = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.Solid;
     this.chart1.BorderlineWidth = 2;
     this.chart1.BorderSkin.SkinStyle = System.Windows.Forms.DataVisualization.Charting.BorderSkinStyle.Emboss;
     chartArea1.Area3DStyle.Inclination = 15;
     chartArea1.Area3DStyle.IsClustered = true;
     chartArea1.Area3DStyle.IsRightAngleAxes = false;
     chartArea1.Area3DStyle.Perspective = 10;
     chartArea1.Area3DStyle.Rotation = 10;
     chartArea1.Area3DStyle.WallWidth = 0;
     chartArea1.AxisX.IsLabelAutoFit = false;
     chartArea1.AxisX.LabelStyle.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
     chartArea1.AxisX.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.AxisX.MajorGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.AxisY.IsLabelAutoFit = false;
     chartArea1.AxisY.LabelStyle.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
     chartArea1.AxisY.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.AxisY.MajorGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.BackColor = System.Drawing.Color.Gainsboro;
     chartArea1.BackGradientStyle = System.Windows.Forms.DataVisualization.Charting.GradientStyle.TopBottom;
     chartArea1.BackSecondaryColor = System.Drawing.Color.White;
     chartArea1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.Name = "Default";
     chartArea1.ShadowColor = System.Drawing.Color.Transparent;
     this.chart1.ChartAreas.Add(chartArea1);
     legend1.BackColor = System.Drawing.Color.Transparent;
     legend1.Enabled = false;
     legend1.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
     legend1.IsTextAutoFit = false;
     legend1.Name = "Default";
     this.chart1.Legends.Add(legend1);
     this.chart1.Location = new System.Drawing.Point(16, 68);
     this.chart1.Name = "chart1";
     series1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
     series1.ChartArea = "Default";
     series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;
     series1.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     series1.IsValueShownAsLabel = true;
     series1.LabelFormat = "P0";
     series1.Legend = "Default";
     series1.MarkerSize = 9;
     series1.Name = "Default";
     series1.Points.Add(dataPoint1);
     series1.Points.Add(dataPoint2);
     series1.Points.Add(dataPoint3);
     series1.Points.Add(dataPoint4);
     series1.Points.Add(dataPoint5);
     series1.ShadowColor = System.Drawing.Color.Black;
     series1.ShadowOffset = 1;
     series1.SmartLabelStyle.CalloutStyle = System.Windows.Forms.DataVisualization.Charting.LabelCalloutStyle.Box;
     series2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
     series2.ChartArea = "Default";
     series2.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;
     series2.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     series2.IsValueShownAsLabel = true;
     series2.LabelFormat = "P0";
     series2.Legend = "Default";
     series2.MarkerSize = 11;
     series2.Name = "Series2";
     series2.Points.Add(dataPoint6);
     series2.Points.Add(dataPoint7);
     series2.Points.Add(dataPoint8);
     series2.Points.Add(dataPoint9);
     series2.Points.Add(dataPoint10);
     series2.ShadowColor = System.Drawing.Color.Black;
     series2.ShadowOffset = 1;
     series3.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
     series3.ChartArea = "Default";
     series3.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;
     series3.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     series3.IsValueShownAsLabel = true;
     series3.LabelFormat = "P0";
     series3.Legend = "Default";
     series3.MarkerSize = 12;
     series3.Name = "Series3";
     series3.Points.Add(dataPoint11);
     series3.Points.Add(dataPoint12);
     series3.Points.Add(dataPoint13);
     series3.Points.Add(dataPoint14);
     series3.Points.Add(dataPoint15);
     series3.ShadowColor = System.Drawing.Color.Black;
     series3.ShadowOffset = 1;
     this.chart1.Series.Add(series1);
     this.chart1.Series.Add(series2);
     this.chart1.Series.Add(series3);
     this.chart1.Size = new System.Drawing.Size(412, 296);
     this.chart1.TabIndex = 0;
     //
     // labelSampleComment
     //
     this.labelSampleComment.Font = new System.Drawing.Font("Verdana", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.labelSampleComment.Location = new System.Drawing.Point(16, 14);
     this.labelSampleComment.Name = "labelSampleComment";
     this.labelSampleComment.Size = new System.Drawing.Size(702, 36);
     this.labelSampleComment.TabIndex = 2;
     this.labelSampleComment.Text = "This sample demonstrates how to use smart labels in the Annotation object to avoi" +
         "d overlapping other chart elements that use smart labels. ";
     this.labelSampleComment.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // panel1
     //
     this.panel1.Controls.Add(this.checkBoxEnable);
     this.panel1.Location = new System.Drawing.Point(432, 68);
     this.panel1.Name = "panel1";
     this.panel1.Size = new System.Drawing.Size(292, 288);
     this.panel1.TabIndex = 1;
     //
     // checkBoxEnable
     //
     this.checkBoxEnable.Checked = true;
     this.checkBoxEnable.CheckState = System.Windows.Forms.CheckState.Checked;
     this.checkBoxEnable.Location = new System.Drawing.Point(48, 16);
     this.checkBoxEnable.Name = "checkBoxEnable";
     this.checkBoxEnable.Size = new System.Drawing.Size(184, 24);
     this.checkBoxEnable.TabIndex = 0;
     this.checkBoxEnable.Text = "&Enable Smart Labels";
     this.checkBoxEnable.CheckedChanged += new System.EventHandler(this.Enable_CheckedChanged);
     //
     // label1
     //
     this.label1.Font = new System.Drawing.Font("Verdana", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label1.Location = new System.Drawing.Point(16, 374);
     this.label1.Name = "label1";
     this.label1.Size = new System.Drawing.Size(702, 56);
     this.label1.TabIndex = 3;
     this.label1.Text = resources.GetString("label1.Text");
     this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // AnnotationSmartLabels
     //
     this.BackColor = System.Drawing.Color.White;
     this.Controls.Add(this.label1);
     this.Controls.Add(this.panel1);
     this.Controls.Add(this.labelSampleComment);
     this.Controls.Add(this.chart1);
     this.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.Name = "AnnotationSmartLabels";
     this.Size = new System.Drawing.Size(728, 480);
     ((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit();
     this.panel1.ResumeLayout(false);
     this.ResumeLayout(false);
 }
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.Windows.Forms.DataVisualization.Charting.CalloutAnnotation calloutAnnotation1 = new System.Windows.Forms.DataVisualization.Charting.CalloutAnnotation();
     System.Windows.Forms.DataVisualization.Charting.ChartArea         chartArea1         = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
     System.Windows.Forms.DataVisualization.Charting.Legend            legend1            = new System.Windows.Forms.DataVisualization.Charting.Legend();
     System.Windows.Forms.DataVisualization.Charting.Series            series1            = new System.Windows.Forms.DataVisualization.Charting.Series();
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint1         = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 70);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint2         = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 40);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint3         = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 30);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint4         = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 79);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint5         = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 91);
     System.Windows.Forms.DataVisualization.Charting.Series            series2            = new System.Windows.Forms.DataVisualization.Charting.Series();
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint6         = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 78);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint7         = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 39);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint8         = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 67);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint9         = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 34);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint10        = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 60);
     System.Windows.Forms.DataVisualization.Charting.Series            series3            = new System.Windows.Forms.DataVisualization.Charting.Series();
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint11        = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 81);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint12        = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 55);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint13        = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 47);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint14        = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 67);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint15        = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 87);
     this.label9          = new System.Windows.Forms.Label();
     this.panel1          = new System.Windows.Forms.Panel();
     this.ClipToChartArea = new System.Windows.Forms.CheckBox();
     this.AnnotationY     = new System.Windows.Forms.TextBox();
     this.AnnotationX     = new System.Windows.Forms.TextBox();
     this.label2          = new System.Windows.Forms.Label();
     this.label3          = new System.Windows.Forms.Label();
     this.AllowMoving     = new System.Windows.Forms.CheckBox();
     this.Chart1          = new System.Windows.Forms.DataVisualization.Charting.Chart();
     this.label1          = new System.Windows.Forms.Label();
     this.panel1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.Chart1)).BeginInit();
     this.SuspendLayout();
     //
     // label9
     //
     this.label9.Font      = new System.Drawing.Font("Verdana", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label9.Location  = new System.Drawing.Point(16, 8);
     this.label9.Name      = "label9";
     this.label9.Size      = new System.Drawing.Size(702, 34);
     this.label9.TabIndex  = 2;
     this.label9.Text      = "This sample demonstrates the AnnotationPositionChanged event.";
     this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // panel1
     //
     this.panel1.Controls.Add(this.ClipToChartArea);
     this.panel1.Controls.Add(this.AnnotationY);
     this.panel1.Controls.Add(this.AnnotationX);
     this.panel1.Controls.Add(this.label2);
     this.panel1.Controls.Add(this.label3);
     this.panel1.Controls.Add(this.AllowMoving);
     this.panel1.Location = new System.Drawing.Point(432, 56);
     this.panel1.Name     = "panel1";
     this.panel1.Size     = new System.Drawing.Size(292, 288);
     this.panel1.TabIndex = 1;
     //
     // ClipToChartArea
     //
     this.ClipToChartArea.CheckAlign      = System.Drawing.ContentAlignment.MiddleRight;
     this.ClipToChartArea.Location        = new System.Drawing.Point(29, 40);
     this.ClipToChartArea.Name            = "ClipToChartArea";
     this.ClipToChartArea.Size            = new System.Drawing.Size(152, 24);
     this.ClipToChartArea.TabIndex        = 1;
     this.ClipToChartArea.Text            = "&Clip To Chart Area:  ";
     this.ClipToChartArea.TextAlign       = System.Drawing.ContentAlignment.MiddleRight;
     this.ClipToChartArea.CheckedChanged += new System.EventHandler(this.ClipToChartArea_CheckedChanged);
     //
     // AnnotationY
     //
     this.AnnotationY.Location = new System.Drawing.Point(168, 104);
     this.AnnotationY.Name     = "AnnotationY";
     this.AnnotationY.ReadOnly = true;
     this.AnnotationY.Size     = new System.Drawing.Size(40, 22);
     this.AnnotationY.TabIndex = 5;
     this.AnnotationY.Text     = "0";
     //
     // AnnotationX
     //
     this.AnnotationX.Location = new System.Drawing.Point(168, 72);
     this.AnnotationX.Name     = "AnnotationX";
     this.AnnotationX.ReadOnly = true;
     this.AnnotationX.Size     = new System.Drawing.Size(40, 22);
     this.AnnotationX.TabIndex = 3;
     this.AnnotationX.Text     = "0";
     //
     // label2
     //
     this.label2.Location  = new System.Drawing.Point(99, 104);
     this.label2.Name      = "label2";
     this.label2.Size      = new System.Drawing.Size(64, 23);
     this.label2.TabIndex  = 4;
     this.label2.Text      = "&Y:";
     this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // label3
     //
     this.label3.Location  = new System.Drawing.Point(99, 72);
     this.label3.Name      = "label3";
     this.label3.Size      = new System.Drawing.Size(64, 23);
     this.label3.TabIndex  = 2;
     this.label3.Text      = "&X:";
     this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     this.label3.Click    += new System.EventHandler(this.label3_Click);
     //
     // AllowMoving
     //
     this.AllowMoving.CheckAlign      = System.Drawing.ContentAlignment.MiddleRight;
     this.AllowMoving.Checked         = true;
     this.AllowMoving.CheckState      = System.Windows.Forms.CheckState.Checked;
     this.AllowMoving.Location        = new System.Drawing.Point(61, 8);
     this.AllowMoving.Name            = "AllowMoving";
     this.AllowMoving.Size            = new System.Drawing.Size(120, 24);
     this.AllowMoving.TabIndex        = 0;
     this.AllowMoving.Text            = "Allow &Moving:";
     this.AllowMoving.TextAlign       = System.Drawing.ContentAlignment.MiddleRight;
     this.AllowMoving.CheckedChanged += new System.EventHandler(this.AllowMoving_CheckedChanged);
     //
     // Chart1
     //
     calloutAnnotation1.AllowMoving    = true;
     calloutAnnotation1.AllowSelecting = true;
     calloutAnnotation1.BackColor      = System.Drawing.Color.FromArgb(((int)(((byte)(210)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
     calloutAnnotation1.CalloutStyle   = System.Windows.Forms.DataVisualization.Charting.CalloutStyle.RoundedRectangle;
     calloutAnnotation1.Font           = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     calloutAnnotation1.Name           = "MyAnnotation";
     calloutAnnotation1.Text           = "Select and Reposition Me\\nusing the mouse";
     calloutAnnotation1.X = 0;
     calloutAnnotation1.Y = 0;
     this.Chart1.Annotations.Add(calloutAnnotation1);
     this.Chart1.BackColor                   = System.Drawing.Color.FromArgb(((int)(((byte)(211)))), ((int)(((byte)(223)))), ((int)(((byte)(240)))));
     this.Chart1.BackGradientStyle           = System.Windows.Forms.DataVisualization.Charting.GradientStyle.TopBottom;
     this.Chart1.BackSecondaryColor          = System.Drawing.Color.White;
     this.Chart1.BorderlineColor             = System.Drawing.Color.FromArgb(((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
     this.Chart1.BorderlineDashStyle         = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.Solid;
     this.Chart1.BorderlineWidth             = 2;
     this.Chart1.BorderSkin.SkinStyle        = System.Windows.Forms.DataVisualization.Charting.BorderSkinStyle.Emboss;
     chartArea1.Area3DStyle.Inclination      = 15;
     chartArea1.Area3DStyle.IsClustered      = true;
     chartArea1.Area3DStyle.IsRightAngleAxes = false;
     chartArea1.Area3DStyle.Perspective      = 10;
     chartArea1.Area3DStyle.Rotation         = 10;
     chartArea1.Area3DStyle.WallWidth        = 0;
     chartArea1.AxisX.IsLabelAutoFit         = false;
     chartArea1.AxisX.LabelAutoFitStyle      = ((System.Windows.Forms.DataVisualization.Charting.LabelAutoFitStyles)((((System.Windows.Forms.DataVisualization.Charting.LabelAutoFitStyles.IncreaseFont | System.Windows.Forms.DataVisualization.Charting.LabelAutoFitStyles.DecreaseFont)
                                                                                                                       | System.Windows.Forms.DataVisualization.Charting.LabelAutoFitStyles.LabelsAngleStep30)
                                                                                                                      | System.Windows.Forms.DataVisualization.Charting.LabelAutoFitStyles.WordWrap)));
     chartArea1.AxisX.LabelStyle.Font              = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
     chartArea1.AxisX.LabelStyle.Interval          = 1;
     chartArea1.AxisX.LabelStyle.IsEndLabelVisible = false;
     chartArea1.AxisX.LineColor           = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.AxisX.MajorGrid.Enabled   = false;
     chartArea1.AxisX.MajorGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.AxisX2.Enabled            = System.Windows.Forms.DataVisualization.Charting.AxisEnabled.False;
     chartArea1.AxisX2.IsLabelAutoFit     = false;
     chartArea1.AxisX2.MajorGrid.Enabled  = false;
     chartArea1.AxisX2.Maximum            = 100;
     chartArea1.AxisY.IsLabelAutoFit      = false;
     chartArea1.AxisY.LabelStyle.Font     = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
     chartArea1.AxisY.LineColor           = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.AxisY.MajorGrid.Enabled   = false;
     chartArea1.AxisY.MajorGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.AxisY2.Enabled            = System.Windows.Forms.DataVisualization.Charting.AxisEnabled.False;
     chartArea1.AxisY2.IsLabelAutoFit     = false;
     chartArea1.AxisY2.MajorGrid.Enabled  = false;
     chartArea1.AxisY2.Maximum            = 1000;
     chartArea1.BackColor          = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(165)))), ((int)(((byte)(191)))), ((int)(((byte)(228)))));
     chartArea1.BackGradientStyle  = System.Windows.Forms.DataVisualization.Charting.GradientStyle.TopBottom;
     chartArea1.BackSecondaryColor = System.Drawing.Color.White;
     chartArea1.BorderColor        = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.BorderDashStyle    = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.Solid;
     chartArea1.Name        = "Default";
     chartArea1.ShadowColor = System.Drawing.Color.Transparent;
     this.Chart1.ChartAreas.Add(chartArea1);
     legend1.BackColor     = System.Drawing.Color.Transparent;
     legend1.Enabled       = false;
     legend1.Font          = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
     legend1.IsTextAutoFit = false;
     legend1.Name          = "Default";
     this.Chart1.Legends.Add(legend1);
     this.Chart1.Location = new System.Drawing.Point(16, 48);
     this.Chart1.Name     = "Chart1";
     series1.BorderColor  = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
     series1.ChartArea    = "Default";
     series1.Legend       = "Default";
     series1.Name         = "Default";
     series1.Points.Add(dataPoint1);
     series1.Points.Add(dataPoint2);
     series1.Points.Add(dataPoint3);
     series1.Points.Add(dataPoint4);
     series1.Points.Add(dataPoint5);
     series1.ShadowOffset      = 1;
     series1.XValueType        = System.Windows.Forms.DataVisualization.Charting.ChartValueType.Double;
     series1.YValueType        = System.Windows.Forms.DataVisualization.Charting.ChartValueType.Double;
     series2.BorderColor       = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
     series2.BorderWidth       = 4;
     series2.ChartArea         = "Default";
     series2.ChartType         = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline;
     series2.Legend            = "Default";
     series2.MarkerBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
     series2.MarkerColor       = System.Drawing.Color.Gold;
     series2.MarkerSize        = 8;
     series2.MarkerStyle       = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Circle;
     series2.Name = "Series2";
     series2.Points.Add(dataPoint6);
     series2.Points.Add(dataPoint7);
     series2.Points.Add(dataPoint8);
     series2.Points.Add(dataPoint9);
     series2.Points.Add(dataPoint10);
     series2.ShadowOffset = 1;
     series3.BorderColor  = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
     series3.ChartArea    = "Default";
     series3.Legend       = "Default";
     series3.Name         = "Series3";
     series3.Points.Add(dataPoint11);
     series3.Points.Add(dataPoint12);
     series3.Points.Add(dataPoint13);
     series3.Points.Add(dataPoint14);
     series3.Points.Add(dataPoint15);
     series3.ShadowOffset = 1;
     this.Chart1.Series.Add(series1);
     this.Chart1.Series.Add(series2);
     this.Chart1.Series.Add(series3);
     this.Chart1.Size     = new System.Drawing.Size(412, 296);
     this.Chart1.TabIndex = 0;
     this.Chart1.AnnotationPositionChanged += new System.EventHandler(this.Chart1_AnnotationPositionChanged);
     //
     // label1
     //
     this.label1.Font     = new System.Drawing.Font("Verdana", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label1.Location = new System.Drawing.Point(16, 360);
     this.label1.Name     = "label1";
     this.label1.Size     = new System.Drawing.Size(702, 39);
     this.label1.TabIndex = 3;
     this.label1.Text     = "Click on the annotation, and then move it with the mouse. This sample uses the An" +
                            "notationPositionChanged event to update X and Y coordinates to the right of the " +
                            "chart.";
     this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // PositionChangedEvent
     //
     this.BackColor = System.Drawing.Color.White;
     this.Controls.Add(this.label1);
     this.Controls.Add(this.Chart1);
     this.Controls.Add(this.panel1);
     this.Controls.Add(this.label9);
     this.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.Name = "PositionChangedEvent";
     this.Size = new System.Drawing.Size(728, 480);
     this.panel1.ResumeLayout(false);
     this.panel1.PerformLayout();
     ((System.ComponentModel.ISupportInitialize)(this.Chart1)).EndInit();
     this.ResumeLayout(false);
 }
コード例 #5
0
 /// <summary> 
 /// Required method for Designer support - do not modify 
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.Windows.Forms.DataVisualization.Charting.CalloutAnnotation calloutAnnotation1 = new System.Windows.Forms.DataVisualization.Charting.CalloutAnnotation();
     System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
     System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend();
     System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series();
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint1 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 70);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint2 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 40);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint3 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 30);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint4 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 79);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint5 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 91);
     System.Windows.Forms.DataVisualization.Charting.Series series2 = new System.Windows.Forms.DataVisualization.Charting.Series();
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint6 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 78);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint7 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 39);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint8 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 67);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint9 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 34);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint10 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 60);
     System.Windows.Forms.DataVisualization.Charting.Series series3 = new System.Windows.Forms.DataVisualization.Charting.Series();
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint11 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 81);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint12 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 55);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint13 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 47);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint14 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 67);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint15 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 87);
     this.label9 = new System.Windows.Forms.Label();
     this.panel1 = new System.Windows.Forms.Panel();
     this.ClipToChartArea = new System.Windows.Forms.CheckBox();
     this.AnnotationY = new System.Windows.Forms.TextBox();
     this.AnnotationX = new System.Windows.Forms.TextBox();
     this.label2 = new System.Windows.Forms.Label();
     this.label3 = new System.Windows.Forms.Label();
     this.AllowMoving = new System.Windows.Forms.CheckBox();
     this.Chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart();
     this.label1 = new System.Windows.Forms.Label();
     this.panel1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.Chart1)).BeginInit();
     this.SuspendLayout();
     //
     // label9
     //
     this.label9.Font = new System.Drawing.Font("Verdana", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label9.Location = new System.Drawing.Point(16, 8);
     this.label9.Name = "label9";
     this.label9.Size = new System.Drawing.Size(702, 34);
     this.label9.TabIndex = 2;
     this.label9.Text = "This sample demonstrates the AnnotationPositionChanged event.";
     this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // panel1
     //
     this.panel1.Controls.Add(this.ClipToChartArea);
     this.panel1.Controls.Add(this.AnnotationY);
     this.panel1.Controls.Add(this.AnnotationX);
     this.panel1.Controls.Add(this.label2);
     this.panel1.Controls.Add(this.label3);
     this.panel1.Controls.Add(this.AllowMoving);
     this.panel1.Location = new System.Drawing.Point(432, 56);
     this.panel1.Name = "panel1";
     this.panel1.Size = new System.Drawing.Size(292, 288);
     this.panel1.TabIndex = 1;
     //
     // ClipToChartArea
     //
     this.ClipToChartArea.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
     this.ClipToChartArea.Location = new System.Drawing.Point(29, 40);
     this.ClipToChartArea.Name = "ClipToChartArea";
     this.ClipToChartArea.Size = new System.Drawing.Size(152, 24);
     this.ClipToChartArea.TabIndex = 1;
     this.ClipToChartArea.Text = "&Clip To Chart Area:  ";
     this.ClipToChartArea.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     this.ClipToChartArea.CheckedChanged += new System.EventHandler(this.ClipToChartArea_CheckedChanged);
     //
     // AnnotationY
     //
     this.AnnotationY.Location = new System.Drawing.Point(168, 104);
     this.AnnotationY.Name = "AnnotationY";
     this.AnnotationY.ReadOnly = true;
     this.AnnotationY.Size = new System.Drawing.Size(40, 22);
     this.AnnotationY.TabIndex = 5;
     this.AnnotationY.Text = "0";
     //
     // AnnotationX
     //
     this.AnnotationX.Location = new System.Drawing.Point(168, 72);
     this.AnnotationX.Name = "AnnotationX";
     this.AnnotationX.ReadOnly = true;
     this.AnnotationX.Size = new System.Drawing.Size(40, 22);
     this.AnnotationX.TabIndex = 3;
     this.AnnotationX.Text = "0";
     //
     // label2
     //
     this.label2.Location = new System.Drawing.Point(99, 104);
     this.label2.Name = "label2";
     this.label2.Size = new System.Drawing.Size(64, 23);
     this.label2.TabIndex = 4;
     this.label2.Text = "&Y:";
     this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // label3
     //
     this.label3.Location = new System.Drawing.Point(99, 72);
     this.label3.Name = "label3";
     this.label3.Size = new System.Drawing.Size(64, 23);
     this.label3.TabIndex = 2;
     this.label3.Text = "&X:";
     this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     this.label3.Click += new System.EventHandler(this.label3_Click);
     //
     // AllowMoving
     //
     this.AllowMoving.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
     this.AllowMoving.Checked = true;
     this.AllowMoving.CheckState = System.Windows.Forms.CheckState.Checked;
     this.AllowMoving.Location = new System.Drawing.Point(61, 8);
     this.AllowMoving.Name = "AllowMoving";
     this.AllowMoving.Size = new System.Drawing.Size(120, 24);
     this.AllowMoving.TabIndex = 0;
     this.AllowMoving.Text = "Allow &Moving:";
     this.AllowMoving.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     this.AllowMoving.CheckedChanged += new System.EventHandler(this.AllowMoving_CheckedChanged);
     //
     // Chart1
     //
     calloutAnnotation1.AllowMoving = true;
     calloutAnnotation1.AllowSelecting = true;
     calloutAnnotation1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(210)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
     calloutAnnotation1.CalloutStyle = System.Windows.Forms.DataVisualization.Charting.CalloutStyle.RoundedRectangle;
     calloutAnnotation1.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     calloutAnnotation1.Name = "MyAnnotation";
     calloutAnnotation1.Text = "Select and Reposition Me\\nusing the mouse";
     calloutAnnotation1.X = 0;
     calloutAnnotation1.Y = 0;
     this.Chart1.Annotations.Add(calloutAnnotation1);
     this.Chart1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(211)))), ((int)(((byte)(223)))), ((int)(((byte)(240)))));
     this.Chart1.BackGradientStyle = System.Windows.Forms.DataVisualization.Charting.GradientStyle.TopBottom;
     this.Chart1.BackSecondaryColor = System.Drawing.Color.White;
     this.Chart1.BorderlineColor = System.Drawing.Color.FromArgb(((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
     this.Chart1.BorderlineDashStyle = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.Solid;
     this.Chart1.BorderlineWidth = 2;
     this.Chart1.BorderSkin.SkinStyle = System.Windows.Forms.DataVisualization.Charting.BorderSkinStyle.Emboss;
     chartArea1.Area3DStyle.Inclination = 15;
     chartArea1.Area3DStyle.IsClustered = true;
     chartArea1.Area3DStyle.IsRightAngleAxes = false;
     chartArea1.Area3DStyle.Perspective = 10;
     chartArea1.Area3DStyle.Rotation = 10;
     chartArea1.Area3DStyle.WallWidth = 0;
     chartArea1.AxisX.IsLabelAutoFit = false;
     chartArea1.AxisX.LabelAutoFitStyle = ((System.Windows.Forms.DataVisualization.Charting.LabelAutoFitStyles)((((System.Windows.Forms.DataVisualization.Charting.LabelAutoFitStyles.IncreaseFont | System.Windows.Forms.DataVisualization.Charting.LabelAutoFitStyles.DecreaseFont)
                 | System.Windows.Forms.DataVisualization.Charting.LabelAutoFitStyles.LabelsAngleStep30)
                 | System.Windows.Forms.DataVisualization.Charting.LabelAutoFitStyles.WordWrap)));
     chartArea1.AxisX.LabelStyle.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
     chartArea1.AxisX.LabelStyle.Interval = 1;
     chartArea1.AxisX.LabelStyle.IsEndLabelVisible = false;
     chartArea1.AxisX.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.AxisX.MajorGrid.Enabled = false;
     chartArea1.AxisX.MajorGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.AxisX2.Enabled = System.Windows.Forms.DataVisualization.Charting.AxisEnabled.False;
     chartArea1.AxisX2.IsLabelAutoFit = false;
     chartArea1.AxisX2.MajorGrid.Enabled = false;
     chartArea1.AxisX2.Maximum = 100;
     chartArea1.AxisY.IsLabelAutoFit = false;
     chartArea1.AxisY.LabelStyle.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
     chartArea1.AxisY.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.AxisY.MajorGrid.Enabled = false;
     chartArea1.AxisY.MajorGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.AxisY2.Enabled = System.Windows.Forms.DataVisualization.Charting.AxisEnabled.False;
     chartArea1.AxisY2.IsLabelAutoFit = false;
     chartArea1.AxisY2.MajorGrid.Enabled = false;
     chartArea1.AxisY2.Maximum = 1000;
     chartArea1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(165)))), ((int)(((byte)(191)))), ((int)(((byte)(228)))));
     chartArea1.BackGradientStyle = System.Windows.Forms.DataVisualization.Charting.GradientStyle.TopBottom;
     chartArea1.BackSecondaryColor = System.Drawing.Color.White;
     chartArea1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.BorderDashStyle = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.Solid;
     chartArea1.Name = "Default";
     chartArea1.ShadowColor = System.Drawing.Color.Transparent;
     this.Chart1.ChartAreas.Add(chartArea1);
     legend1.BackColor = System.Drawing.Color.Transparent;
     legend1.Enabled = false;
     legend1.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
     legend1.IsTextAutoFit = false;
     legend1.Name = "Default";
     this.Chart1.Legends.Add(legend1);
     this.Chart1.Location = new System.Drawing.Point(16, 48);
     this.Chart1.Name = "Chart1";
     series1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
     series1.ChartArea = "Default";
     series1.Legend = "Default";
     series1.Name = "Default";
     series1.Points.Add(dataPoint1);
     series1.Points.Add(dataPoint2);
     series1.Points.Add(dataPoint3);
     series1.Points.Add(dataPoint4);
     series1.Points.Add(dataPoint5);
     series1.ShadowOffset = 1;
     series1.XValueType = System.Windows.Forms.DataVisualization.Charting.ChartValueType.Double;
     series1.YValueType = System.Windows.Forms.DataVisualization.Charting.ChartValueType.Double;
     series2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
     series2.BorderWidth = 4;
     series2.ChartArea = "Default";
     series2.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline;
     series2.Legend = "Default";
     series2.MarkerBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
     series2.MarkerColor = System.Drawing.Color.Gold;
     series2.MarkerSize = 8;
     series2.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Circle;
     series2.Name = "Series2";
     series2.Points.Add(dataPoint6);
     series2.Points.Add(dataPoint7);
     series2.Points.Add(dataPoint8);
     series2.Points.Add(dataPoint9);
     series2.Points.Add(dataPoint10);
     series2.ShadowOffset = 1;
     series3.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
     series3.ChartArea = "Default";
     series3.Legend = "Default";
     series3.Name = "Series3";
     series3.Points.Add(dataPoint11);
     series3.Points.Add(dataPoint12);
     series3.Points.Add(dataPoint13);
     series3.Points.Add(dataPoint14);
     series3.Points.Add(dataPoint15);
     series3.ShadowOffset = 1;
     this.Chart1.Series.Add(series1);
     this.Chart1.Series.Add(series2);
     this.Chart1.Series.Add(series3);
     this.Chart1.Size = new System.Drawing.Size(412, 296);
     this.Chart1.TabIndex = 0;
     this.Chart1.AnnotationPositionChanged += new System.EventHandler(this.Chart1_AnnotationPositionChanged);
     //
     // label1
     //
     this.label1.Font = new System.Drawing.Font("Verdana", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label1.Location = new System.Drawing.Point(16, 360);
     this.label1.Name = "label1";
     this.label1.Size = new System.Drawing.Size(702, 39);
     this.label1.TabIndex = 3;
     this.label1.Text = "Click on the annotation, and then move it with the mouse. This sample uses the An" +
         "notationPositionChanged event to update X and Y coordinates to the right of the " +
         "chart.";
     this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // PositionChangedEvent
     //
     this.BackColor = System.Drawing.Color.White;
     this.Controls.Add(this.label1);
     this.Controls.Add(this.Chart1);
     this.Controls.Add(this.panel1);
     this.Controls.Add(this.label9);
     this.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.Name = "PositionChangedEvent";
     this.Size = new System.Drawing.Size(728, 480);
     this.panel1.ResumeLayout(false);
     this.panel1.PerformLayout();
     ((System.ComponentModel.ISupportInitialize)(this.Chart1)).EndInit();
     this.ResumeLayout(false);
 }
コード例 #6
0
ファイル: AnnotationEditing.cs プロジェクト: iProcyonidae/MVS
 /// <summary> 
 /// Required method for Designer support - do not modify 
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.Windows.Forms.DataVisualization.Charting.CalloutAnnotation calloutAnnotation1 = new System.Windows.Forms.DataVisualization.Charting.CalloutAnnotation();
     System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
     System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend();
     System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series();
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint1 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 700);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint2 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 400);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint3 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 200);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint4 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 450);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint5 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 300);
     System.Windows.Forms.DataVisualization.Charting.Series series2 = new System.Windows.Forms.DataVisualization.Charting.Series();
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint6 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 760);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint7 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 345);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint8 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 700);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint9 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 700);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint10 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 560);
     this.label9 = new System.Windows.Forms.Label();
     this.panel1 = new System.Windows.Forms.Panel();
     this.VisibleCheck = new System.Windows.Forms.CheckBox();
     this.AllowTextEditingCheck = new System.Windows.Forms.CheckBox();
     this.Chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart();
     this.panel1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.Chart1)).BeginInit();
     this.SuspendLayout();
     //
     // label9
     //
     this.label9.Font = new System.Drawing.Font("Verdana", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label9.Location = new System.Drawing.Point(16, 14);
     this.label9.Name = "label9";
     this.label9.Size = new System.Drawing.Size(702, 34);
     this.label9.TabIndex = 1;
     this.label9.Text = "This sample demonstrates how to enable and disable text editing for an annotation" +
         ".  Double-click on the Annotation object to begin editing the text.";
     this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // panel1
     //
     this.panel1.Controls.Add(this.VisibleCheck);
     this.panel1.Controls.Add(this.AllowTextEditingCheck);
     this.panel1.Location = new System.Drawing.Point(432, 68);
     this.panel1.Name = "panel1";
     this.panel1.Size = new System.Drawing.Size(292, 288);
     this.panel1.TabIndex = 19;
     //
     // VisibleCheck
     //
     this.VisibleCheck.Checked = true;
     this.VisibleCheck.CheckState = System.Windows.Forms.CheckState.Checked;
     this.VisibleCheck.Location = new System.Drawing.Point(48, 8);
     this.VisibleCheck.Name = "VisibleCheck";
     this.VisibleCheck.Size = new System.Drawing.Size(144, 24);
     this.VisibleCheck.TabIndex = 1;
     this.VisibleCheck.Text = "Annotation &Visible";
     this.VisibleCheck.CheckedChanged += new System.EventHandler(this.VisibleCheck_CheckedChanged);
     //
     // AllowTextEditingCheck
     //
     this.AllowTextEditingCheck.Checked = true;
     this.AllowTextEditingCheck.CheckState = System.Windows.Forms.CheckState.Checked;
     this.AllowTextEditingCheck.Location = new System.Drawing.Point(48, 40);
     this.AllowTextEditingCheck.Name = "AllowTextEditingCheck";
     this.AllowTextEditingCheck.Size = new System.Drawing.Size(200, 24);
     this.AllowTextEditingCheck.TabIndex = 0;
     this.AllowTextEditingCheck.Text = "Allow &Multiline Text Editing";
     this.AllowTextEditingCheck.CheckedChanged += new System.EventHandler(this.Enabled_CheckedChanged);
     //
     // Chart1
     //
     calloutAnnotation1.AllowTextEditing = true;
     calloutAnnotation1.AnchorDataPointName = "Default\\r2";
     calloutAnnotation1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(210)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
     calloutAnnotation1.CalloutStyle = System.Windows.Forms.DataVisualization.Charting.CalloutStyle.Ellipse;
     calloutAnnotation1.Font = new System.Drawing.Font("Trebuchet MS", 10F, System.Drawing.FontStyle.Bold);
     calloutAnnotation1.Name = "ElipseAnnotation";
     calloutAnnotation1.Text = "Double Click to \\nEdit this Annotation";
     this.Chart1.Annotations.Add(calloutAnnotation1);
     this.Chart1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(223)))), ((int)(((byte)(193)))));
     this.Chart1.BackGradientStyle = System.Windows.Forms.DataVisualization.Charting.GradientStyle.TopBottom;
     this.Chart1.BorderlineColor = System.Drawing.Color.FromArgb(((int)(((byte)(181)))), ((int)(((byte)(64)))), ((int)(((byte)(1)))));
     this.Chart1.BorderlineDashStyle = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.Solid;
     this.Chart1.BorderlineWidth = 2;
     this.Chart1.BorderSkin.SkinStyle = System.Windows.Forms.DataVisualization.Charting.BorderSkinStyle.Emboss;
     chartArea1.Area3DStyle.Inclination = 15;
     chartArea1.Area3DStyle.IsClustered = true;
     chartArea1.Area3DStyle.IsRightAngleAxes = false;
     chartArea1.Area3DStyle.Perspective = 10;
     chartArea1.Area3DStyle.Rotation = 10;
     chartArea1.Area3DStyle.WallWidth = 0;
     chartArea1.AxisX.LabelStyle.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
     chartArea1.AxisX.LabelStyle.Interval = 0;
     chartArea1.AxisX.LabelStyle.IntervalOffset = 0;
     chartArea1.AxisX.LabelStyle.IntervalOffsetType = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisX.LabelStyle.IntervalType = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisX.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.AxisX.MajorGrid.Enabled = false;
     chartArea1.AxisX.MajorGrid.Interval = 0;
     chartArea1.AxisX.MajorGrid.IntervalOffset = 0;
     chartArea1.AxisX.MajorGrid.IntervalOffsetType = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisX.MajorGrid.IntervalType = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisX.MajorGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.AxisX.MajorTickMark.Interval = 0;
     chartArea1.AxisX.MajorTickMark.IntervalOffset = 0;
     chartArea1.AxisX.MajorTickMark.IntervalOffsetType = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisX.MajorTickMark.IntervalType = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisX2.Enabled = System.Windows.Forms.DataVisualization.Charting.AxisEnabled.False;
     chartArea1.AxisX2.LabelStyle.Interval = 0;
     chartArea1.AxisX2.LabelStyle.IntervalOffset = 0;
     chartArea1.AxisX2.LabelStyle.IntervalOffsetType = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisX2.LabelStyle.IntervalType = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisX2.MajorGrid.Interval = 0;
     chartArea1.AxisX2.MajorGrid.IntervalOffset = 0;
     chartArea1.AxisX2.MajorGrid.IntervalOffsetType = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisX2.MajorGrid.IntervalType = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisX2.MajorTickMark.Interval = 0;
     chartArea1.AxisX2.MajorTickMark.IntervalOffset = 0;
     chartArea1.AxisX2.MajorTickMark.IntervalOffsetType = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisX2.MajorTickMark.IntervalType = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisY.LabelStyle.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
     chartArea1.AxisY.LabelStyle.Interval = 0;
     chartArea1.AxisY.LabelStyle.IntervalOffset = 0;
     chartArea1.AxisY.LabelStyle.IntervalOffsetType = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisY.LabelStyle.IntervalType = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisY.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.AxisY.MajorGrid.Enabled = false;
     chartArea1.AxisY.MajorGrid.Interval = 0;
     chartArea1.AxisY.MajorGrid.IntervalOffset = 0;
     chartArea1.AxisY.MajorGrid.IntervalOffsetType = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisY.MajorGrid.IntervalType = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisY.MajorGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.AxisY.MajorTickMark.Interval = 0;
     chartArea1.AxisY.MajorTickMark.IntervalOffset = 0;
     chartArea1.AxisY.MajorTickMark.IntervalOffsetType = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisY.MajorTickMark.IntervalType = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisY2.Enabled = System.Windows.Forms.DataVisualization.Charting.AxisEnabled.False;
     chartArea1.AxisY2.LabelStyle.Interval = 0;
     chartArea1.AxisY2.LabelStyle.IntervalOffset = 0;
     chartArea1.AxisY2.LabelStyle.IntervalOffsetType = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisY2.LabelStyle.IntervalType = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisY2.MajorGrid.Enabled = false;
     chartArea1.AxisY2.MajorGrid.Interval = 0;
     chartArea1.AxisY2.MajorGrid.IntervalOffset = 0;
     chartArea1.AxisY2.MajorGrid.IntervalOffsetType = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisY2.MajorGrid.IntervalType = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisY2.MajorTickMark.Interval = 0;
     chartArea1.AxisY2.MajorTickMark.IntervalOffset = 0;
     chartArea1.AxisY2.MajorTickMark.IntervalOffsetType = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisY2.MajorTickMark.IntervalType = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.BackColor = System.Drawing.Color.OldLace;
     chartArea1.BackGradientStyle = System.Windows.Forms.DataVisualization.Charting.GradientStyle.TopBottom;
     chartArea1.BackSecondaryColor = System.Drawing.Color.White;
     chartArea1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.InnerPlotPosition.Auto = false;
     chartArea1.InnerPlotPosition.Height = 84.1734F;
     chartArea1.InnerPlotPosition.Width = 88.71976F;
     chartArea1.InnerPlotPosition.X = 7.14066F;
     chartArea1.InnerPlotPosition.Y = 4.23579F;
     chartArea1.Name = "Default";
     chartArea1.Position.Auto = false;
     chartArea1.Position.Height = 86.76062F;
     chartArea1.Position.Width = 88.77716F;
     chartArea1.Position.X = 5.089137F;
     chartArea1.Position.Y = 5.895753F;
     chartArea1.ShadowColor = System.Drawing.Color.Transparent;
     this.Chart1.ChartAreas.Add(chartArea1);
     legend1.BackColor = System.Drawing.Color.Transparent;
     legend1.Enabled = false;
     legend1.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
     legend1.IsTextAutoFit = false;
     legend1.Name = "Default";
     this.Chart1.Legends.Add(legend1);
     this.Chart1.Location = new System.Drawing.Point(16, 60);
     this.Chart1.Name = "Chart1";
     series1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
     series1.ChartArea = "Default";
     series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Bar;
     series1.Legend = "Default";
     series1.Name = "Default";
     series1.Points.Add(dataPoint1);
     series1.Points.Add(dataPoint2);
     series1.Points.Add(dataPoint3);
     series1.Points.Add(dataPoint4);
     series1.Points.Add(dataPoint5);
     series2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
     series2.ChartArea = "Default";
     series2.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Bar;
     series2.Legend = "Default";
     series2.Name = "Series2";
     series2.Points.Add(dataPoint6);
     series2.Points.Add(dataPoint7);
     series2.Points.Add(dataPoint8);
     series2.Points.Add(dataPoint9);
     series2.Points.Add(dataPoint10);
     this.Chart1.Series.Add(series1);
     this.Chart1.Series.Add(series2);
     this.Chart1.Size = new System.Drawing.Size(412, 296);
     this.Chart1.TabIndex = 0;
     this.Chart1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Chart1_KeyDown);
     this.Chart1.Click += new System.EventHandler(this.Chart1_Click);
     //
     // AnnotationEditing
     //
     this.BackColor = System.Drawing.Color.White;
     this.Controls.Add(this.Chart1);
     this.Controls.Add(this.panel1);
     this.Controls.Add(this.label9);
     this.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.Name = "AnnotationEditing";
     this.Size = new System.Drawing.Size(728, 480);
     this.panel1.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.Chart1)).EndInit();
     this.ResumeLayout(false);
 }
コード例 #7
0
        private void AddMarker(DataPoint dp)
        {
            dp.MarkerStyle = MarkerStyle.Circle;
            dp.MarkerSize = 5;
            dp.MarkerColor = Color.Red;
            var value = (long)dp.YValues[0];

            CalloutAnnotation a = new CalloutAnnotation();
            a.AllowMoving = true;
            a.AllowSelecting = true;
            a.BackColor = Color.BlanchedAlmond;
            a.Text = FormatValueEvent(value);
            a.AnchorDataPoint = dp;
            a.AllowTextEditing = true;
            m_chart.Annotations.Add(a);

            int key = (int)dp.XValue;
            if (!m_annotations.ContainsKey(key))
            {
                m_annotations.Add(key, new List<Annotation>());
            }
            m_annotations[(int)dp.XValue].Add(a);
        }
 /// <summary> 
 /// Required method for Designer support - do not modify 
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.Windows.Forms.DataVisualization.Charting.CalloutAnnotation calloutAnnotation1 = new System.Windows.Forms.DataVisualization.Charting.CalloutAnnotation();
     System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
     System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend();
     System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series();
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint1 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(1, 700);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint2 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(2, 400);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint3 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(3, 200);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint4 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(4, 450);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint5 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(5, 300);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint6 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(6, 756);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint7 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(7, 398);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint8 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(8, 467);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint9 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(9, 612);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint10 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(10, 356);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint11 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(11, 678);
     System.Windows.Forms.DataVisualization.Charting.Title title1 = new System.Windows.Forms.DataVisualization.Charting.Title();
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AnnotationPositionChanging));
     this.label9 = new System.Windows.Forms.Label();
     this.panel1 = new System.Windows.Forms.Panel();
     this.AnchorY = new System.Windows.Forms.Label();
     this.AnchorX = new System.Windows.Forms.Label();
     this.label1 = new System.Windows.Forms.Label();
     this.AnchorXLocation = new System.Windows.Forms.Label();
     this.ResetPosition = new System.Windows.Forms.Button();
     this.SnapToDataPoint = new System.Windows.Forms.CheckBox();
     this.Chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart();
     this.label2 = new System.Windows.Forms.Label();
     this.panel1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.Chart1)).BeginInit();
     this.SuspendLayout();
     //
     // label9
     //
     this.label9.Font = new System.Drawing.Font("Verdana", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label9.Location = new System.Drawing.Point(16, 8);
     this.label9.Name = "label9";
     this.label9.Size = new System.Drawing.Size(702, 34);
     this.label9.TabIndex = 1;
     this.label9.Text = "This sample demonstrates the AnnotationPositionChanging event. ";
     this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // panel1
     //
     this.panel1.Controls.Add(this.AnchorY);
     this.panel1.Controls.Add(this.AnchorX);
     this.panel1.Controls.Add(this.label1);
     this.panel1.Controls.Add(this.AnchorXLocation);
     this.panel1.Controls.Add(this.ResetPosition);
     this.panel1.Controls.Add(this.SnapToDataPoint);
     this.panel1.Location = new System.Drawing.Point(432, 56);
     this.panel1.Name = "panel1";
     this.panel1.Size = new System.Drawing.Size(292, 288);
     this.panel1.TabIndex = 19;
     //
     // AnchorY
     //
     this.AnchorY.ForeColor = System.Drawing.Color.Red;
     this.AnchorY.Location = new System.Drawing.Point(168, 80);
     this.AnchorY.Name = "AnchorY";
     this.AnchorY.Size = new System.Drawing.Size(72, 23);
     this.AnchorY.TabIndex = 8;
     this.AnchorY.Text = "label4";
     this.AnchorY.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // AnchorX
     //
     this.AnchorX.ForeColor = System.Drawing.Color.Red;
     this.AnchorX.Location = new System.Drawing.Point(168, 48);
     this.AnchorX.Name = "AnchorX";
     this.AnchorX.Size = new System.Drawing.Size(72, 23);
     this.AnchorX.TabIndex = 7;
     this.AnchorX.Text = "label4";
     this.AnchorX.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // label1
     //
     this.label1.Location = new System.Drawing.Point(24, 80);
     this.label1.Name = "label1";
     this.label1.Size = new System.Drawing.Size(136, 23);
     this.label1.TabIndex = 4;
     this.label1.Text = "Anchor Position Y:";
     this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // AnchorXLocation
     //
     this.AnchorXLocation.Location = new System.Drawing.Point(16, 48);
     this.AnchorXLocation.Name = "AnchorXLocation";
     this.AnchorXLocation.Size = new System.Drawing.Size(144, 23);
     this.AnchorXLocation.TabIndex = 3;
     this.AnchorXLocation.Text = "Anchor Position X:";
     this.AnchorXLocation.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // ResetPosition
     //
     this.ResetPosition.BackColor = System.Drawing.SystemColors.Control;
     this.ResetPosition.Location = new System.Drawing.Point(64, 120);
     this.ResetPosition.Name = "ResetPosition";
     this.ResetPosition.Size = new System.Drawing.Size(136, 23);
     this.ResetPosition.TabIndex = 2;
     this.ResetPosition.Text = "&Reset Position";
     this.ResetPosition.UseVisualStyleBackColor = false;
     this.ResetPosition.Click += new System.EventHandler(this.ResetPosition_Click);
     //
     // SnapToDataPoint
     //
     this.SnapToDataPoint.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
     this.SnapToDataPoint.Checked = true;
     this.SnapToDataPoint.CheckState = System.Windows.Forms.CheckState.Checked;
     this.SnapToDataPoint.Location = new System.Drawing.Point(11, 16);
     this.SnapToDataPoint.Name = "SnapToDataPoint";
     this.SnapToDataPoint.Size = new System.Drawing.Size(168, 24);
     this.SnapToDataPoint.TabIndex = 0;
     this.SnapToDataPoint.Text = "&Snap to DataPoint";
     this.SnapToDataPoint.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // Chart1
     //
     calloutAnnotation1.AllowAnchorMoving = true;
     calloutAnnotation1.AllowSelecting = true;
     calloutAnnotation1.AnchorDataPointName = "Default\\r2";
     calloutAnnotation1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(240)))));
     calloutAnnotation1.Font = new System.Drawing.Font("Trebuchet MS", 9F);
     calloutAnnotation1.Name = "Callout1";
     calloutAnnotation1.Text = "Select this Annotation Object\\nand move the Anchor point";
     calloutAnnotation1.ToolTip = "Don\'t forget to move the anchor point";
     this.Chart1.Annotations.Add(calloutAnnotation1);
     this.Chart1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(223)))), ((int)(((byte)(193)))));
     this.Chart1.BackGradientStyle = System.Windows.Forms.DataVisualization.Charting.GradientStyle.TopBottom;
     this.Chart1.BorderlineColor = System.Drawing.Color.FromArgb(((int)(((byte)(181)))), ((int)(((byte)(64)))), ((int)(((byte)(1)))));
     this.Chart1.BorderlineDashStyle = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.Solid;
     this.Chart1.BorderlineWidth = 2;
     this.Chart1.BorderSkin.SkinStyle = System.Windows.Forms.DataVisualization.Charting.BorderSkinStyle.Emboss;
     chartArea1.Area3DStyle.Inclination = 15;
     chartArea1.Area3DStyle.IsClustered = true;
     chartArea1.Area3DStyle.IsRightAngleAxes = false;
     chartArea1.Area3DStyle.Perspective = 10;
     chartArea1.Area3DStyle.Rotation = 10;
     chartArea1.Area3DStyle.WallWidth = 0;
     chartArea1.AxisX.IsLabelAutoFit = false;
     chartArea1.AxisX.LabelAutoFitStyle = ((System.Windows.Forms.DataVisualization.Charting.LabelAutoFitStyles)(((System.Windows.Forms.DataVisualization.Charting.LabelAutoFitStyles.IncreaseFont | System.Windows.Forms.DataVisualization.Charting.LabelAutoFitStyles.DecreaseFont)
                 | System.Windows.Forms.DataVisualization.Charting.LabelAutoFitStyles.WordWrap)));
     chartArea1.AxisX.LabelStyle.Font = new System.Drawing.Font("Trebuchet MS", 10F, System.Drawing.FontStyle.Bold);
     chartArea1.AxisX.LabelStyle.IsEndLabelVisible = false;
     chartArea1.AxisX.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.AxisX.MajorGrid.Enabled = false;
     chartArea1.AxisX.MajorGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.AxisX2.Enabled = System.Windows.Forms.DataVisualization.Charting.AxisEnabled.False;
     chartArea1.AxisY.LabelStyle.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
     chartArea1.AxisY.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.AxisY.MajorGrid.Enabled = false;
     chartArea1.AxisY.MajorGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.AxisY2.MajorGrid.Enabled = false;
     chartArea1.BackColor = System.Drawing.Color.OldLace;
     chartArea1.BackGradientStyle = System.Windows.Forms.DataVisualization.Charting.GradientStyle.TopBottom;
     chartArea1.BackSecondaryColor = System.Drawing.Color.White;
     chartArea1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.BorderDashStyle = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.Solid;
     chartArea1.InnerPlotPosition.Auto = false;
     chartArea1.InnerPlotPosition.Height = 67F;
     chartArea1.InnerPlotPosition.Width = 80F;
     chartArea1.InnerPlotPosition.X = 12F;
     chartArea1.InnerPlotPosition.Y = 22F;
     chartArea1.Name = "Default";
     chartArea1.Position.Auto = false;
     chartArea1.Position.Height = 95F;
     chartArea1.Position.Width = 99F;
     chartArea1.Position.X = 1F;
     chartArea1.Position.Y = 1F;
     chartArea1.ShadowColor = System.Drawing.Color.Transparent;
     this.Chart1.ChartAreas.Add(chartArea1);
     legend1.BackColor = System.Drawing.Color.Transparent;
     legend1.Enabled = false;
     legend1.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
     legend1.IsTextAutoFit = false;
     legend1.Name = "Default";
     this.Chart1.Legends.Add(legend1);
     this.Chart1.Location = new System.Drawing.Point(16, 48);
     this.Chart1.Name = "Chart1";
     series1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
     series1.ChartArea = "Default";
     series1.Legend = "Default";
     series1.Name = "Default";
     series1.Points.Add(dataPoint1);
     series1.Points.Add(dataPoint2);
     series1.Points.Add(dataPoint3);
     series1.Points.Add(dataPoint4);
     series1.Points.Add(dataPoint5);
     series1.Points.Add(dataPoint6);
     series1.Points.Add(dataPoint7);
     series1.Points.Add(dataPoint8);
     series1.Points.Add(dataPoint9);
     series1.Points.Add(dataPoint10);
     series1.Points.Add(dataPoint11);
     this.Chart1.Series.Add(series1);
     this.Chart1.Size = new System.Drawing.Size(412, 296);
     this.Chart1.TabIndex = 0;
     title1.Font = new System.Drawing.Font("Trebuchet MS", 14.25F, System.Drawing.FontStyle.Bold);
     title1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
     title1.Name = "Title1";
     title1.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
     title1.ShadowOffset = 3;
     title1.Text = "Position Changed Event";
     this.Chart1.Titles.Add(title1);
     this.Chart1.AnnotationPositionChanged += new System.EventHandler(this.Chart1_AnnotationPositionChanged);
     this.Chart1.AnnotationSelectionChanged += new System.EventHandler(this.Chart1_AnnotationSelectionChanged);
     this.Chart1.AnnotationPositionChanging += new System.EventHandler<System.Windows.Forms.DataVisualization.Charting.AnnotationPositionChangingEventArgs>(this.Chart1_AnnotationPositionChanging);
     //
     // label2
     //
     this.label2.Font = new System.Drawing.Font("Verdana", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label2.Location = new System.Drawing.Point(16, 357);
     this.label2.Name = "label2";
     this.label2.Size = new System.Drawing.Size(702, 57);
     this.label2.TabIndex = 20;
     this.label2.Text = resources.GetString("label2.Text");
     this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // AnnotationPositionChanging
     //
     this.BackColor = System.Drawing.Color.White;
     this.Controls.Add(this.label2);
     this.Controls.Add(this.Chart1);
     this.Controls.Add(this.panel1);
     this.Controls.Add(this.label9);
     this.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.Name = "AnnotationPositionChanging";
     this.Size = new System.Drawing.Size(728, 480);
     this.panel1.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.Chart1)).EndInit();
     this.ResumeLayout(false);
 }
コード例 #9
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.Windows.Forms.DataVisualization.Charting.CalloutAnnotation calloutAnnotation1 = new System.Windows.Forms.DataVisualization.Charting.CalloutAnnotation();
     System.Windows.Forms.DataVisualization.Charting.ChartArea         chartArea1         = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
     System.Windows.Forms.DataVisualization.Charting.Legend            legend1            = new System.Windows.Forms.DataVisualization.Charting.Legend();
     System.Windows.Forms.DataVisualization.Charting.Series            series1            = new System.Windows.Forms.DataVisualization.Charting.Series();
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint1         = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 700);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint2         = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 400);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint3         = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 200);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint4         = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 450);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint5         = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 300);
     System.Windows.Forms.DataVisualization.Charting.Series            series2            = new System.Windows.Forms.DataVisualization.Charting.Series();
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint6         = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 760);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint7         = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 345);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint8         = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 700);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint9         = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 700);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint10        = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 560);
     this.label9                = new System.Windows.Forms.Label();
     this.panel1                = new System.Windows.Forms.Panel();
     this.VisibleCheck          = new System.Windows.Forms.CheckBox();
     this.AllowTextEditingCheck = new System.Windows.Forms.CheckBox();
     this.Chart1                = new System.Windows.Forms.DataVisualization.Charting.Chart();
     this.panel1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.Chart1)).BeginInit();
     this.SuspendLayout();
     //
     // label9
     //
     this.label9.Font     = new System.Drawing.Font("Verdana", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label9.Location = new System.Drawing.Point(16, 14);
     this.label9.Name     = "label9";
     this.label9.Size     = new System.Drawing.Size(702, 34);
     this.label9.TabIndex = 1;
     this.label9.Text     = "This sample demonstrates how to enable and disable text editing for an annotation" +
                            ".  Double-click on the Annotation object to begin editing the text.";
     this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // panel1
     //
     this.panel1.Controls.Add(this.VisibleCheck);
     this.panel1.Controls.Add(this.AllowTextEditingCheck);
     this.panel1.Location = new System.Drawing.Point(432, 68);
     this.panel1.Name     = "panel1";
     this.panel1.Size     = new System.Drawing.Size(292, 288);
     this.panel1.TabIndex = 19;
     //
     // VisibleCheck
     //
     this.VisibleCheck.Checked         = true;
     this.VisibleCheck.CheckState      = System.Windows.Forms.CheckState.Checked;
     this.VisibleCheck.Location        = new System.Drawing.Point(48, 8);
     this.VisibleCheck.Name            = "VisibleCheck";
     this.VisibleCheck.Size            = new System.Drawing.Size(144, 24);
     this.VisibleCheck.TabIndex        = 1;
     this.VisibleCheck.Text            = "Annotation &Visible";
     this.VisibleCheck.CheckedChanged += new System.EventHandler(this.VisibleCheck_CheckedChanged);
     //
     // AllowTextEditingCheck
     //
     this.AllowTextEditingCheck.Checked         = true;
     this.AllowTextEditingCheck.CheckState      = System.Windows.Forms.CheckState.Checked;
     this.AllowTextEditingCheck.Location        = new System.Drawing.Point(48, 40);
     this.AllowTextEditingCheck.Name            = "AllowTextEditingCheck";
     this.AllowTextEditingCheck.Size            = new System.Drawing.Size(200, 24);
     this.AllowTextEditingCheck.TabIndex        = 0;
     this.AllowTextEditingCheck.Text            = "Allow &Multiline Text Editing";
     this.AllowTextEditingCheck.CheckedChanged += new System.EventHandler(this.Enabled_CheckedChanged);
     //
     // Chart1
     //
     calloutAnnotation1.AllowTextEditing    = true;
     calloutAnnotation1.AnchorDataPointName = "Default\\r2";
     calloutAnnotation1.BackColor           = System.Drawing.Color.FromArgb(((int)(((byte)(210)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
     calloutAnnotation1.CalloutStyle        = System.Windows.Forms.DataVisualization.Charting.CalloutStyle.Ellipse;
     calloutAnnotation1.Font = new System.Drawing.Font("Trebuchet MS", 10F, System.Drawing.FontStyle.Bold);
     calloutAnnotation1.Name = "ElipseAnnotation";
     calloutAnnotation1.Text = "Double Click to \\nEdit this Annotation";
     this.Chart1.Annotations.Add(calloutAnnotation1);
     this.Chart1.BackColor                              = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(223)))), ((int)(((byte)(193)))));
     this.Chart1.BackGradientStyle                      = System.Windows.Forms.DataVisualization.Charting.GradientStyle.TopBottom;
     this.Chart1.BorderlineColor                        = System.Drawing.Color.FromArgb(((int)(((byte)(181)))), ((int)(((byte)(64)))), ((int)(((byte)(1)))));
     this.Chart1.BorderlineDashStyle                    = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.Solid;
     this.Chart1.BorderlineWidth                        = 2;
     this.Chart1.BorderSkin.SkinStyle                   = System.Windows.Forms.DataVisualization.Charting.BorderSkinStyle.Emboss;
     chartArea1.Area3DStyle.Inclination                 = 15;
     chartArea1.Area3DStyle.IsClustered                 = true;
     chartArea1.Area3DStyle.IsRightAngleAxes            = false;
     chartArea1.Area3DStyle.Perspective                 = 10;
     chartArea1.Area3DStyle.Rotation                    = 10;
     chartArea1.Area3DStyle.WallWidth                   = 0;
     chartArea1.AxisX.LabelStyle.Font                   = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
     chartArea1.AxisX.LabelStyle.Interval               = 0;
     chartArea1.AxisX.LabelStyle.IntervalOffset         = 0;
     chartArea1.AxisX.LabelStyle.IntervalOffsetType     = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisX.LabelStyle.IntervalType           = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisX.LineColor                         = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.AxisX.MajorGrid.Enabled                 = false;
     chartArea1.AxisX.MajorGrid.Interval                = 0;
     chartArea1.AxisX.MajorGrid.IntervalOffset          = 0;
     chartArea1.AxisX.MajorGrid.IntervalOffsetType      = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisX.MajorGrid.IntervalType            = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisX.MajorGrid.LineColor               = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.AxisX.MajorTickMark.Interval            = 0;
     chartArea1.AxisX.MajorTickMark.IntervalOffset      = 0;
     chartArea1.AxisX.MajorTickMark.IntervalOffsetType  = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisX.MajorTickMark.IntervalType        = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisX2.Enabled                          = System.Windows.Forms.DataVisualization.Charting.AxisEnabled.False;
     chartArea1.AxisX2.LabelStyle.Interval              = 0;
     chartArea1.AxisX2.LabelStyle.IntervalOffset        = 0;
     chartArea1.AxisX2.LabelStyle.IntervalOffsetType    = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisX2.LabelStyle.IntervalType          = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisX2.MajorGrid.Interval               = 0;
     chartArea1.AxisX2.MajorGrid.IntervalOffset         = 0;
     chartArea1.AxisX2.MajorGrid.IntervalOffsetType     = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisX2.MajorGrid.IntervalType           = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisX2.MajorTickMark.Interval           = 0;
     chartArea1.AxisX2.MajorTickMark.IntervalOffset     = 0;
     chartArea1.AxisX2.MajorTickMark.IntervalOffsetType = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisX2.MajorTickMark.IntervalType       = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisY.LabelStyle.Font                   = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
     chartArea1.AxisY.LabelStyle.Interval               = 0;
     chartArea1.AxisY.LabelStyle.IntervalOffset         = 0;
     chartArea1.AxisY.LabelStyle.IntervalOffsetType     = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisY.LabelStyle.IntervalType           = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisY.LineColor                         = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.AxisY.MajorGrid.Enabled                 = false;
     chartArea1.AxisY.MajorGrid.Interval                = 0;
     chartArea1.AxisY.MajorGrid.IntervalOffset          = 0;
     chartArea1.AxisY.MajorGrid.IntervalOffsetType      = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisY.MajorGrid.IntervalType            = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisY.MajorGrid.LineColor               = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.AxisY.MajorTickMark.Interval            = 0;
     chartArea1.AxisY.MajorTickMark.IntervalOffset      = 0;
     chartArea1.AxisY.MajorTickMark.IntervalOffsetType  = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisY.MajorTickMark.IntervalType        = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisY2.Enabled                          = System.Windows.Forms.DataVisualization.Charting.AxisEnabled.False;
     chartArea1.AxisY2.LabelStyle.Interval              = 0;
     chartArea1.AxisY2.LabelStyle.IntervalOffset        = 0;
     chartArea1.AxisY2.LabelStyle.IntervalOffsetType    = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisY2.LabelStyle.IntervalType          = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisY2.MajorGrid.Enabled                = false;
     chartArea1.AxisY2.MajorGrid.Interval               = 0;
     chartArea1.AxisY2.MajorGrid.IntervalOffset         = 0;
     chartArea1.AxisY2.MajorGrid.IntervalOffsetType     = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisY2.MajorGrid.IntervalType           = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisY2.MajorTickMark.Interval           = 0;
     chartArea1.AxisY2.MajorTickMark.IntervalOffset     = 0;
     chartArea1.AxisY2.MajorTickMark.IntervalOffsetType = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.AxisY2.MajorTickMark.IntervalType       = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto;
     chartArea1.BackColor                = System.Drawing.Color.OldLace;
     chartArea1.BackGradientStyle        = System.Windows.Forms.DataVisualization.Charting.GradientStyle.TopBottom;
     chartArea1.BackSecondaryColor       = System.Drawing.Color.White;
     chartArea1.BorderColor              = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.InnerPlotPosition.Auto   = false;
     chartArea1.InnerPlotPosition.Height = 84.1734F;
     chartArea1.InnerPlotPosition.Width  = 88.71976F;
     chartArea1.InnerPlotPosition.X      = 7.14066F;
     chartArea1.InnerPlotPosition.Y      = 4.23579F;
     chartArea1.Name            = "Default";
     chartArea1.Position.Auto   = false;
     chartArea1.Position.Height = 86.76062F;
     chartArea1.Position.Width  = 88.77716F;
     chartArea1.Position.X      = 5.089137F;
     chartArea1.Position.Y      = 5.895753F;
     chartArea1.ShadowColor     = System.Drawing.Color.Transparent;
     this.Chart1.ChartAreas.Add(chartArea1);
     legend1.BackColor     = System.Drawing.Color.Transparent;
     legend1.Enabled       = false;
     legend1.Font          = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
     legend1.IsTextAutoFit = false;
     legend1.Name          = "Default";
     this.Chart1.Legends.Add(legend1);
     this.Chart1.Location = new System.Drawing.Point(16, 60);
     this.Chart1.Name     = "Chart1";
     series1.BorderColor  = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
     series1.ChartArea    = "Default";
     series1.ChartType    = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Bar;
     series1.Legend       = "Default";
     series1.Name         = "Default";
     series1.Points.Add(dataPoint1);
     series1.Points.Add(dataPoint2);
     series1.Points.Add(dataPoint3);
     series1.Points.Add(dataPoint4);
     series1.Points.Add(dataPoint5);
     series2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
     series2.ChartArea   = "Default";
     series2.ChartType   = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Bar;
     series2.Legend      = "Default";
     series2.Name        = "Series2";
     series2.Points.Add(dataPoint6);
     series2.Points.Add(dataPoint7);
     series2.Points.Add(dataPoint8);
     series2.Points.Add(dataPoint9);
     series2.Points.Add(dataPoint10);
     this.Chart1.Series.Add(series1);
     this.Chart1.Series.Add(series2);
     this.Chart1.Size     = new System.Drawing.Size(412, 296);
     this.Chart1.TabIndex = 0;
     this.Chart1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Chart1_KeyDown);
     this.Chart1.Click   += new System.EventHandler(this.Chart1_Click);
     //
     // AnnotationEditing
     //
     this.BackColor = System.Drawing.Color.White;
     this.Controls.Add(this.Chart1);
     this.Controls.Add(this.panel1);
     this.Controls.Add(this.label9);
     this.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.Name = "AnnotationEditing";
     this.Size = new System.Drawing.Size(728, 480);
     this.panel1.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.Chart1)).EndInit();
     this.ResumeLayout(false);
 }
コード例 #10
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.Windows.Forms.DataVisualization.Charting.CalloutAnnotation calloutAnnotation1 = new System.Windows.Forms.DataVisualization.Charting.CalloutAnnotation();
     System.Windows.Forms.DataVisualization.Charting.ChartArea         chartArea1         = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
     System.Windows.Forms.DataVisualization.Charting.Legend            legend1            = new System.Windows.Forms.DataVisualization.Charting.Legend();
     System.Windows.Forms.DataVisualization.Charting.Series            series1            = new System.Windows.Forms.DataVisualization.Charting.Series();
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint1         = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 21);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint2         = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 14);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint3         = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 33);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint4         = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 57);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint5         = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 35);
     System.Windows.Forms.DataVisualization.Charting.Series            series2            = new System.Windows.Forms.DataVisualization.Charting.Series();
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint6         = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 74);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint7         = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 25);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint8         = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 82);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint9         = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 21);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint10        = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 56);
     System.Windows.Forms.DataVisualization.Charting.Series            series3            = new System.Windows.Forms.DataVisualization.Charting.Series();
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint11        = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 29);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint12        = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 77);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint13        = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 89);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint14        = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 44);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint15        = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 12);
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AnnotationSmartLabels));
     this.chart1             = new System.Windows.Forms.DataVisualization.Charting.Chart();
     this.labelSampleComment = new System.Windows.Forms.Label();
     this.panel1             = new System.Windows.Forms.Panel();
     this.checkBoxEnable     = new System.Windows.Forms.CheckBox();
     this.label1             = new System.Windows.Forms.Label();
     ((System.ComponentModel.ISupportInitialize)(this.chart1)).BeginInit();
     this.panel1.SuspendLayout();
     this.SuspendLayout();
     //
     // chart1
     //
     calloutAnnotation1.AllowAnchorMoving   = true;
     calloutAnnotation1.AllowSelecting      = true;
     calloutAnnotation1.AnchorDataPointName = "Default\\r2";
     calloutAnnotation1.BackColor           = System.Drawing.Color.FromArgb(((int)(((byte)(200)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
     calloutAnnotation1.CalloutStyle        = System.Windows.Forms.DataVisualization.Charting.CalloutStyle.Cloud;
     calloutAnnotation1.Font = new System.Drawing.Font("Trebuchet MS", 9F);
     calloutAnnotation1.Name = "Callout2";
     calloutAnnotation1.SmartLabelStyle.IsOverlappedHidden = false;
     calloutAnnotation1.Text = "Cloud Annotation";
     this.chart1.Annotations.Add(calloutAnnotation1);
     this.chart1.BackColor                   = System.Drawing.Color.WhiteSmoke;
     this.chart1.BackGradientStyle           = System.Windows.Forms.DataVisualization.Charting.GradientStyle.TopBottom;
     this.chart1.BackSecondaryColor          = System.Drawing.Color.White;
     this.chart1.BorderlineColor             = System.Drawing.Color.FromArgb(((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
     this.chart1.BorderlineDashStyle         = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.Solid;
     this.chart1.BorderlineWidth             = 2;
     this.chart1.BorderSkin.SkinStyle        = System.Windows.Forms.DataVisualization.Charting.BorderSkinStyle.Emboss;
     chartArea1.Area3DStyle.Inclination      = 15;
     chartArea1.Area3DStyle.IsClustered      = true;
     chartArea1.Area3DStyle.IsRightAngleAxes = false;
     chartArea1.Area3DStyle.Perspective      = 10;
     chartArea1.Area3DStyle.Rotation         = 10;
     chartArea1.Area3DStyle.WallWidth        = 0;
     chartArea1.AxisX.IsLabelAutoFit         = false;
     chartArea1.AxisX.LabelStyle.Font        = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
     chartArea1.AxisX.LineColor              = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.AxisX.MajorGrid.LineColor    = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.AxisY.IsLabelAutoFit         = false;
     chartArea1.AxisY.LabelStyle.Font        = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
     chartArea1.AxisY.LineColor              = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.AxisY.MajorGrid.LineColor    = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.BackColor          = System.Drawing.Color.Gainsboro;
     chartArea1.BackGradientStyle  = System.Windows.Forms.DataVisualization.Charting.GradientStyle.TopBottom;
     chartArea1.BackSecondaryColor = System.Drawing.Color.White;
     chartArea1.BorderColor        = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.Name        = "Default";
     chartArea1.ShadowColor = System.Drawing.Color.Transparent;
     this.chart1.ChartAreas.Add(chartArea1);
     legend1.BackColor     = System.Drawing.Color.Transparent;
     legend1.Enabled       = false;
     legend1.Font          = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
     legend1.IsTextAutoFit = false;
     legend1.Name          = "Default";
     this.chart1.Legends.Add(legend1);
     this.chart1.Location        = new System.Drawing.Point(16, 68);
     this.chart1.Name            = "chart1";
     series1.BorderColor         = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
     series1.ChartArea           = "Default";
     series1.ChartType           = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;
     series1.Font                = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     series1.IsValueShownAsLabel = true;
     series1.LabelFormat         = "P0";
     series1.Legend              = "Default";
     series1.MarkerSize          = 9;
     series1.Name                = "Default";
     series1.Points.Add(dataPoint1);
     series1.Points.Add(dataPoint2);
     series1.Points.Add(dataPoint3);
     series1.Points.Add(dataPoint4);
     series1.Points.Add(dataPoint5);
     series1.ShadowColor  = System.Drawing.Color.Black;
     series1.ShadowOffset = 1;
     series1.SmartLabelStyle.CalloutStyle = System.Windows.Forms.DataVisualization.Charting.LabelCalloutStyle.Box;
     series2.BorderColor         = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
     series2.ChartArea           = "Default";
     series2.ChartType           = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;
     series2.Font                = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     series2.IsValueShownAsLabel = true;
     series2.LabelFormat         = "P0";
     series2.Legend              = "Default";
     series2.MarkerSize          = 11;
     series2.Name                = "Series2";
     series2.Points.Add(dataPoint6);
     series2.Points.Add(dataPoint7);
     series2.Points.Add(dataPoint8);
     series2.Points.Add(dataPoint9);
     series2.Points.Add(dataPoint10);
     series2.ShadowColor         = System.Drawing.Color.Black;
     series2.ShadowOffset        = 1;
     series3.BorderColor         = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
     series3.ChartArea           = "Default";
     series3.ChartType           = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;
     series3.Font                = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     series3.IsValueShownAsLabel = true;
     series3.LabelFormat         = "P0";
     series3.Legend              = "Default";
     series3.MarkerSize          = 12;
     series3.Name                = "Series3";
     series3.Points.Add(dataPoint11);
     series3.Points.Add(dataPoint12);
     series3.Points.Add(dataPoint13);
     series3.Points.Add(dataPoint14);
     series3.Points.Add(dataPoint15);
     series3.ShadowColor  = System.Drawing.Color.Black;
     series3.ShadowOffset = 1;
     this.chart1.Series.Add(series1);
     this.chart1.Series.Add(series2);
     this.chart1.Series.Add(series3);
     this.chart1.Size     = new System.Drawing.Size(412, 296);
     this.chart1.TabIndex = 0;
     //
     // labelSampleComment
     //
     this.labelSampleComment.Font     = new System.Drawing.Font("Verdana", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.labelSampleComment.Location = new System.Drawing.Point(16, 14);
     this.labelSampleComment.Name     = "labelSampleComment";
     this.labelSampleComment.Size     = new System.Drawing.Size(702, 36);
     this.labelSampleComment.TabIndex = 2;
     this.labelSampleComment.Text     = "This sample demonstrates how to use smart labels in the Annotation object to avoi" +
                                        "d overlapping other chart elements that use smart labels. ";
     this.labelSampleComment.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // panel1
     //
     this.panel1.Controls.Add(this.checkBoxEnable);
     this.panel1.Location = new System.Drawing.Point(432, 68);
     this.panel1.Name     = "panel1";
     this.panel1.Size     = new System.Drawing.Size(292, 288);
     this.panel1.TabIndex = 1;
     //
     // checkBoxEnable
     //
     this.checkBoxEnable.Checked         = true;
     this.checkBoxEnable.CheckState      = System.Windows.Forms.CheckState.Checked;
     this.checkBoxEnable.Location        = new System.Drawing.Point(48, 16);
     this.checkBoxEnable.Name            = "checkBoxEnable";
     this.checkBoxEnable.Size            = new System.Drawing.Size(184, 24);
     this.checkBoxEnable.TabIndex        = 0;
     this.checkBoxEnable.Text            = "&Enable Smart Labels";
     this.checkBoxEnable.CheckedChanged += new System.EventHandler(this.Enable_CheckedChanged);
     //
     // label1
     //
     this.label1.Font      = new System.Drawing.Font("Verdana", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label1.Location  = new System.Drawing.Point(16, 374);
     this.label1.Name      = "label1";
     this.label1.Size      = new System.Drawing.Size(702, 56);
     this.label1.TabIndex  = 3;
     this.label1.Text      = resources.GetString("label1.Text");
     this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // AnnotationSmartLabels
     //
     this.BackColor = System.Drawing.Color.White;
     this.Controls.Add(this.label1);
     this.Controls.Add(this.panel1);
     this.Controls.Add(this.labelSampleComment);
     this.Controls.Add(this.chart1);
     this.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.Name = "AnnotationSmartLabels";
     this.Size = new System.Drawing.Size(728, 480);
     ((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit();
     this.panel1.ResumeLayout(false);
     this.ResumeLayout(false);
 }
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.Windows.Forms.DataVisualization.Charting.CalloutAnnotation calloutAnnotation2 = new System.Windows.Forms.DataVisualization.Charting.CalloutAnnotation();
     System.Windows.Forms.DataVisualization.Charting.ChartArea         chartArea2         = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
     System.Windows.Forms.DataVisualization.Charting.Legend            legend2            = new System.Windows.Forms.DataVisualization.Charting.Legend();
     System.Windows.Forms.DataVisualization.Charting.Series            series3            = new System.Windows.Forms.DataVisualization.Charting.Series();
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint11        = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 700);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint12        = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 600);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint13        = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 800);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint14        = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 450);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint15        = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 700);
     System.Windows.Forms.DataVisualization.Charting.Series            series4            = new System.Windows.Forms.DataVisualization.Charting.Series();
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint16        = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 450);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint17        = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 300);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint18        = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 500);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint19        = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 400);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint20        = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 600);
     this.LineColor           = new System.Windows.Forms.ComboBox();
     this.LineDashStyle       = new System.Windows.Forms.ComboBox();
     this.Shadow              = new System.Windows.Forms.ComboBox();
     this.label6              = new System.Windows.Forms.Label();
     this.label7              = new System.Windows.Forms.Label();
     this.label8              = new System.Windows.Forms.Label();
     this.label9              = new System.Windows.Forms.Label();
     this.panel1              = new System.Windows.Forms.Panel();
     this.label2              = new System.Windows.Forms.Label();
     this.label1              = new System.Windows.Forms.Label();
     this.AnnotationBackColor = new System.Windows.Forms.ComboBox();
     this.label3              = new System.Windows.Forms.Label();
     this.FontStyle           = new System.Windows.Forms.ComboBox();
     this.label4              = new System.Windows.Forms.Label();
     this.FontColorCombo      = new System.Windows.Forms.ComboBox();
     this.FontLabel           = new System.Windows.Forms.Label();
     this.FontSize            = new System.Windows.Forms.ComboBox();
     this.FontName            = new System.Windows.Forms.ComboBox();
     this.Chart1              = new System.Windows.Forms.DataVisualization.Charting.Chart();
     this.panel1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.Chart1)).BeginInit();
     this.SuspendLayout();
     //
     // LineColor
     //
     this.LineColor.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.LineColor.Items.AddRange(new object[] {
         "Black",
         "DimGray",
         "Gainsboro",
         "Blue",
         "Red",
         "Magenta",
         "Purple",
         "Orange"
     });
     this.LineColor.Location              = new System.Drawing.Point(168, 40);
     this.LineColor.Name                  = "LineColor";
     this.LineColor.Size                  = new System.Drawing.Size(121, 22);
     this.LineColor.TabIndex              = 3;
     this.LineColor.SelectedIndexChanged += new System.EventHandler(this.LineColor_SelectedIndexChanged);
     //
     // LineDashStyle
     //
     this.LineDashStyle.DropDownStyle         = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.LineDashStyle.Location              = new System.Drawing.Point(168, 8);
     this.LineDashStyle.Name                  = "LineDashStyle";
     this.LineDashStyle.Size                  = new System.Drawing.Size(121, 22);
     this.LineDashStyle.TabIndex              = 1;
     this.LineDashStyle.SelectedIndexChanged += new System.EventHandler(this.LineDashStyle_SelectedIndexChanged);
     //
     // Shadow
     //
     this.Shadow.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.Shadow.Items.AddRange(new object[] {
         "0",
         "1",
         "2",
         "3",
         "4"
     });
     this.Shadow.Location              = new System.Drawing.Point(168, 72);
     this.Shadow.Name                  = "Shadow";
     this.Shadow.Size                  = new System.Drawing.Size(121, 22);
     this.Shadow.TabIndex              = 5;
     this.Shadow.SelectedIndexChanged += new System.EventHandler(this.Shadow_SelectedIndexChanged);
     //
     // label6
     //
     this.label6.Location  = new System.Drawing.Point(-16, 8);
     this.label6.Name      = "label6";
     this.label6.Size      = new System.Drawing.Size(176, 23);
     this.label6.TabIndex  = 0;
     this.label6.Text      = "Line &Style:";
     this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // label7
     //
     this.label7.Location  = new System.Drawing.Point(-16, 40);
     this.label7.Name      = "label7";
     this.label7.Size      = new System.Drawing.Size(176, 23);
     this.label7.TabIndex  = 2;
     this.label7.Text      = "Line &Color:";
     this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     this.label7.Click    += new System.EventHandler(this.label7_Click);
     //
     // label8
     //
     this.label8.Location  = new System.Drawing.Point(-16, 72);
     this.label8.Name      = "label8";
     this.label8.Size      = new System.Drawing.Size(176, 23);
     this.label8.TabIndex  = 4;
     this.label8.Text      = "&Shadow:";
     this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // label9
     //
     this.label9.Font     = new System.Drawing.Font("Verdana", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label9.Location = new System.Drawing.Point(16, 8);
     this.label9.Name     = "label9";
     this.label9.Size     = new System.Drawing.Size(702, 34);
     this.label9.TabIndex = 0;
     this.label9.Text     = "This sample demonstrates how to set the appearance properties of an Annotation ob" +
                            "ject. ";
     this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // panel1
     //
     this.panel1.Controls.Add(this.label2);
     this.panel1.Controls.Add(this.label1);
     this.panel1.Controls.Add(this.AnnotationBackColor);
     this.panel1.Controls.Add(this.label3);
     this.panel1.Controls.Add(this.FontStyle);
     this.panel1.Controls.Add(this.label4);
     this.panel1.Controls.Add(this.FontColorCombo);
     this.panel1.Controls.Add(this.FontLabel);
     this.panel1.Controls.Add(this.FontSize);
     this.panel1.Controls.Add(this.FontName);
     this.panel1.Controls.Add(this.LineDashStyle);
     this.panel1.Controls.Add(this.label6);
     this.panel1.Controls.Add(this.label7);
     this.panel1.Controls.Add(this.label8);
     this.panel1.Controls.Add(this.Shadow);
     this.panel1.Controls.Add(this.LineColor);
     this.panel1.Location = new System.Drawing.Point(432, 56);
     this.panel1.Name     = "panel1";
     this.panel1.Size     = new System.Drawing.Size(292, 288);
     this.panel1.TabIndex = 2;
     //
     // label2
     //
     this.label2.Location  = new System.Drawing.Point(24, 136);
     this.label2.Name      = "label2";
     this.label2.Size      = new System.Drawing.Size(136, 23);
     this.label2.TabIndex  = 8;
     this.label2.Text      = "F&ont Size:";
     this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // label1
     //
     this.label1.Location  = new System.Drawing.Point(-16, 232);
     this.label1.Name      = "label1";
     this.label1.Size      = new System.Drawing.Size(176, 23);
     this.label1.TabIndex  = 14;
     this.label1.Text      = "&Back Color:";
     this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // AnnotationBackColor
     //
     this.AnnotationBackColor.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.AnnotationBackColor.Items.AddRange(new object[] {
         "LightYellow",
         "White",
         "Yellow",
         "Gainsboro",
         "Silver",
         "BurlyWood"
     });
     this.AnnotationBackColor.Location              = new System.Drawing.Point(168, 232);
     this.AnnotationBackColor.Name                  = "AnnotationBackColor";
     this.AnnotationBackColor.Size                  = new System.Drawing.Size(121, 22);
     this.AnnotationBackColor.TabIndex              = 15;
     this.AnnotationBackColor.SelectedIndexChanged += new System.EventHandler(this.BackColor_SelectedIndexChanged);
     //
     // label3
     //
     this.label3.Location  = new System.Drawing.Point(-16, 200);
     this.label3.Name      = "label3";
     this.label3.Size      = new System.Drawing.Size(176, 23);
     this.label3.TabIndex  = 12;
     this.label3.Text      = "Font St&yle:";
     this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // FontStyle
     //
     this.FontStyle.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.FontStyle.Items.AddRange(new object[] {
         "Default",
         "Shadow",
         "Emboss",
         "Embed",
         "Frame"
     });
     this.FontStyle.Location              = new System.Drawing.Point(168, 200);
     this.FontStyle.Name                  = "FontStyle";
     this.FontStyle.Size                  = new System.Drawing.Size(121, 22);
     this.FontStyle.TabIndex              = 13;
     this.FontStyle.SelectedIndexChanged += new System.EventHandler(this.FontStyle_SelectedIndexChanged);
     //
     // label4
     //
     this.label4.Location  = new System.Drawing.Point(-16, 168);
     this.label4.Name      = "label4";
     this.label4.Size      = new System.Drawing.Size(176, 23);
     this.label4.TabIndex  = 10;
     this.label4.Text      = "Fo&nt Color:";
     this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // FontColorCombo
     //
     this.FontColorCombo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.FontColorCombo.Items.AddRange(new object[] {
         "Black",
         "DimGray",
         "Gainsboro",
         "Blue",
         "Red",
         "Magenta",
         "Purple",
         "Orange"
     });
     this.FontColorCombo.Location              = new System.Drawing.Point(168, 168);
     this.FontColorCombo.Name                  = "FontColorCombo";
     this.FontColorCombo.Size                  = new System.Drawing.Size(121, 22);
     this.FontColorCombo.TabIndex              = 11;
     this.FontColorCombo.SelectedIndexChanged += new System.EventHandler(this.FontColorCombo_SelectedIndexChanged);
     //
     // FontLabel
     //
     this.FontLabel.Location  = new System.Drawing.Point(-16, 104);
     this.FontLabel.Name      = "FontLabel";
     this.FontLabel.Size      = new System.Drawing.Size(176, 23);
     this.FontLabel.TabIndex  = 6;
     this.FontLabel.Text      = "&Font:";
     this.FontLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // FontSize
     //
     this.FontSize.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.FontSize.Items.AddRange(new object[] {
         "8",
         "10",
         "12",
         "14"
     });
     this.FontSize.Location              = new System.Drawing.Point(168, 136);
     this.FontSize.Name                  = "FontSize";
     this.FontSize.Size                  = new System.Drawing.Size(56, 22);
     this.FontSize.TabIndex              = 9;
     this.FontSize.SelectedIndexChanged += new System.EventHandler(this.FontSize_SelectedIndexChanged);
     //
     // FontName
     //
     this.FontName.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.FontName.Items.AddRange(new object[] {
         "Microsoft Sans Serif",
         "Arial",
         "Times New Roman",
         "Tahoma"
     });
     this.FontName.Location              = new System.Drawing.Point(168, 104);
     this.FontName.Name                  = "FontName";
     this.FontName.Size                  = new System.Drawing.Size(121, 22);
     this.FontName.TabIndex              = 7;
     this.FontName.SelectedIndexChanged += new System.EventHandler(this.FontName_SelectedIndexChanged);
     //
     // Chart1
     //
     calloutAnnotation2.AnchorDataPointName = "Default\\r0";
     calloutAnnotation2.AnchorOffsetX       = 5;
     calloutAnnotation2.AnchorOffsetY       = 7;
     calloutAnnotation2.CalloutStyle        = System.Windows.Forms.DataVisualization.Charting.CalloutStyle.Cloud;
     calloutAnnotation2.Name = "CloudAnnotation";
     calloutAnnotation2.Text = "Set my Appearance";
     this.Chart1.Annotations.Add(calloutAnnotation2);
     this.Chart1.BackColor                   = System.Drawing.Color.FromArgb(((int)(((byte)(211)))), ((int)(((byte)(223)))), ((int)(((byte)(240)))));
     this.Chart1.BackGradientStyle           = System.Windows.Forms.DataVisualization.Charting.GradientStyle.TopBottom;
     this.Chart1.BorderlineColor             = System.Drawing.Color.FromArgb(((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
     this.Chart1.BorderlineDashStyle         = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.Solid;
     this.Chart1.BorderlineWidth             = 2;
     this.Chart1.BorderSkin.SkinStyle        = System.Windows.Forms.DataVisualization.Charting.BorderSkinStyle.Emboss;
     chartArea2.Area3DStyle.Enable3D         = true;
     chartArea2.Area3DStyle.Inclination      = 15;
     chartArea2.Area3DStyle.IsClustered      = true;
     chartArea2.Area3DStyle.IsRightAngleAxes = false;
     chartArea2.Area3DStyle.Perspective      = 10;
     chartArea2.Area3DStyle.Rotation         = 10;
     chartArea2.Area3DStyle.WallWidth        = 0;
     chartArea2.AxisX.LabelStyle.Font        = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
     chartArea2.AxisX.LineColor              = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea2.AxisX.MajorGrid.Enabled      = false;
     chartArea2.AxisX.MajorGrid.LineColor    = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea2.AxisX2.Enabled               = System.Windows.Forms.DataVisualization.Charting.AxisEnabled.False;
     chartArea2.AxisY.LabelStyle.Font        = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
     chartArea2.AxisY.LineColor              = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea2.AxisY.MajorGrid.Enabled      = false;
     chartArea2.AxisY.MajorGrid.LineColor    = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea2.AxisY2.Enabled               = System.Windows.Forms.DataVisualization.Charting.AxisEnabled.False;
     chartArea2.AxisY2.MajorGrid.Enabled     = false;
     chartArea2.BackColor          = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(165)))), ((int)(((byte)(191)))), ((int)(((byte)(228)))));
     chartArea2.BackGradientStyle  = System.Windows.Forms.DataVisualization.Charting.GradientStyle.TopBottom;
     chartArea2.BackSecondaryColor = System.Drawing.Color.Transparent;
     chartArea2.BorderColor        = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea2.Name        = "Default";
     chartArea2.ShadowColor = System.Drawing.Color.Transparent;
     this.Chart1.ChartAreas.Add(chartArea2);
     legend2.BackColor     = System.Drawing.Color.Transparent;
     legend2.Enabled       = false;
     legend2.Font          = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
     legend2.IsTextAutoFit = false;
     legend2.Name          = "Default";
     this.Chart1.Legends.Add(legend2);
     this.Chart1.Location = new System.Drawing.Point(16, 48);
     this.Chart1.Name     = "Chart1";
     series3.BorderColor  = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
     series3.ChartArea    = "Default";
     series3.Color        = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(65)))), ((int)(((byte)(140)))), ((int)(((byte)(240)))));
     series3.Legend       = "Default";
     series3.Name         = "Default";
     series3.Points.Add(dataPoint11);
     series3.Points.Add(dataPoint12);
     series3.Points.Add(dataPoint13);
     series3.Points.Add(dataPoint14);
     series3.Points.Add(dataPoint15);
     series4.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
     series4.ChartArea   = "Default";
     series4.Color       = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(252)))), ((int)(((byte)(180)))), ((int)(((byte)(65)))));
     series4.Legend      = "Default";
     series4.Name        = "Series2";
     series4.Points.Add(dataPoint16);
     series4.Points.Add(dataPoint17);
     series4.Points.Add(dataPoint18);
     series4.Points.Add(dataPoint19);
     series4.Points.Add(dataPoint20);
     this.Chart1.Series.Add(series3);
     this.Chart1.Series.Add(series4);
     this.Chart1.Size     = new System.Drawing.Size(412, 296);
     this.Chart1.TabIndex = 1;
     //
     // AnnotationAppearance
     //
     this.BackColor = System.Drawing.Color.White;
     this.Controls.Add(this.Chart1);
     this.Controls.Add(this.panel1);
     this.Controls.Add(this.label9);
     this.Font  = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.Name  = "AnnotationAppearance";
     this.Size  = new System.Drawing.Size(728, 480);
     this.Load += new System.EventHandler(this.AnnotationAppearance_Load);
     this.panel1.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.Chart1)).EndInit();
     this.ResumeLayout(false);
 }
コード例 #12
0
        /// <summary>
        /// Initialises the chart
        /// </summary>
        private void InitChart()
        {
            _mainChartArea.AxisX.ScaleView.Zoomable = true;
            _mainChartArea.AxisY.ScaleView.Zoomable = true;
            _mainChartArea.CursorX.AutoScroll = true;
            _mainChartArea.CursorY.AutoScroll = true;
            //_mainChartArea.AxisY2.Enabled = AxisEnabled.True;

            _priceAnnotation = new RectangleAnnotation();
            _priceAnnotation.ForeColor = Color.Black;
            _priceAnnotation.Font = new Font("Arial", 9); ;
            _priceAnnotation.LineWidth = 1;
            _priceAnnotation.BackColor = Color.LemonChiffon;

            chartCtrl.Annotations.Add(_priceAnnotation);

            _maxPriceAnnotation = new CalloutAnnotation();
            _maxPriceAnnotation.ForeColor = Color.Black;
            _maxPriceAnnotation.Font = new Font("Arial", 9); ;
            _maxPriceAnnotation.LineWidth = 1;
            _maxPriceAnnotation.CalloutStyle = CalloutStyle.SimpleLine;
            _maxPriceAnnotation.AnchorAlignment = ContentAlignment.BottomRight;
            chartCtrl.Annotations.Add(_maxPriceAnnotation);

            _minPriceAnnotation = new CalloutAnnotation();
            _minPriceAnnotation.ForeColor = Color.Black;
            _minPriceAnnotation.Font = new Font("Arial", 9); ;
            _minPriceAnnotation.LineWidth = 1;
            _minPriceAnnotation.CalloutStyle = CalloutStyle.SimpleLine;
            _minPriceAnnotation.AnchorAlignment = ContentAlignment.MiddleRight;
            _minPriceAnnotation.AxisX = _mainChartArea.AxisX;
            _minPriceAnnotation.AxisY = _mainChartArea.AxisY;

            chartCtrl.Annotations.Add(_minPriceAnnotation);

            _currentPriceAnnotation = new ArrowAnnotation();
            _currentPriceAnnotation.ForeColor = Color.Black;
            _currentPriceAnnotation.Font = new Font("Arial", 9);
            _currentPriceAnnotation.LineWidth = 1;
            _currentPriceAnnotation.Width = 1;
            _currentPriceAnnotation.Height = 1;
            _currentPriceAnnotation.ArrowSize = 1;
            _currentPriceAnnotation.AxisX = _mainChartArea.AxisX;
            _currentPriceAnnotation.AxisY = _mainChartArea.AxisY;
            _currentPriceAnnotation.ArrowSize = 3;
            _currentPriceAnnotation.Height = 0;
            _currentPriceAnnotation.AnchorAlignment = ContentAlignment.MiddleLeft;
            //_currentPriceAnnotation.AnchorAlignment = ContentAlignment.MiddleRight;

            chartCtrl.Annotations.Add(_currentPriceAnnotation);

            // _mainChartArea.BackSecondaryColor = _mainChartArea.BackColor = Color.Black;
            chartCtrl.Series[Constants.PriceSerieName]["PriceUpColorUp"] = "Green";
        }
コード例 #13
0
 /// <summary> 
 /// Required method for Designer support - do not modify 
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.Windows.Forms.DataVisualization.Charting.CalloutAnnotation calloutAnnotation2 = new System.Windows.Forms.DataVisualization.Charting.CalloutAnnotation();
     System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea2 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
     System.Windows.Forms.DataVisualization.Charting.Legend legend2 = new System.Windows.Forms.DataVisualization.Charting.Legend();
     System.Windows.Forms.DataVisualization.Charting.Series series3 = new System.Windows.Forms.DataVisualization.Charting.Series();
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint11 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 700);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint12 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 600);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint13 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 800);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint14 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 450);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint15 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 700);
     System.Windows.Forms.DataVisualization.Charting.Series series4 = new System.Windows.Forms.DataVisualization.Charting.Series();
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint16 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 450);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint17 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 300);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint18 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 500);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint19 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 400);
     System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint20 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0, 600);
     this.LineColor = new System.Windows.Forms.ComboBox();
     this.LineDashStyle = new System.Windows.Forms.ComboBox();
     this.Shadow = new System.Windows.Forms.ComboBox();
     this.label6 = new System.Windows.Forms.Label();
     this.label7 = new System.Windows.Forms.Label();
     this.label8 = new System.Windows.Forms.Label();
     this.label9 = new System.Windows.Forms.Label();
     this.panel1 = new System.Windows.Forms.Panel();
     this.label2 = new System.Windows.Forms.Label();
     this.label1 = new System.Windows.Forms.Label();
     this.AnnotationBackColor = new System.Windows.Forms.ComboBox();
     this.label3 = new System.Windows.Forms.Label();
     this.FontStyle = new System.Windows.Forms.ComboBox();
     this.label4 = new System.Windows.Forms.Label();
     this.FontColorCombo = new System.Windows.Forms.ComboBox();
     this.FontLabel = new System.Windows.Forms.Label();
     this.FontSize = new System.Windows.Forms.ComboBox();
     this.FontName = new System.Windows.Forms.ComboBox();
     this.Chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart();
     this.panel1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.Chart1)).BeginInit();
     this.SuspendLayout();
     //
     // LineColor
     //
     this.LineColor.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.LineColor.Items.AddRange(new object[] {
     "Black",
     "DimGray",
     "Gainsboro",
     "Blue",
     "Red",
     "Magenta",
     "Purple",
     "Orange"});
     this.LineColor.Location = new System.Drawing.Point(168, 40);
     this.LineColor.Name = "LineColor";
     this.LineColor.Size = new System.Drawing.Size(121, 22);
     this.LineColor.TabIndex = 3;
     this.LineColor.SelectedIndexChanged += new System.EventHandler(this.LineColor_SelectedIndexChanged);
     //
     // LineDashStyle
     //
     this.LineDashStyle.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.LineDashStyle.Location = new System.Drawing.Point(168, 8);
     this.LineDashStyle.Name = "LineDashStyle";
     this.LineDashStyle.Size = new System.Drawing.Size(121, 22);
     this.LineDashStyle.TabIndex = 1;
     this.LineDashStyle.SelectedIndexChanged += new System.EventHandler(this.LineDashStyle_SelectedIndexChanged);
     //
     // Shadow
     //
     this.Shadow.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.Shadow.Items.AddRange(new object[] {
     "0",
     "1",
     "2",
     "3",
     "4"});
     this.Shadow.Location = new System.Drawing.Point(168, 72);
     this.Shadow.Name = "Shadow";
     this.Shadow.Size = new System.Drawing.Size(121, 22);
     this.Shadow.TabIndex = 5;
     this.Shadow.SelectedIndexChanged += new System.EventHandler(this.Shadow_SelectedIndexChanged);
     //
     // label6
     //
     this.label6.Location = new System.Drawing.Point(-16, 8);
     this.label6.Name = "label6";
     this.label6.Size = new System.Drawing.Size(176, 23);
     this.label6.TabIndex = 0;
     this.label6.Text = "Line &Style:";
     this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // label7
     //
     this.label7.Location = new System.Drawing.Point(-16, 40);
     this.label7.Name = "label7";
     this.label7.Size = new System.Drawing.Size(176, 23);
     this.label7.TabIndex = 2;
     this.label7.Text = "Line &Color:";
     this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     this.label7.Click += new System.EventHandler(this.label7_Click);
     //
     // label8
     //
     this.label8.Location = new System.Drawing.Point(-16, 72);
     this.label8.Name = "label8";
     this.label8.Size = new System.Drawing.Size(176, 23);
     this.label8.TabIndex = 4;
     this.label8.Text = "&Shadow:";
     this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // label9
     //
     this.label9.Font = new System.Drawing.Font("Verdana", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label9.Location = new System.Drawing.Point(16, 8);
     this.label9.Name = "label9";
     this.label9.Size = new System.Drawing.Size(702, 34);
     this.label9.TabIndex = 0;
     this.label9.Text = "This sample demonstrates how to set the appearance properties of an Annotation ob" +
         "ject. ";
     this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // panel1
     //
     this.panel1.Controls.Add(this.label2);
     this.panel1.Controls.Add(this.label1);
     this.panel1.Controls.Add(this.AnnotationBackColor);
     this.panel1.Controls.Add(this.label3);
     this.panel1.Controls.Add(this.FontStyle);
     this.panel1.Controls.Add(this.label4);
     this.panel1.Controls.Add(this.FontColorCombo);
     this.panel1.Controls.Add(this.FontLabel);
     this.panel1.Controls.Add(this.FontSize);
     this.panel1.Controls.Add(this.FontName);
     this.panel1.Controls.Add(this.LineDashStyle);
     this.panel1.Controls.Add(this.label6);
     this.panel1.Controls.Add(this.label7);
     this.panel1.Controls.Add(this.label8);
     this.panel1.Controls.Add(this.Shadow);
     this.panel1.Controls.Add(this.LineColor);
     this.panel1.Location = new System.Drawing.Point(432, 56);
     this.panel1.Name = "panel1";
     this.panel1.Size = new System.Drawing.Size(292, 288);
     this.panel1.TabIndex = 2;
     //
     // label2
     //
     this.label2.Location = new System.Drawing.Point(24, 136);
     this.label2.Name = "label2";
     this.label2.Size = new System.Drawing.Size(136, 23);
     this.label2.TabIndex = 8;
     this.label2.Text = "F&ont Size:";
     this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // label1
     //
     this.label1.Location = new System.Drawing.Point(-16, 232);
     this.label1.Name = "label1";
     this.label1.Size = new System.Drawing.Size(176, 23);
     this.label1.TabIndex = 14;
     this.label1.Text = "&Back Color:";
     this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // AnnotationBackColor
     //
     this.AnnotationBackColor.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.AnnotationBackColor.Items.AddRange(new object[] {
     "LightYellow",
     "White",
     "Yellow",
     "Gainsboro",
     "Silver",
     "BurlyWood"});
     this.AnnotationBackColor.Location = new System.Drawing.Point(168, 232);
     this.AnnotationBackColor.Name = "AnnotationBackColor";
     this.AnnotationBackColor.Size = new System.Drawing.Size(121, 22);
     this.AnnotationBackColor.TabIndex = 15;
     this.AnnotationBackColor.SelectedIndexChanged += new System.EventHandler(this.BackColor_SelectedIndexChanged);
     //
     // label3
     //
     this.label3.Location = new System.Drawing.Point(-16, 200);
     this.label3.Name = "label3";
     this.label3.Size = new System.Drawing.Size(176, 23);
     this.label3.TabIndex = 12;
     this.label3.Text = "Font St&yle:";
     this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // FontStyle
     //
     this.FontStyle.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.FontStyle.Items.AddRange(new object[] {
     "Default",
     "Shadow",
     "Emboss",
     "Embed",
     "Frame"});
     this.FontStyle.Location = new System.Drawing.Point(168, 200);
     this.FontStyle.Name = "FontStyle";
     this.FontStyle.Size = new System.Drawing.Size(121, 22);
     this.FontStyle.TabIndex = 13;
     this.FontStyle.SelectedIndexChanged += new System.EventHandler(this.FontStyle_SelectedIndexChanged);
     //
     // label4
     //
     this.label4.Location = new System.Drawing.Point(-16, 168);
     this.label4.Name = "label4";
     this.label4.Size = new System.Drawing.Size(176, 23);
     this.label4.TabIndex = 10;
     this.label4.Text = "Fo&nt Color:";
     this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // FontColorCombo
     //
     this.FontColorCombo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.FontColorCombo.Items.AddRange(new object[] {
     "Black",
     "DimGray",
     "Gainsboro",
     "Blue",
     "Red",
     "Magenta",
     "Purple",
     "Orange"});
     this.FontColorCombo.Location = new System.Drawing.Point(168, 168);
     this.FontColorCombo.Name = "FontColorCombo";
     this.FontColorCombo.Size = new System.Drawing.Size(121, 22);
     this.FontColorCombo.TabIndex = 11;
     this.FontColorCombo.SelectedIndexChanged += new System.EventHandler(this.FontColorCombo_SelectedIndexChanged);
     //
     // FontLabel
     //
     this.FontLabel.Location = new System.Drawing.Point(-16, 104);
     this.FontLabel.Name = "FontLabel";
     this.FontLabel.Size = new System.Drawing.Size(176, 23);
     this.FontLabel.TabIndex = 6;
     this.FontLabel.Text = "&Font:";
     this.FontLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // FontSize
     //
     this.FontSize.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.FontSize.Items.AddRange(new object[] {
     "8",
     "10",
     "12",
     "14"});
     this.FontSize.Location = new System.Drawing.Point(168, 136);
     this.FontSize.Name = "FontSize";
     this.FontSize.Size = new System.Drawing.Size(56, 22);
     this.FontSize.TabIndex = 9;
     this.FontSize.SelectedIndexChanged += new System.EventHandler(this.FontSize_SelectedIndexChanged);
     //
     // FontName
     //
     this.FontName.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.FontName.Items.AddRange(new object[] {
     "Microsoft Sans Serif",
     "Arial",
     "Times New Roman",
     "Tahoma"});
     this.FontName.Location = new System.Drawing.Point(168, 104);
     this.FontName.Name = "FontName";
     this.FontName.Size = new System.Drawing.Size(121, 22);
     this.FontName.TabIndex = 7;
     this.FontName.SelectedIndexChanged += new System.EventHandler(this.FontName_SelectedIndexChanged);
     //
     // Chart1
     //
     calloutAnnotation2.AnchorDataPointName = "Default\\r0";
     calloutAnnotation2.AnchorOffsetX = 5;
     calloutAnnotation2.AnchorOffsetY = 7;
     calloutAnnotation2.CalloutStyle = System.Windows.Forms.DataVisualization.Charting.CalloutStyle.Cloud;
     calloutAnnotation2.Name = "CloudAnnotation";
     calloutAnnotation2.Text = "Set my Appearance";
     this.Chart1.Annotations.Add(calloutAnnotation2);
     this.Chart1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(211)))), ((int)(((byte)(223)))), ((int)(((byte)(240)))));
     this.Chart1.BackGradientStyle = System.Windows.Forms.DataVisualization.Charting.GradientStyle.TopBottom;
     this.Chart1.BorderlineColor = System.Drawing.Color.FromArgb(((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
     this.Chart1.BorderlineDashStyle = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.Solid;
     this.Chart1.BorderlineWidth = 2;
     this.Chart1.BorderSkin.SkinStyle = System.Windows.Forms.DataVisualization.Charting.BorderSkinStyle.Emboss;
     chartArea2.Area3DStyle.Enable3D = true;
     chartArea2.Area3DStyle.Inclination = 15;
     chartArea2.Area3DStyle.IsClustered = true;
     chartArea2.Area3DStyle.IsRightAngleAxes = false;
     chartArea2.Area3DStyle.Perspective = 10;
     chartArea2.Area3DStyle.Rotation = 10;
     chartArea2.Area3DStyle.WallWidth = 0;
     chartArea2.AxisX.LabelStyle.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
     chartArea2.AxisX.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea2.AxisX.MajorGrid.Enabled = false;
     chartArea2.AxisX.MajorGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea2.AxisX2.Enabled = System.Windows.Forms.DataVisualization.Charting.AxisEnabled.False;
     chartArea2.AxisY.LabelStyle.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
     chartArea2.AxisY.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea2.AxisY.MajorGrid.Enabled = false;
     chartArea2.AxisY.MajorGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea2.AxisY2.Enabled = System.Windows.Forms.DataVisualization.Charting.AxisEnabled.False;
     chartArea2.AxisY2.MajorGrid.Enabled = false;
     chartArea2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(165)))), ((int)(((byte)(191)))), ((int)(((byte)(228)))));
     chartArea2.BackGradientStyle = System.Windows.Forms.DataVisualization.Charting.GradientStyle.TopBottom;
     chartArea2.BackSecondaryColor = System.Drawing.Color.Transparent;
     chartArea2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea2.Name = "Default";
     chartArea2.ShadowColor = System.Drawing.Color.Transparent;
     this.Chart1.ChartAreas.Add(chartArea2);
     legend2.BackColor = System.Drawing.Color.Transparent;
     legend2.Enabled = false;
     legend2.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
     legend2.IsTextAutoFit = false;
     legend2.Name = "Default";
     this.Chart1.Legends.Add(legend2);
     this.Chart1.Location = new System.Drawing.Point(16, 48);
     this.Chart1.Name = "Chart1";
     series3.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
     series3.ChartArea = "Default";
     series3.Color = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(65)))), ((int)(((byte)(140)))), ((int)(((byte)(240)))));
     series3.Legend = "Default";
     series3.Name = "Default";
     series3.Points.Add(dataPoint11);
     series3.Points.Add(dataPoint12);
     series3.Points.Add(dataPoint13);
     series3.Points.Add(dataPoint14);
     series3.Points.Add(dataPoint15);
     series4.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
     series4.ChartArea = "Default";
     series4.Color = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(252)))), ((int)(((byte)(180)))), ((int)(((byte)(65)))));
     series4.Legend = "Default";
     series4.Name = "Series2";
     series4.Points.Add(dataPoint16);
     series4.Points.Add(dataPoint17);
     series4.Points.Add(dataPoint18);
     series4.Points.Add(dataPoint19);
     series4.Points.Add(dataPoint20);
     this.Chart1.Series.Add(series3);
     this.Chart1.Series.Add(series4);
     this.Chart1.Size = new System.Drawing.Size(412, 296);
     this.Chart1.TabIndex = 1;
     //
     // AnnotationAppearance
     //
     this.BackColor = System.Drawing.Color.White;
     this.Controls.Add(this.Chart1);
     this.Controls.Add(this.panel1);
     this.Controls.Add(this.label9);
     this.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.Name = "AnnotationAppearance";
     this.Size = new System.Drawing.Size(728, 480);
     this.Load += new System.EventHandler(this.AnnotationAppearance_Load);
     this.panel1.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.Chart1)).EndInit();
     this.ResumeLayout(false);
 }
コード例 #14
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.Windows.Forms.DataVisualization.Charting.CalloutAnnotation calloutAnnotation1 = new System.Windows.Forms.DataVisualization.Charting.CalloutAnnotation();
     System.Windows.Forms.DataVisualization.Charting.ChartArea         chartArea1         = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
     System.Windows.Forms.DataVisualization.Charting.Legend            legend1            = new System.Windows.Forms.DataVisualization.Charting.Legend();
     System.Windows.Forms.DataVisualization.Charting.Series            series1            = new System.Windows.Forms.DataVisualization.Charting.Series();
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint1         = new System.Windows.Forms.DataVisualization.Charting.DataPoint(1, 700);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint2         = new System.Windows.Forms.DataVisualization.Charting.DataPoint(2, 400);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint3         = new System.Windows.Forms.DataVisualization.Charting.DataPoint(3, 200);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint4         = new System.Windows.Forms.DataVisualization.Charting.DataPoint(4, 450);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint5         = new System.Windows.Forms.DataVisualization.Charting.DataPoint(5, 300);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint6         = new System.Windows.Forms.DataVisualization.Charting.DataPoint(6, 756);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint7         = new System.Windows.Forms.DataVisualization.Charting.DataPoint(7, 398);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint8         = new System.Windows.Forms.DataVisualization.Charting.DataPoint(8, 467);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint9         = new System.Windows.Forms.DataVisualization.Charting.DataPoint(9, 612);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint10        = new System.Windows.Forms.DataVisualization.Charting.DataPoint(10, 356);
     System.Windows.Forms.DataVisualization.Charting.DataPoint         dataPoint11        = new System.Windows.Forms.DataVisualization.Charting.DataPoint(11, 678);
     System.Windows.Forms.DataVisualization.Charting.Title             title1             = new System.Windows.Forms.DataVisualization.Charting.Title();
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AnnotationPositionChanging));
     this.label9          = new System.Windows.Forms.Label();
     this.panel1          = new System.Windows.Forms.Panel();
     this.AnchorY         = new System.Windows.Forms.Label();
     this.AnchorX         = new System.Windows.Forms.Label();
     this.label1          = new System.Windows.Forms.Label();
     this.AnchorXLocation = new System.Windows.Forms.Label();
     this.ResetPosition   = new System.Windows.Forms.Button();
     this.SnapToDataPoint = new System.Windows.Forms.CheckBox();
     this.Chart1          = new System.Windows.Forms.DataVisualization.Charting.Chart();
     this.label2          = new System.Windows.Forms.Label();
     this.panel1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.Chart1)).BeginInit();
     this.SuspendLayout();
     //
     // label9
     //
     this.label9.Font      = new System.Drawing.Font("Verdana", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label9.Location  = new System.Drawing.Point(16, 8);
     this.label9.Name      = "label9";
     this.label9.Size      = new System.Drawing.Size(702, 34);
     this.label9.TabIndex  = 1;
     this.label9.Text      = "This sample demonstrates the AnnotationPositionChanging event. ";
     this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // panel1
     //
     this.panel1.Controls.Add(this.AnchorY);
     this.panel1.Controls.Add(this.AnchorX);
     this.panel1.Controls.Add(this.label1);
     this.panel1.Controls.Add(this.AnchorXLocation);
     this.panel1.Controls.Add(this.ResetPosition);
     this.panel1.Controls.Add(this.SnapToDataPoint);
     this.panel1.Location = new System.Drawing.Point(432, 56);
     this.panel1.Name     = "panel1";
     this.panel1.Size     = new System.Drawing.Size(292, 288);
     this.panel1.TabIndex = 19;
     //
     // AnchorY
     //
     this.AnchorY.ForeColor = System.Drawing.Color.Red;
     this.AnchorY.Location  = new System.Drawing.Point(168, 80);
     this.AnchorY.Name      = "AnchorY";
     this.AnchorY.Size      = new System.Drawing.Size(72, 23);
     this.AnchorY.TabIndex  = 8;
     this.AnchorY.Text      = "label4";
     this.AnchorY.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // AnchorX
     //
     this.AnchorX.ForeColor = System.Drawing.Color.Red;
     this.AnchorX.Location  = new System.Drawing.Point(168, 48);
     this.AnchorX.Name      = "AnchorX";
     this.AnchorX.Size      = new System.Drawing.Size(72, 23);
     this.AnchorX.TabIndex  = 7;
     this.AnchorX.Text      = "label4";
     this.AnchorX.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // label1
     //
     this.label1.Location  = new System.Drawing.Point(24, 80);
     this.label1.Name      = "label1";
     this.label1.Size      = new System.Drawing.Size(136, 23);
     this.label1.TabIndex  = 4;
     this.label1.Text      = "Anchor Position Y:";
     this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // AnchorXLocation
     //
     this.AnchorXLocation.Location  = new System.Drawing.Point(16, 48);
     this.AnchorXLocation.Name      = "AnchorXLocation";
     this.AnchorXLocation.Size      = new System.Drawing.Size(144, 23);
     this.AnchorXLocation.TabIndex  = 3;
     this.AnchorXLocation.Text      = "Anchor Position X:";
     this.AnchorXLocation.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // ResetPosition
     //
     this.ResetPosition.BackColor = System.Drawing.SystemColors.Control;
     this.ResetPosition.Location  = new System.Drawing.Point(64, 120);
     this.ResetPosition.Name      = "ResetPosition";
     this.ResetPosition.Size      = new System.Drawing.Size(136, 23);
     this.ResetPosition.TabIndex  = 2;
     this.ResetPosition.Text      = "&Reset Position";
     this.ResetPosition.UseVisualStyleBackColor = false;
     this.ResetPosition.Click += new System.EventHandler(this.ResetPosition_Click);
     //
     // SnapToDataPoint
     //
     this.SnapToDataPoint.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
     this.SnapToDataPoint.Checked    = true;
     this.SnapToDataPoint.CheckState = System.Windows.Forms.CheckState.Checked;
     this.SnapToDataPoint.Location   = new System.Drawing.Point(11, 16);
     this.SnapToDataPoint.Name       = "SnapToDataPoint";
     this.SnapToDataPoint.Size       = new System.Drawing.Size(168, 24);
     this.SnapToDataPoint.TabIndex   = 0;
     this.SnapToDataPoint.Text       = "&Snap to DataPoint";
     this.SnapToDataPoint.TextAlign  = System.Drawing.ContentAlignment.MiddleRight;
     //
     // Chart1
     //
     calloutAnnotation1.AllowAnchorMoving   = true;
     calloutAnnotation1.AllowSelecting      = true;
     calloutAnnotation1.AnchorDataPointName = "Default\\r2";
     calloutAnnotation1.BackColor           = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(240)))));
     calloutAnnotation1.Font    = new System.Drawing.Font("Trebuchet MS", 9F);
     calloutAnnotation1.Name    = "Callout1";
     calloutAnnotation1.Text    = "Select this Annotation Object\\nand move the Anchor point";
     calloutAnnotation1.ToolTip = "Don\'t forget to move the anchor point";
     this.Chart1.Annotations.Add(calloutAnnotation1);
     this.Chart1.BackColor                   = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(223)))), ((int)(((byte)(193)))));
     this.Chart1.BackGradientStyle           = System.Windows.Forms.DataVisualization.Charting.GradientStyle.TopBottom;
     this.Chart1.BorderlineColor             = System.Drawing.Color.FromArgb(((int)(((byte)(181)))), ((int)(((byte)(64)))), ((int)(((byte)(1)))));
     this.Chart1.BorderlineDashStyle         = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.Solid;
     this.Chart1.BorderlineWidth             = 2;
     this.Chart1.BorderSkin.SkinStyle        = System.Windows.Forms.DataVisualization.Charting.BorderSkinStyle.Emboss;
     chartArea1.Area3DStyle.Inclination      = 15;
     chartArea1.Area3DStyle.IsClustered      = true;
     chartArea1.Area3DStyle.IsRightAngleAxes = false;
     chartArea1.Area3DStyle.Perspective      = 10;
     chartArea1.Area3DStyle.Rotation         = 10;
     chartArea1.Area3DStyle.WallWidth        = 0;
     chartArea1.AxisX.IsLabelAutoFit         = false;
     chartArea1.AxisX.LabelAutoFitStyle      = ((System.Windows.Forms.DataVisualization.Charting.LabelAutoFitStyles)(((System.Windows.Forms.DataVisualization.Charting.LabelAutoFitStyles.IncreaseFont | System.Windows.Forms.DataVisualization.Charting.LabelAutoFitStyles.DecreaseFont)
                                                                                                                      | System.Windows.Forms.DataVisualization.Charting.LabelAutoFitStyles.WordWrap)));
     chartArea1.AxisX.LabelStyle.Font = new System.Drawing.Font("Trebuchet MS", 10F, System.Drawing.FontStyle.Bold);
     chartArea1.AxisX.LabelStyle.IsEndLabelVisible = false;
     chartArea1.AxisX.LineColor           = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.AxisX.MajorGrid.Enabled   = false;
     chartArea1.AxisX.MajorGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.AxisX2.Enabled            = System.Windows.Forms.DataVisualization.Charting.AxisEnabled.False;
     chartArea1.AxisY.LabelStyle.Font     = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
     chartArea1.AxisY.LineColor           = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.AxisY.MajorGrid.Enabled   = false;
     chartArea1.AxisY.MajorGrid.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.AxisY2.MajorGrid.Enabled  = false;
     chartArea1.BackColor                = System.Drawing.Color.OldLace;
     chartArea1.BackGradientStyle        = System.Windows.Forms.DataVisualization.Charting.GradientStyle.TopBottom;
     chartArea1.BackSecondaryColor       = System.Drawing.Color.White;
     chartArea1.BorderColor              = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     chartArea1.BorderDashStyle          = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.Solid;
     chartArea1.InnerPlotPosition.Auto   = false;
     chartArea1.InnerPlotPosition.Height = 67F;
     chartArea1.InnerPlotPosition.Width  = 80F;
     chartArea1.InnerPlotPosition.X      = 12F;
     chartArea1.InnerPlotPosition.Y      = 22F;
     chartArea1.Name            = "Default";
     chartArea1.Position.Auto   = false;
     chartArea1.Position.Height = 95F;
     chartArea1.Position.Width  = 99F;
     chartArea1.Position.X      = 1F;
     chartArea1.Position.Y      = 1F;
     chartArea1.ShadowColor     = System.Drawing.Color.Transparent;
     this.Chart1.ChartAreas.Add(chartArea1);
     legend1.BackColor     = System.Drawing.Color.Transparent;
     legend1.Enabled       = false;
     legend1.Font          = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
     legend1.IsTextAutoFit = false;
     legend1.Name          = "Default";
     this.Chart1.Legends.Add(legend1);
     this.Chart1.Location = new System.Drawing.Point(16, 48);
     this.Chart1.Name     = "Chart1";
     series1.BorderColor  = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
     series1.ChartArea    = "Default";
     series1.Legend       = "Default";
     series1.Name         = "Default";
     series1.Points.Add(dataPoint1);
     series1.Points.Add(dataPoint2);
     series1.Points.Add(dataPoint3);
     series1.Points.Add(dataPoint4);
     series1.Points.Add(dataPoint5);
     series1.Points.Add(dataPoint6);
     series1.Points.Add(dataPoint7);
     series1.Points.Add(dataPoint8);
     series1.Points.Add(dataPoint9);
     series1.Points.Add(dataPoint10);
     series1.Points.Add(dataPoint11);
     this.Chart1.Series.Add(series1);
     this.Chart1.Size     = new System.Drawing.Size(412, 296);
     this.Chart1.TabIndex = 0;
     title1.Font          = new System.Drawing.Font("Trebuchet MS", 14.25F, System.Drawing.FontStyle.Bold);
     title1.ForeColor     = System.Drawing.Color.FromArgb(((int)(((byte)(26)))), ((int)(((byte)(59)))), ((int)(((byte)(105)))));
     title1.Name          = "Title1";
     title1.ShadowColor   = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
     title1.ShadowOffset  = 3;
     title1.Text          = "Position Changed Event";
     this.Chart1.Titles.Add(title1);
     this.Chart1.AnnotationPositionChanged  += new System.EventHandler(this.Chart1_AnnotationPositionChanged);
     this.Chart1.AnnotationSelectionChanged += new System.EventHandler(this.Chart1_AnnotationSelectionChanged);
     this.Chart1.AnnotationPositionChanging += new System.EventHandler <System.Windows.Forms.DataVisualization.Charting.AnnotationPositionChangingEventArgs>(this.Chart1_AnnotationPositionChanging);
     //
     // label2
     //
     this.label2.Font      = new System.Drawing.Font("Verdana", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label2.Location  = new System.Drawing.Point(16, 357);
     this.label2.Name      = "label2";
     this.label2.Size      = new System.Drawing.Size(702, 57);
     this.label2.TabIndex  = 20;
     this.label2.Text      = resources.GetString("label2.Text");
     this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // AnnotationPositionChanging
     //
     this.BackColor = System.Drawing.Color.White;
     this.Controls.Add(this.label2);
     this.Controls.Add(this.Chart1);
     this.Controls.Add(this.panel1);
     this.Controls.Add(this.label9);
     this.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.Name = "AnnotationPositionChanging";
     this.Size = new System.Drawing.Size(728, 480);
     this.panel1.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.Chart1)).EndInit();
     this.ResumeLayout(false);
 }