Пример #1
0
        private void _cursorTool_Change(object sender, Steema.TeeChart.Tools.CursorChangeEventArgs e)
        {
            Steema.TeeChart.Tools.CursorTool _currentCursor = sender as Steema.TeeChart.Tools.CursorTool;
            double            xValue        = _currentCursor.XValue;
            double            yValue        = _currentCursor.YValue;
            ControlCollection parentControl = this.pnlChart.Controls;

            for (int i = 0; i < parentControl.Count; i++)
            {
                if (parentControl[i] is BaseChart)
                {
                    BaseChart baseChart = parentControl[i] as BaseChart;
                    for (int j = 0; j < baseChart.SPCChart.Chart.Tools.Count; j++)
                    {
                        if (baseChart.SPCChart.Chart.Tools[j].GetType() == typeof(Steema.TeeChart.Tools.CursorTool))
                        {
                            Steema.TeeChart.Tools.CursorTool _CursorDesc = (Steema.TeeChart.Tools.CursorTool)baseChart.SPCChart.Chart.Tools[j];
                            if (_CursorDesc.Pen.Color == Color.Gray)
                            {
                                if (xValue != _CursorDesc.XValue && yValue != _CursorDesc.YValue)
                                {
                                    CursorSynchronize(_currentCursor, _CursorDesc);
                                    break;
                                }
                            }
                        }
                    }
                }
            }
        }
Пример #2
0
 private void Cursor_Change(object sender, Steema.TeeChart.Tools.CursorChangeEventArgs e)
 {
     annotation.Text = e.YValue.ToString();
     annotation.Left = e.x - (annotation.Bounds.Width / 2);
     annotation.Top  = e.y;
 }
Пример #3
0
 private void Cursor_SnapChange(object sender, Steema.TeeChart.Tools.CursorChangeEventArgs e)
 {
 }