Hi,
I have trouble setting the ZIndex of a point mark in my line series chart. I only followed the ones in your sample for the Bubble series. Here is my code:
Hope you could help me on this.
Cheers,
Byang
I have trouble setting the ZIndex of a point mark in my line series chart. I only followed the ones in your sample for the Bubble series. Here is my code:
private void ChartArea_ItemClick(object sender, ChartItemClickEventArgs e)
{
BringToFrontDataPointControl(Chart.DefaultView.ChartArea.ChildrenOfType<
PointMark
>()
.ToList<
PointMark
>().Where(x => x.DataContext == e.DataPoint).SingleOrDefault());
}
private void BringToFrontDataPointControl(Control ctrl)
{
if (ctrl is PointMark)
{
var pointMarkList = Chart.DefaultView.ChartArea.ChildrenOfType<
PointMark
>().ToList<
PointMark
>();
pointMarkList.ForEach(delegate(PointMark current)
{
if (current.Equals(ctrl as PointMark))
Canvas.SetZIndex(current, 100000);
else
current.ClearValue(Canvas.ZIndexProperty);
});
}
}
Hope you could help me on this.
Cheers,
Byang