this.chartControl1.PrimaryXAxis.ValueType = ChartValueType.DateTime;
this.chartControl1.Trackball.DisplayMode = TrackballTooltipDisplayMode.Float;
this.chartControl1.Trackball.Visible = true; |
this.chartControl1.ChartRegionClick += ChartControl1_ChartRegionClick;
private void ChartControl1_ChartRegionClick(object sender, ChartRegionMouseEventArgs e)
{
int pointIndex = e.Region.PointIndex;
int seriesIndex = e.Region.SeriesIndex;
if (pointIndex != -1)
{
MessageBox.Show("X value: " + this.chartControl1.Series[seriesIndex].Points[pointIndex].X +"\nY value: " + this.chartControl1.Series[seriesIndex].Points[pointIndex].YValues[0]);
}
} |