This question is locked. New answers and comments are not allowed.
Hi,
I have a multi-series chart that when an item is clicked from any of that series, that item will be brought forward. I followed the sample in this URL (http://www.telerik.com/help/silverlight/radchart-howto-control-the-series_items-overlapping-via-zindex-property.html) in setting the item Z-index but nothing happened. Also, instead of using the ChartArea_SelectionChanged, as in the example, I used it on ChartArea_ItemClick.
Here’s my sample code:
void ChartArea_ItemClick(object sender, ChartItemClickEventArgs e)
{
var pointMarks = RadChart.DefaultView.ChartArea.ChildrenOfType<
PointMark
>().ToList<
PointMark
>();
var rangeBars = RadChart.DefaultView.ChartArea.ChildrenOfType<
RangeBar
>().ToList<
RangeBar
>();
foreach (PointMark pointMark in pointMarks)
pointMark.ClearValue(Canvas.ZIndexProperty);
foreach (RangeBar rangeBar in rangeBars)
rangeBar.ClearValue(Canvas.ZIndexProperty);
PointMark selectedPointMark = pointMarks.Where(x => x.DataContext == e.DataPoint).SingleOrDefault();
RangeBar selectedRangeBar = rangeBars.Where(x => x.DataContext == e.DataPoint).SingleOrDefault();
if (selectedPointMark != null)
{
Canvas.SetZIndex(selectedPointMark, 1000);
}
else if (selectedRangeBar != null)
{
Canvas.SetZIndex(selectedRangeBar, 1000);
}
}
Did I miss anything here? Thanks in advance for the help.
Cheers,
Byang Fernando