These images are of same graph but on zoom in zoomout of graph and on stretch and compression of window. Can any body suggest some thing to fix the problem Thanks.
Hi Graham,
Thanks for all of the great examples you've posted. They're really helping me get up to speed on the xamDataChart, which is a really nice control! Question on the point annotations based on the sample code you posted: how can I adjust the z order for the annotations? They're drawing behind some of the series, but I'd like them to draw on top. This is what it looks like now:
I played with setting the ZIndex and also looked around for a different "annotation" canvas that might draw after all of the series elements, but haven't found anything yet that works. Any suggestions would be most appreciated.
Thanks,
Gary Sinner
petroWEB
I have tried your proposed solution but its not working for me. May be I am missing some thing please find attached my sample application attached and please suggest some solution.
Thanks
Thanks for your reply. I have tried your proposed solution but I am stuck in one thing earlier pointinfo was deriving frameworkelement class which is responsible for setting databinding or setbinding method for pointinfo instance in chartbehaviour class. But if I make pointinfo as dependency it wouldnt allow me to set binding can you please suggest something in this regard thanks.
Hi,
Modifying the contents of the Points collection in the attached property should update the annotations dynamically. So, for example, if you wanted to add an additional annotation programatically, you could do something like this:
ChartBehaviors.GetChartPoints(chart1).Points.Add(new PointInfo() { X = 4, Y = 10, DataIndex = 3 });
But if you wanted to set X and Y via a binding, you would have to make PointInfo a Dependency object and change X and Y to be dependency properties and have PointInfo implement INotifyPropertyChanged. Then your ChartPointsBehavior would have to register and unregister to the property changed event for these point info's to know when the visuals need to be refreshed based on the X and Y values changing. This increases the complexity of this sample somewhat, so is left as an excercise to the reader, but is not that difficult to implement. Let me know if you need any further advice.
Hope this helps!
-Graham
Thanks for the solution its working fine but only problem with this solution is its points on which annotation needs to deffine are statice and I have tried to make it dynamic but I am not success full in it. Moreover position of annotation which is based on X and Y value in PointInfo how can I make them dynamic as well, I tried to bind my maker point values with it but its not working. Can you please suggest the solution. Moreover did you guys find out any solid solution for this problem.
Thanks.