In our application we have a dynamically generated Bar Chart and to this bar chart we are creating ChartSeries and adding ChartSeries item and while adding the items to the series i am trying to register a click event for the ActiveRegion and the code is as below in bold but the event never gets fired.
ChartSeries
s0 = new ChartSeries();
s0.Name =
string.Empty;
for (int ic = 0; ic < dt.Rows.Count; ic++)
{
ChartSeriesItem seriesItem = new ChartSeriesItem();
seriesItem.YValue = (
double)dt.Rows[ic]["Quantity"];
seriesItem.Name =
"Settlement";
seriesItem.Appearance.Border.Color =
Color.Black;
DateTime dt1 = Convert.ToDateTime(dt.Rows[ic]["Date"]);
seriesItem.XValue = dt1.ToOADate();
seriesItem.ActiveRegion.Click +=
new RegionClickEventHandler(ActiveRegion_Click);
seriesItem.ActiveRegion.Tooltip =
"Number of News:" + dt.Rows[ic]["Quantity"] + "";
RadToolTipManager1.TargetControls.Add(
null, seriesItem.ActiveRegion.Tooltip.ToString(), true);
s0.AddItem(seriesItem);
}
radchart1.Series.Add(s0);
I even tried the below way of registering the click event for the Active region at chart level but in vain.
radchart1.ChartTitle.ActiveRegion.Click +=
new RegionClickEventHandler(ActiveRegion_Click);
Please correct me if i am doing something wrong.
Regards,
Preetam.