I create a new DataChart with a dynamic number of Scatter line series in code behind.
Now everything works perfect, but I'm trying to create a tooltip... But this isn't working for me.I found some examples on the internet, but none of them are working for me. I even found a custom ScatterLineToolTipManager which kinda works, but a simple tooltip should be pretty easy to make I guess :).
Can somebody help me creating a nice tooltip? I'm using 2012.2.
Thanks in advance.
Thank you for your post.
I have been looking into this functionality you are looking to achieve, and I would recommend that you set the Tooltip property on your ScatterLineSeries to a new ContentControl that contains the elements that you would like to place in your tooltip. These tooltips will show up on the markers that show up on the ScatterLineSeries, and the elements in them will have access to the data item and the series that they are a part of.
To demonstrate how a tooltip on the ScatterLineSeries can be created in code, I have attached a sample project that creates a tooltip that shows the Series title, the X Value, and the Y Value of each of the points of each of the series in the chart. I hope this helps you.
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewAssociate DeveloperInfragistics Inc.www.infragistics.com/support
Thanks for the help! It's working now, but I still have a question.
If I disable the marker types, the tooltip does no appear. Is their a way to do this?
By disabling the marker types on the XamDataChart, you essentially disable the tooltips for each of the scatter line series. The markers on the series represent the data points that you have plotted in your XamDataChart, and by default, the tooltips show up and belong to these markers.
There is another way that you can achieve this though, but it involves creating a tooltip for the XamDataChart itself and handling the MouseMove event of the chart to keep track of the mouse position in chart-coordinates. Here is a link to another forum thread that shows how you can get a mouse position in chart coordinates. If you create a tooltip for the XamDataChart itself and update this value, I believe you may be able to achieve this functionality you are looking for: http://www.infragistics.com/community/forums/p/50226/264216.aspx#264216.
Please let me know if you would like to continue down this route, and I will create a sample project that demonstrates the above.