Exemple #1
0
        public void DisplayPoint(int x, int y, Color kolor, TypLini typLin)
        {
            if (this.chWykres1.InvokeRequired)
            {
                DisplayPointCallback d = new DisplayPointCallback(DisplayPoint);
                this.BeginInvoke(d, new object[] { x, y, kolor, typLin });
            }
            else
            {
                if (y == 0 || x == 0)
                {
                    return;
                }



                if (!chWykres1.Series[typLin.ToString()].Enabled)
                {
                    return;
                }


                if (!chbLockY.Checked)
                {
                    if (y > maxY)
                    {
                        maxY = y;
                        chWykres1.ChartAreas["ChartArea1"].AxisY.Maximum = ((maxY / 200) + 1) * 200;
                    }

                    if (y < minY)
                    {
                        minY = y;
                        chWykres1.ChartAreas["ChartArea1"].AxisY.Minimum = (minY / 200) * 200;
                    }
                }


                if (this.chWykres1.InvokeRequired)
                {
                    DisplayPointCallback d = new DisplayPointCallback(DisplayPoint);
                    this.BeginInvoke(d, new object[] { x, y, kolor, typLin });
                }
                else
                {
                    this.chWykres1.Series[typLin.ToString()].Color = kolor;
                    this.chWykres1.Series[typLin.ToString()].Points.AddXY(x, y);
                }
            }
        }
Exemple #2
0
 public void ClearPoint(TypLini typLin)
 {
     if (this.chWykres1.InvokeRequired)
     {
         ClearPointCallback d = new ClearPointCallback(ClearPoint);
         this.BeginInvoke(d, new object[] { typLin });
     }
     else
     {
         this.chWykres1.Series[typLin.ToString()].Points.Clear();
         maxY = 0;
         minY = 30000;
     }
 }
Exemple #3
0
 public void DisplayHorLine(int val, Color color, TypLini typLin)
 {
     DisplayPoint((int)chWykres1.ChartAreas["ChartArea1"].AxisX.Minimum + 1, val, color, typLin);
     DisplayPoint((int)chWykres1.ChartAreas["ChartArea1"].AxisX.Maximum - 1, val, color, typLin);
 }
Exemple #4
0
 public void DisplayColumn(int x, int y, Color kolor, TypLini typLin)
 {
     // this.chWykres1.Series[typLin.ToString()].Points.DataBindXY(x, y);
 }