Group: Forum Members
Last Active: 8 Years Ago
Posts: 13,
Visits: 12
|
I want to be able to identify a series from a legend item.
private void nChartControl1_MouseClick(object sender, MouseEventArgs e) { NHitTestResult hitTestResult = nChartControl1.HitTest(e.X, e.Y);
if (hitTestResult.ChartElement == ChartElement.LegendDataItem) { NLegendItemCellData legendItemCellData = hitTestResult.LegendDataItem;
int legendItemIndex = hitTestResult.LegendDataItemIndex; int index = hitTestResult.ObjectIndex;
foreach (NSeries ser in chart.Series) { // find the series } MessageBox.Show("this legendItem belongs to the serie ..."); } }
|