Devexpress Chart series 点击时获取SeriesPoint的值
在这里做个备注:
public partial class XtraForm2 : DevExpress.XtraEditors.XtraForm { private LabelControl _labelControl; private int xpoint; private int yponit; public XtraForm2() { InitializeComponent(); _labelControl = new LabelControl(); chartControl1.Controls.Add(_labelControl); chartControl1.MouseClick += new MouseEventHandler(ChartControl1MouseClick); } void ChartControl1MouseClick(object sender, MouseEventArgs e) { xpoint = e.X; yponit = e.Y; } private void ChartControl1ObjectSelected(object sender, DevExpress.XtraCharts.HotTrackEventArgs e) { if (e.AdditionalObject == null) return; SeriesPoint point = (SeriesPoint)e.AdditionalObject; string ms = string.Format("Value{0},argument:{1}", point.ValuesSerializable, point.Argument); _labelControl.Text = string.Empty; _labelControl.Location = new Point(xpoint, yponit); _labelControl.Text = "值:" + point.ValuesSerializable; } }