Hi,
I have a XamDataChart with the following types of series to present results of a KPI:
As you can see in the below screen shot the projection crosses the red target line (highlighted with the green circle in paint). I want to highlight this point with a custom marker and provide a tooltip of the details. I am not sure how best to do this as the intersection will not be directly over one of the categorical values from the CategoryXAxis:
Any advice would be greatly appreciated.
Regards,
Chris
Hello Chris,
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.
Hi Stefan,
Thank you for your help with this issue, that is exactly what I was after.
Many thanks,
I have modified the sample I sent you before, so now it works as you want. Basically it doesn’t matter what kind is the XAxis, because I used the number of the DataPoints. The sample now contains CategoryXAxis, which displays DateTime values. You can see that in the for loop where the intersect points are created I use the index and the YValues only. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.
Thank you again for you're quick response. The solution provided is exactly what we are after in terms of presentation and the logic to evaluate the intersection is great. However, in our case we are using a CategoryXAxis that represents a time based split of the data (can be years, months, weeks, days etc.), as opposed to a NumericXAxis, meaning the scatter series is not an option and we don't have the X-axis value to evaluate against.
I am not sure if this is possible, but you can tell me if it is. Can I add a NumericXAxis to the chart as well and set the items source to a collection of integers, which are just the indexes of the categorical data i.e. if I have 2009, 2010, 2011 and 2012 against my CategoryXAxis the items source for my numeric axis is simply a collection of 4 integers {0, 1, 2, 3}. With these two axis combined I could then use you're logic to work out the intersection based on the index of each categorical data point?
I have modified the sample I sent you before, so now there is marker only where the series intersect. Basically I calculated the points, where the two series intersect and create a List with all these point and set it as data source to a ScatterSeries. Please let me know if this helps you or you need further assistance on this matter.