private void Chart_CursorPositionChanged(object sender, System.Windows.Forms.DataVisualization.Charting.CursorEventArgs e) { //此函数不进,不知道为啥 chart1.Annotations[0].Visible = true; System.Windows.Forms.DataVisualization.Charting.TextAnnotation ell = (System.Windows.Forms.DataVisualization.Charting.TextAnnotation)(chart1.Annotations[0]); double x = chart1.ChartAreas[0].CursorX.Position; double y = chart1.ChartAreas[0].CursorY.Position; ell.AxisX = chart1.ChartAreas[0].AxisX; ell.AxisY = chart1.ChartAreas[0].AxisY; ell.AnchorX = x; ell.AnchorY = y; ell.Text = string.Format("x:{0},y:{1}", (int)x, y); //chart1.Series[0].LabelToolTip = "asdf"; }
private void chart1_SelectionRangeChanging(object sender, System.Windows.Forms.DataVisualization.Charting.CursorEventArgs e) { if (e.NewSelectionStart < 0) { e.NewSelectionStart = 0; } if (e.NewSelectionEnd > left.Length) { e.NewSelectionEnd = left.Length; } begin = e.NewSelectionStart; end = e.NewSelectionEnd; toolStripStatusLabel3.Text = "S: " + (int)begin + " E: " + (int)end; }
private void chart1_CursorPositionChanged(object sender, System.Windows.Forms.DataVisualization.Charting.CursorEventArgs e) { UpdateCursor_Time(chart1, l_cursor1, e.NewPosition); }
// события void chartForCandle_CursorPositionChanged(object sender, System.Windows.Forms.DataVisualization.Charting.CursorEventArgs e) // событие изменение отображения диаграммы { ChartResize(); }
private void chart3_SelectionRangeChanging(object sender, System.Windows.Forms.DataVisualization.Charting.CursorEventArgs e) { e.NewSelectionStart = 0; dftbegin = e.NewSelectionStart; dftend = e.NewSelectionEnd; }