Hi,
We are evaluating XamDataChart and considering to purchase the product. However, there is a single feature that we could not find support for.
My question is does the chart support annotations? (I mean user drawing trend line, fibonacci retracements, etc.)?
According to https://es.infragistics.com/community/forums/f/ultimate-ui-for-wpf/50063/annotations-on-charts/263567#263567, this feature was not supported in 2010. Was the support added?
If yes, could you please provide a code snippet how to use it.
if no, could you please provide some guidance on how to implement it: what Canvas to use (e.g. custom series, or do you have smth built in), how to attach event handlers (to the main chart or to a canvas), how to make the annotations work in sync with built-in zooming / panning capabilities?
Thank you,
Adam K
There are still no native annotations in the chart. But if you look at the two links I shared in that post you linked to, you will see two different samples of how you can achieve annotations in application code. In the most recent versions of the chart, you're life is made a bit easier by the fact that the chart will raise an event called RefeshCompleted, whenever it updates its visual (this will happen as the zoom/pan changes, etc). So it should just be sufficient to listen for that event to know when to update your objects that are annotating the chart.
I would recommend overlaying a canvas on the chart. Methods on the axes of the chart (ScaleValue UnscaleValue) should help you move from the axis values into the pixel space of the chart, or back from a mouse over coordinate into the axis values you are concerned with.
For some annotations it may be worthwhile investigating doing a custom series type. But depending on the version you are targetting, and your requirements, it may turn out some of the functionality you need is sealed.
Can you provide more information about what you are trying to accomplish? I may be able to help out with an example. Also, I'd recommend submitting feature requests for the types of annotations you would find most useful.
Hope this helps!
-Graham
Graham,
Thank you for the detailed answer. I will give it a try.
The best example would be to show how to implement Fibonacci retracements (similar to the video here:http://www.youtube.com/watch?v=Rhr7hBa-rWQ).
Sincerely,
Adam
Sorry, this slipped throught the cracks, did you still need assistance with this or did you figure it out already? You'll see its actually using the axis values internally to store the bounds of the shape so that it can automatically map it back into pixel space as your zoom level changes.
Yeah, I figured it out thanks. As mentioned in another post, I now make extensive use of scaled/unscaled values to persist annotations etc. back to my view model with meaningful values.
HtD
Hello,
Can you please post a full solution example that demonstrate implemantation of drawing any kind of annotation on xamDataChart ?
My main intrest would be drawing lines and triangles on financial price chart.
Your chart view is very nice but without drawing annotations it won't be useful for me.
Best,
TomAir.
Currently the XamDataChart doesn't support creating such Annotations, like in the video, by dragging the mouse. If you want I can log a product idea for this to be implemented.
After many hours of investigating this issue i accomplished my requirements based on some information you have in your posts.
If anyone needs any start point , you can post me here..
Hi Tomer,
Can you send me a sample of your annotation to please.
Thanks in advance.David
Hello Tomer,
Can you send me a sample of your annotation.
Thank you very much.
Hani