Ejemplo n.º 1
0
        public void ShowInChart(TChart tchart, TChartHorizLine destLine, Map destMap, Map collapseMap)
        {
            if (line != null && destLine != null)
            {
                foreach (LineDots lineDots in line)
                {
                    destLine.Add(lineDots.Value, lineDots.Pos);
                }
            }

            if (map != null && destMap != null)
            {
                foreach (MapDots mapDots in map)
                {
                    int i;
                    using (Polygon polygonToAdd = new Polygon(destMap.Shapes, tchart.Chart))
                    {
                        polygonToAdd.Add(mapDots.ValueStart, mapDots.PosStart);
                        polygonToAdd.Add(mapDots.ValueEnd, mapDots.PosStart);
                        polygonToAdd.Add(mapDots.ValueEnd, mapDots.PosEnd);
                        polygonToAdd.Add(mapDots.ValueStart, mapDots.PosEnd);
                        i = destMap.Shapes.Add(polygonToAdd);
                    }
                    destMap.Repaint();

                    destMap.Shapes[i].ParentBrush = false;
                    destMap.Shapes[i].Color       = mapDots.MapColor;
                    //tgtMap.Shapes[i].Text = info;

                    destMap.Shapes[i].ParentPen   = false;
                    destMap.Shapes[i].Pen.Visible = false;

                    if (collapseMap != null)
                    {
                        using (Polygon polygonToAdd = new Polygon(collapseMap.Shapes, tchart.Chart))
                        {
                            polygonToAdd.Add(0, mapDots.PosStart);
                            polygonToAdd.Add(100, mapDots.PosStart);
                            polygonToAdd.Add(100, mapDots.PosEnd);
                            polygonToAdd.Add(0, mapDots.PosEnd);
                            i = collapseMap.Shapes.Add(polygonToAdd);
                        }
                        collapseMap.Repaint();

                        collapseMap.Shapes[i].ParentBrush = false;
                        collapseMap.Shapes[i].Color       = mapDots.MapColor;

                        collapseMap.Shapes[i].ParentPen   = false;
                        collapseMap.Shapes[i].Pen.Visible = false;
                    }
                }
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.map1      = new Steema.TeeChart.Styles.Map();
     this.button1   = new System.Windows.Forms.Button();
     this.checkBox1 = new System.Windows.Forms.CheckBox();
     this.checkBox2 = new System.Windows.Forms.CheckBox();
     this.checkBox3 = new System.Windows.Forms.CheckBox();
     this.panel2    = new System.Windows.Forms.Panel();
     this.panel1.SuspendLayout();
     this.SuspendLayout();
     //
     // textBox1
     //
     this.textBox1.Name = "textBox1";
     this.textBox1.Text = "Map Series is a collection of polygon shapes. Each shape has\r\nformatting attribut" +
                          "es and a Value. The shape color lookups the\r\ncolor palette for the Value.";
     //
     // panel1
     //
     this.panel1.Controls.Add(this.panel2);
     this.panel1.Controls.Add(this.checkBox3);
     this.panel1.Controls.Add(this.checkBox2);
     this.panel1.Controls.Add(this.checkBox1);
     this.panel1.Controls.Add(this.button1);
     this.panel1.Name   = "panel1";
     this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint);
     //
     // tChart1
     //
     //
     // tChart1.Aspect
     //
     this.tChart1.Aspect.SmoothingMode     = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
     this.tChart1.Aspect.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;
     this.tChart1.Aspect.View3D            = false;
     //
     // tChart1.Axes
     //
     //
     // tChart1.Axes.Left
     //
     //
     // tChart1.Axes.Left.Labels
     //
     this.tChart1.Axes.Left.Labels.Style = Steema.TeeChart.AxisLabelStyle.Value;
     //
     // tChart1.Header
     //
     this.tChart1.Header.Lines = new string[] {
         "TeeChart"
     };
     this.tChart1.Header.Visible = false;
     //
     // tChart1.Legend
     //
     this.tChart1.Legend.Visible = false;
     this.tChart1.Name           = "tChart1";
     //
     // tChart1.Panel
     //
     //
     // tChart1.Panel.Brush
     //
     this.tChart1.Panel.Brush.Color = System.Drawing.Color.FromArgb(((System.Byte)(254)), ((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(255)));
     this.tChart1.Series.Add(this.map1);
     //
     // tChart1.Walls
     //
     //
     // tChart1.Walls.Back
     //
     //
     // tChart1.Walls.Back.Brush
     //
     this.tChart1.Walls.Back.Brush.Color = System.Drawing.Color.FromArgb(((System.Byte)(127)), ((System.Byte)(192)), ((System.Byte)(192)), ((System.Byte)(192)));
     //
     // tChart1.Walls.Back.Gradient
     //
     this.tChart1.Walls.Back.Brush.Gradient.MiddleColor  = System.Drawing.Color.FromArgb(((System.Byte)(254)), ((System.Byte)(224)), ((System.Byte)(224)), ((System.Byte)(224)));
     this.tChart1.Walls.Back.Brush.Gradient.StartColor   = System.Drawing.Color.FromArgb(((System.Byte)(254)), ((System.Byte)(192)), ((System.Byte)(192)), ((System.Byte)(192)));
     this.tChart1.Walls.Back.Brush.Gradient.Transparency = 50;
     this.tChart1.Walls.Back.Brush.Gradient.UseMiddle    = true;
     this.tChart1.Walls.Back.Brush.Gradient.Visible      = true;
     //
     // tChart1.Walls.Back.Gradient
     //
     this.tChart1.Walls.Back.Gradient.MiddleColor  = System.Drawing.Color.FromArgb(((System.Byte)(254)), ((System.Byte)(224)), ((System.Byte)(224)), ((System.Byte)(224)));
     this.tChart1.Walls.Back.Gradient.StartColor   = System.Drawing.Color.FromArgb(((System.Byte)(254)), ((System.Byte)(192)), ((System.Byte)(192)), ((System.Byte)(192)));
     this.tChart1.Walls.Back.Gradient.Transparency = 50;
     this.tChart1.Walls.Back.Gradient.UseMiddle    = true;
     this.tChart1.Walls.Back.Gradient.Visible      = true;
     this.tChart1.Walls.Back.Transparent           = false;
     this.tChart1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.tChart1_MouseMove);
     //
     // map1
     //
     //
     // map1.Brush
     //
     this.map1.Brush.Color = System.Drawing.Color.Red;
     this.map1.LabelMember = "Labels";
     //
     // map1.Marks
     //
     //
     // map1.Marks.Symbol
     //
     //
     // map1.Marks.Symbol.Shadow
     //
     this.map1.Marks.Symbol.Shadow.Height  = 1;
     this.map1.Marks.Symbol.Shadow.Visible = true;
     this.map1.Marks.Symbol.Shadow.Width   = 1;
     this.map1.PaletteMin  = 0;
     this.map1.PaletteStep = 0;
     this.map1.Title       = "map1";
     //
     // map1.XValues
     //
     this.map1.XValues.DataMember = "X";
     //
     // map1.YValues
     //
     this.map1.YValues.DataMember = "Y";
     //
     // map1.ZValues
     //
     this.map1.ZValues.DataMember = "Z";
     //
     // button1
     //
     this.button1.Location = new System.Drawing.Point(16, 8);
     this.button1.Name     = "button1";
     this.button1.TabIndex = 0;
     this.button1.Text     = "Edit...";
     this.button1.Click   += new System.EventHandler(this.button1_Click);
     //
     // checkBox1
     //
     this.checkBox1.Checked    = true;
     this.checkBox1.CheckState = System.Windows.Forms.CheckState.Checked;
     this.checkBox1.Location   = new System.Drawing.Point(111, 9);
     this.checkBox1.Name       = "checkBox1";
     this.checkBox1.Size       = new System.Drawing.Size(57, 24);
     this.checkBox1.TabIndex   = 1;
     this.checkBox1.Text       = "&Axes";
     this.checkBox1.Click     += new System.EventHandler(this.checkBox1_Click);
     //
     // checkBox2
     //
     this.checkBox2.Checked    = true;
     this.checkBox2.CheckState = System.Windows.Forms.CheckState.Checked;
     this.checkBox2.Location   = new System.Drawing.Point(185, 10);
     this.checkBox2.Name       = "checkBox2";
     this.checkBox2.Size       = new System.Drawing.Size(57, 24);
     this.checkBox2.TabIndex   = 2;
     this.checkBox2.Text       = "&Marks";
     this.checkBox2.Click     += new System.EventHandler(this.checkBox2_Click);
     //
     // checkBox3
     //
     this.checkBox3.Location = new System.Drawing.Point(264, 10);
     this.checkBox3.Name     = "checkBox3";
     this.checkBox3.Size     = new System.Drawing.Size(57, 24);
     this.checkBox3.TabIndex = 3;
     this.checkBox3.Text     = "&Palette";
     this.checkBox3.Click   += new System.EventHandler(this.checkBox3_Click);
     //
     // panel2
     //
     this.panel2.Location = new System.Drawing.Point(344, 8);
     this.panel2.Name     = "panel2";
     this.panel2.Size     = new System.Drawing.Size(32, 24);
     this.panel2.TabIndex = 4;
     //
     // Map
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize        = new System.Drawing.Size(440, 317);
     this.Name  = "Map";
     this.Load += new System.EventHandler(this.Map_Load);
     this.panel1.ResumeLayout(false);
     this.ResumeLayout(false);
 }
Ejemplo n.º 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.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Map_Series));
     this.map1      = new Steema.TeeChart.Styles.Map();
     this.button1   = new System.Windows.Forms.Button();
     this.checkBox1 = new System.Windows.Forms.CheckBox();
     this.checkBox2 = new System.Windows.Forms.CheckBox();
     this.checkBox3 = new System.Windows.Forms.CheckBox();
     this.panel2    = new System.Windows.Forms.Panel();
     this.panel1.SuspendLayout();
     this.chartContainer.SuspendLayout();
     this.SuspendLayout();
     //
     // textBox1
     //
     this.textBox1.Text = "Map Series is a collection of polygon shapes. Each shape has\r\nformatting attribut" +
                          "es and a Value. The shape color lookups the\r\ncolor palette for the Value.";
     //
     // panel1
     //
     this.panel1.Controls.Add(this.panel2);
     this.panel1.Controls.Add(this.checkBox3);
     this.panel1.Controls.Add(this.checkBox2);
     this.panel1.Controls.Add(this.checkBox1);
     this.panel1.Controls.Add(this.button1);
     this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint);
     //
     // tChart1
     //
     //
     //
     //
     this.tChart1.Aspect.View3D  = false;
     this.tChart1.Aspect.ZOffset = 0;
     //
     //
     //
     //
     //
     //
     this.tChart1.Axes.Bottom.MaximumOffset = 1;
     this.tChart1.Axes.Bottom.MinimumOffset = 1;
     //
     //
     //
     //
     //
     //
     this.tChart1.Axes.Left.Labels.Style  = Steema.TeeChart.AxisLabelStyle.Value;
     this.tChart1.Axes.Left.MaximumOffset = 1;
     this.tChart1.Axes.Left.MinimumOffset = 2;
     //
     //
     //
     this.tChart1.Header.Visible = false;
     //
     //
     //
     this.tChart1.Legend.Visible = false;
     //
     //
     //
     //
     //
     //
     this.tChart1.Panel.Brush.Color = System.Drawing.Color.FromArgb(((int)(((byte)(254)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
     this.tChart1.Series.Add(this.map1);
     this.tChart1.Size = new System.Drawing.Size(440, 205);
     //
     //
     //
     //
     //
     //
     //
     //
     //
     this.tChart1.Walls.Back.Brush.Color = System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
     //
     //
     //
     this.tChart1.Walls.Back.Brush.Gradient.MiddleColor  = System.Drawing.Color.FromArgb(((int)(((byte)(254)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
     this.tChart1.Walls.Back.Brush.Gradient.StartColor   = System.Drawing.Color.FromArgb(((int)(((byte)(254)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
     this.tChart1.Walls.Back.Brush.Gradient.Transparency = 50;
     this.tChart1.Walls.Back.Brush.Gradient.UseMiddle    = true;
     this.tChart1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.tChart1_MouseMove);
     //
     // map1
     //
     //
     //
     //
     this.map1.Brush.Color = System.Drawing.Color.FromArgb(((int)(((byte)(79)))), ((int)(((byte)(79)))), ((int)(((byte)(168)))));
     this.map1.Color       = System.Drawing.Color.FromArgb(((int)(((byte)(68)))), ((int)(((byte)(102)))), ((int)(((byte)(163)))));
     this.map1.ColorEach   = false;
     //
     //
     //
     //
     //
     //
     this.map1.Marks.Callout.ArrowHead     = Steema.TeeChart.Styles.ArrowHeadStyles.None;
     this.map1.Marks.Callout.ArrowHeadSize = 8;
     //
     //
     //
     this.map1.Marks.Callout.Brush.Color = System.Drawing.Color.Black;
     this.map1.Marks.Callout.Distance    = 0;
     this.map1.Marks.Callout.Draw3D      = false;
     this.map1.Marks.Callout.Length      = 10;
     this.map1.Marks.Callout.Style       = Steema.TeeChart.Styles.PointerStyles.Rectangle;
     this.map1.Marks.Callout.Visible     = false;
     this.map1.PaletteMin   = 0;
     this.map1.PaletteStep  = 0;
     this.map1.PaletteStyle = Steema.TeeChart.Styles.PaletteStyles.Pale;
     this.map1.Title        = "map1";
     //
     //
     //
     this.map1.ZValues.DataMember = "Z";
     //
     // button1
     //
     this.button1.Location = new System.Drawing.Point(16, 8);
     this.button1.Name     = "button1";
     this.button1.Size     = new System.Drawing.Size(75, 23);
     this.button1.TabIndex = 0;
     this.button1.Text     = "Edit...";
     this.button1.Click   += new System.EventHandler(this.button1_Click);
     //
     // checkBox1
     //
     this.checkBox1.Checked    = true;
     this.checkBox1.CheckState = System.Windows.Forms.CheckState.Checked;
     this.checkBox1.Location   = new System.Drawing.Point(111, 9);
     this.checkBox1.Name       = "checkBox1";
     this.checkBox1.Size       = new System.Drawing.Size(57, 24);
     this.checkBox1.TabIndex   = 1;
     this.checkBox1.Text       = "&Axes";
     this.checkBox1.Click     += new System.EventHandler(this.checkBox1_Click);
     //
     // checkBox2
     //
     this.checkBox2.Checked    = true;
     this.checkBox2.CheckState = System.Windows.Forms.CheckState.Checked;
     this.checkBox2.Location   = new System.Drawing.Point(185, 10);
     this.checkBox2.Name       = "checkBox2";
     this.checkBox2.Size       = new System.Drawing.Size(57, 24);
     this.checkBox2.TabIndex   = 2;
     this.checkBox2.Text       = "&Marks";
     this.checkBox2.Click     += new System.EventHandler(this.checkBox2_Click);
     //
     // checkBox3
     //
     this.checkBox3.Location = new System.Drawing.Point(264, 10);
     this.checkBox3.Name     = "checkBox3";
     this.checkBox3.Size     = new System.Drawing.Size(60, 24);
     this.checkBox3.TabIndex = 3;
     this.checkBox3.Text     = "&Palette";
     this.checkBox3.Click   += new System.EventHandler(this.checkBox3_Click);
     //
     // panel2
     //
     this.panel2.Location = new System.Drawing.Point(344, 8);
     this.panel2.Name     = "panel2";
     this.panel2.Size     = new System.Drawing.Size(32, 24);
     this.panel2.TabIndex = 4;
     //
     // Map_Series
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize        = new System.Drawing.Size(440, 317);
     this.Name  = "Map_Series";
     this.Load += new System.EventHandler(this.Map_Load);
     this.panel1.ResumeLayout(false);
     this.chartContainer.ResumeLayout(false);
     this.ResumeLayout(false);
     this.PerformLayout();
 }