private void cursorTool1_Change(object sender, Steema.TeeChart.Tools.CursorChangeEventArgs e)
        {
            int aspWidth = tChart1.Aspect.Width3D;

            tChart1.Refresh();
            for (int i = tChart1.Axes.Left.CalcYPosValue(line1.YValues.Maximum) - aspWidth;
                 i <= tChart1.Axes.Left.CalcYPosValue(line1.YValues.Minimum) + aspWidth; ++i)
            {
                if (line1.Clicked(e.x, i) != -1)
                {
                    double yValue1 = tChart1.Axes.Left.CalcPosPoint(i);
                    label1.Text = "Line 1 - YValue : " + yValue1.ToString();
                }
            }

            for (int j = tChart1.Axes.Left.CalcYPosValue(line2.YValues.Maximum) - aspWidth;
                 j <= tChart1.Axes.Left.CalcYPosValue(line2.YValues.Minimum) + aspWidth; ++j)
            {
                if (line2.Clicked(e.x, j) != -1)
                {
                    double yValue2 = tChart1.Axes.Left.CalcPosPoint(j);
                    label2.Text = "Line 2 - YValue : " + yValue2.ToString();
                }
            }
        }
예제 #2
0
파일: CurveShowFrm.cs 프로젝트: rcw0125/Lg
        //拖动
        private void cursorTool1_Change(object sender, Steema.TeeChart.Tools.CursorChangeEventArgs e)
        {
            xval          = e.XValue;
            txtFlow.Text  = "";
            txtPress.Text = "";

            txtTime.Text = DateTime.FromOADate(xval).ToString("yyyy-MM-dd HH:mm:ss");
            for (int i = 0; i < tChart1.Series.Count; i++)
            {
                if (tChart1.Series[i] is Steema.TeeChart.Styles.Custom)
                {
                    if (tChart1.Series[i].Visible == true)
                    {
                        if (tChart1.Series[i].Title == strFlowTitle)
                        {
                            txtFlow.Text = InterpolateLineSeries(tChart1.Series[i] as Steema.TeeChart.Styles.Custom, e.XValue).ToString("0.00") + "";
                        }
                        else if (tChart1.Series[i].Title == strPressTitle)
                        {
                            txtPress.Text = InterpolateLineSeries(tChart1.Series[i] as Steema.TeeChart.Styles.Custom, e.XValue).ToString("0.00") + "";
                        }
                        else
                        {
                            return;
                        }
                    }
                }
            }
        }
예제 #3
0
 private void HorizCursorTool_Change(object sender, Steema.TeeChart.Tools.CursorChangeEventArgs e)
 {
     annHoriz.PositionUnits = Steema.TeeChart.PositionUnits.Pixels;
     annHoriz.Left          = tChart1.Axes.Left.Position;
     annHoriz.Top           = tChart1.Axes.Left.CalcYPosValue(e.YValue) - e.YValue.ToString("##.###").Length;
     annHoriz.Text          = e.YValue.ToString("##.###");
 }
예제 #4
0
 private void VertCursorTool_Change(object sender, Steema.TeeChart.Tools.CursorChangeEventArgs e)
 {
     annVert.PositionUnits = Steema.TeeChart.PositionUnits.Pixels;
     annVert.Left          = tChart1.Axes.Bottom.CalcXPosValue(e.XValue) - e.XValue.ToString("##.###").Length;
     annVert.Top           = tChart1.Axes.Bottom.Position;
     annVert.Text          = e.XValue.ToString("##.###");
 }
예제 #5
0
 private void cursorDEST_Change(object sender, Steema.TeeChart.Tools.CursorChangeEventArgs e)
 {
     if (this.checkBox2.Checked)
     {
         CursorSynchronize(sender as Steema.TeeChart.Tools.CursorTool, this.cursorSRC);
     }
     ShowXY(e.XValue, e.YValue);
 }
예제 #6
0
 private void CursorTool_Change(object sender, Steema.TeeChart.Tools.CursorChangeEventArgs e)
 {
     if (e.SnapPoint != -1)
     {
         chartView.Chart.Header.Text = "Snap Point : " + e.SnapPoint.ToString();
         _annotation.Text            = chartView.Chart.Series[0].YValues[e.SnapPoint].ToString();
         _annotation.Left            = e.x - (_annotation.Bounds.Width / 2);
         _annotation.Top             = chartView.Chart.Series[0].CalcYPos(e.SnapPoint);
     }
 }
 private void cursorTool1_Change(object sender, Steema.TeeChart.Tools.CursorChangeEventArgs e)
 {
     xval = e.XValue;
     tChart1.Header.Text = "";
     for (int i = 0; i < tChart1.Series.Count; i++)
     {
         if (tChart1.Series[i] is TeeChart.Styles.Custom)
         {
             tChart1.Header.Text += tChart1.Series[i].Title + ": Y(" + e.XValue.ToString("0.00") + ")= ";
             tChart1.Header.Text += InterpolateLineSeries(tChart1.Series[i] as Steema.TeeChart.Styles.Custom, e.XValue).ToString("0.00") + "\r\n";
         }
     }
 }
        private void cursorTool1_Change(object sender, Steema.TeeChart.Tools.CursorChangeEventArgs e)
        {
            xVal = e.XValue;

            annotation4.Text  = line1.Title + ": Y(" + e.XValue.ToString("0.00") + ")= ";
            annotation4.Text += InterpolateLineSeries(line1 as Steema.TeeChart.Styles.Custom, e.XValue).ToString("0.00") + "\r\n";
            annotation4.Left  = e.x + 10;
            annotation4.Top   = tChart4.Axes.Left.IStartPos;

            annotation6.Text  = line2.Title + ": Y(" + e.XValue.ToString("0.00") + ")= ";
            annotation6.Text += InterpolateLineSeries(line2 as Steema.TeeChart.Styles.Custom, e.XValue).ToString("0.00") + "\r\n";
            annotation6.Left  = e.x + 10;
            annotation6.Top   = tChart4.Axes.Left.IStartPos + 18;

            annotation8.Text  = line3.Title + ": Y(" + e.XValue.ToString("0.00") + ")= ";
            annotation8.Text += InterpolateLineSeries(line3 as Steema.TeeChart.Styles.Custom, e.XValue).ToString("0.00") + "\r\n";
            annotation8.Left  = e.x + 10;
            annotation8.Top   = tChart4.Axes.Left.IStartPos + 36;
        }
예제 #9
0
 private void cursorTool2_Change(object sender, Steema.TeeChart.Tools.CursorChangeEventArgs e)
 {
     // show the cursor values...
     this.label2.Text = "X=" + e.XValue.ToString("#.00") + "; Y=" + e.YValue.ToString("#.00");
 }
예제 #10
0
 private void CursorTool_SnapChange(object sender, Steema.TeeChart.Tools.CursorChangeEventArgs e)
 {
 }